Ethereum stands as a cornerstone of the Web3.0 ecosystem, a decentralized computing platform that extends beyond simple currency transactions. While often compared to Bitcoin, its design and capabilities represent a significant evolution in blockchain technology.
This article explores Ethereum's core components, from its account structures to its sophisticated data organization, providing a clear guide to how this powerful network operates.
The Evolution: From Bitcoin to Ethereum
Bitcoin and Ethereum are the two most prominent cryptocurrencies, but they serve different purposes. Bitcoin is often termed 'blockchain 1.0,' functioning primarily as a decentralized digital currency. Ethereum, or 'blockchain 2.0,' builds upon this concept to create a decentralized computing platform.
Ethereum's native cryptocurrency is Ether (ETH), which has a complex system of denominations. The smallest unit is the Wei, named after cryptocurrency pioneer Wei Dai. Other units honor significant figures in mathematics and cryptography:
- Kwei (Babbage) = 10³ Wei
- Mwei (Lovelace) = 10⁶ Wei
- Gwei (Shannon) = 10⁹ Wei
- MicroEther (Szabo) = 10¹² Wei
- MilliEther (Finney) = 10¹⁵ Wei
- Ether = 10¹⁸ Wei
Several key differences distinguish Ethereum from Bitcoin:
- Ledger Structure: Bitcoin uses a transaction-based ledger, while Ethereum employs an account-based ledger (state machine)
- Block Time: Ethereum confirms blocks in seconds compared to Bitcoin's 10-minute average
- Supply: Bitcoin has a fixed supply of 21 million coins, while Ether has no hard cap
- Consensus: Ethereum uses a Ghost protocol-based mechanism to handle its faster block times
- Mining Puzzle: Bitcoin uses computation-intensive puzzles that favor specialized hardware, while Ethereum's memory-intensive approach discourages ASIC dominance
- Transaction Fees: Bitcoin fees are calculated per byte, while Ethereum uses a gas system that accounts for computation complexity, bandwidth, and storage needs
- Uncle Blocks: Ethereum rewards miners for blocks that don't make it into the main chain, creating a fairer system
- Smart Contracts: Ethereum introduces programmable agreements that execute automatically when conditions are met
These contracts form the basis of decentralized applications, essentially replacing certain governmental functions with code-based execution. However, only contracts with simple, quantifiable logic can be effectively implemented as smart contracts.
👉 Explore more blockchain strategies
Ethereum Account System
Unlike Bitcoin's UTXO model where balances must be calculated from transaction history, Ethereum uses an account model similar to traditional banking. Each address functions as an account with a visible balance, making the system more intuitive for users.
The account system uses a nonce (number used once) to track transaction order, preventing replay attacks where a transaction might be duplicated. If someone tries to rebroadcast a completed transaction, the nonce value would conflict with the current state and the network would reject it.
Ethereum features two distinct account types:
Externally Owned Accounts (EOA)
These are controlled by private keys, similar to Bitcoin addresses. Each EOA contains:
- Balance: The amount of Ether held
- Nonce: Transaction counter to prevent replay attacks
Contract Accounts (CA)
These accounts are controlled by their code rather than private keys. They contain:
- Balance: Ether held by the contract
- Nonce: Counter for contract creation
- Code: The programmed instructions
- Storage: The current state of the contract
Contract accounts cannot initiate transactions themselves—they only execute when called by an external account. When created, each contract receives a unique address that others can use to interact with it.
Account Model Advantages
Ethereum's account model maintains several key state components:
- Nonce: Transaction count for EOAs, creation序号 for CAs
- Balance: Current Ether balance
- Storage Root: Hash of the Merkle tree root for storage contents
- Code Hash: Hash of the EVM code (empty for EOAs)
Compared to Bitcoin's UTXO model, each approach has distinct advantages:
UTXO Model Benefits:
- Enhanced privacy through address diversity
- No need to maintain balance states
- Parallel transaction verification
- Simpler output script management
Account Model Benefits:
- Instant balance checking
- Space efficiency with single-input, single-output transactions
- Better support for Turing-complete smart contracts
Ethereum's Data Structure
Ethereum blocks consist of three components: block header, transaction list, and uncle blocks. The header contains several critical hashes that root different Merkle trees representing system state.
The foundation of Ethereum's data organization is the Modified Patricia Trie (MPT), which combines elements from three data structures.
Modified Patricia Trie (MPT)
MPT merges the benefits of Trie trees, Patricia Tries, and Merkle trees to create an efficient, secure structure for storing Ethereum's state.
Trie Trees
Also called prefix trees, Tries provide fast string retrieval using shared prefixes. Their properties include:
- Root node contains no character
- Path from root to node forms the stored string
- All child nodes have distinct strings
Advantages include O(m) insertion/query time (where m is string length), no collisions between keys, and natural alphabetical sorting. The main disadvantage is potentially high space consumption.
Patricia Trees
These compressed Tries address space concerns by merging single-child nodes. They work particularly well with sparse key distributions—perfect for Ethereum's 160-bit address space with its 2¹⁶⁰ possible addresses.
Modified Patricia Tree
Ethereum's implementation creates a cryptographically authenticated data structure. The system uses four separate trees with roots hashed into block headers:
- State Root: Global account state
- Storage Root: Contract data storage
- Transactions Root: Block transactions
- Receipts Root: Transaction outcomes
👉 View real-time blockchain tools
The Four Core Trees
State Tree
This massive tree maps addresses to account states, with its root hash stored in the block header. It represents the entire current state of the Ethereum network—the "hard drive" of the world computer. The state tree uses four node types (empty, leaf, extension, branch) and RLP encoding for efficient serialization.
With each new block, the state tree updates by creating new branches rather than modifying existing nodes, preserving previous states.
Storage Tree
Each smart contract has its own storage tree containing its specific data. The storageRoot field in the account state holds the root hash of this tree.
Transaction Tree
Every block has its own transaction tree containing all executed transactions. The block header stores its root hash in the transactionsRoot field.
Receipt Tree
Similarly, each block has a receipt tree documenting all transaction outcomes, with its root hash stored in the receiptsRoot field.
While transaction and receipt trees are block-specific, the state tree encompasses all accounts regardless of their involvement in current transactions. Multiple blocks share state tree nodes, while transaction and receipt trees remain independent per block.
These structures serve critical functions: providing Merkle proofs for light clients, enabling complex queries (like searching for specific events over time), and maintaining cryptographic security throughout the system.
Frequently Asked Questions
What makes Ethereum different from Bitcoin?
While both are cryptocurrencies, Ethereum functions as a decentralized computing platform with smart contract capability, whereas Bitcoin primarily serves as digital currency. Ethereum has faster block times, a different consensus approach, and more flexible transaction model.
How do I protect against replay attacks on Ethereum?
The network uses nonce values—transaction counters attached to each account—to prevent replay attacks. Each transaction must have the correct nonce value, making it impossible to rebroadcast old transactions successfully.
What are the practical uses of smart contracts?
Smart contracts automate agreements without intermediaries. Common applications include decentralized finance (DeFi) protocols, token exchanges, automated payments, and conditional transfers when specific conditions are met.
Why does Ethereum have multiple data trees?
The different trees serve distinct purposes: the state tree tracks all account balances, the storage tree handles contract data, while transaction and receipt trees provide permanent records of block-specific activities. This separation improves efficiency and query capability.
How does Ethereum's account model benefit users?
The account system makes balance checking instantaneous and transactions simpler than Bitcoin's UTXO model. Users don't need to manage multiple transaction outputs, making the experience more similar to traditional banking.
Can anyone create a smart contract on Ethereum?
Yes, anyone can deploy smart contracts by paying the required gas fees. However, creating secure, effective contracts requires programming knowledge and understanding of blockchain principles to avoid vulnerabilities and unexpected behaviors.