Skip to Content
GlossaryMMerkle Patricia Tree (MPT)

Merkle Patricia Tree (MPT)

A specialized data structure in Ethereum that combines a Merkle Tree with a Patricia trie to efficiently store and manage key-value pairs.

What is Merkle Patricia Tree (MPT)?

The Merkle Patricia Tree (MPT), also known as a Merkle Patricia Trie, is a hybrid cryptographic data structure used in Ethereum to store and manage key-value pairs, such as account balances, smart contract states, and transaction data. It combines the properties of a Merkle Tree, which ensures data integrity and efficient verification, with a Patricia trie (or prefix tree), which optimizes storage and retrieval of key-value pairs by sharing common prefixes. This structure is used in Ethereum to organize the state trie (account data), transaction trie, and receipt trie within each block.

In Ethereum’s mainnet, the MPT is critical for maintaining the blockchain’s state, allowing nodes to efficiently verify and update information like an account’s ETH balance or a smart contract’s storage. The MPT’s root hash, included in each block, ensures that the entire state can be verified cryptographically. Its design reduces storage requirements and enables fast lookups, making it suitable for Ethereum’s complex state management. For example, the state trie in an MPT maps addresses (keys) to account details (values), such as nonce, balance, and code hash, ensuring secure and scalable data handling.

Last updated on