The execution layer is the part of Ethereum that receives transactions, runs them through the Ethereum Virtual Machine (EVM) and keeps the resulting state: account balances, contract code and contract storage. It is run by software called an execution client, which every node operates alongside a consensus client. The execution layer decides what each transaction does; the consensus layer decides which blocks the network agrees on and in what order.
Before 2022 this part of the system was usually called Eth1, as it was the original Ethereum chain, while the planned proof-of-stake system was called Eth2. The Ethereum community dropped those names in early 2022 because they suggested two separate networks, and the two halves were joined at the Merge on 15 September 2022. Since then the execution layer has no consensus mechanism of its own and depends on the proof-of-stake Beacon Chain.
What the execution layer does
An execution client performs four main jobs. It keeps a mempool of pending transactions received from peers and users. It builds and checks execution payloads, the list of transactions inside each block, by running every transaction through the EVM and charging gas for each operation. It maintains the state database, organised as a Merkle Patricia Trie (MPT) whose root is written into each block. And it serves the JSON-RPC interface that wallets, block explorers and applications use to read balances and submit transactions.
Execution is deterministic: given the same starting state and the same transactions, every honest client must reach exactly the same new state root. If two clients disagree, they will follow different chains, which is why execution clients are tested against shared test suites and specifications.
Execution and consensus since the Merge
Under proof of work, the execution client also handled block production through mining. At the Merge this role passed to the consensus layer, and the two clients on each node now talk to each other through the Engine API, a local and authenticated interface. When a validator is chosen to propose a block, its consensus client asks the execution client for a payload built from the mempool, wraps it in a beacon block and broadcasts it. When a block arrives from the network, the consensus client passes the payload to the execution client, which runs the transactions and reports whether they are valid.
The consensus client handles everything to do with proof of stake: validator duties, attestations, the fork-choice rule and finality, described in Ethereum proof-of-stake timing and validator roles. A staker runs a validator client on top of the consensus client, but every full node, staking or not, needs both an execution client and a consensus client.
Execution clients
Several independent teams write execution clients in different programming languages, all implementing the same specification:
- Geth (Go Ethereum), written in Go, is the oldest client and has long been the most widely used.
- Nethermind, written in C# on .NET, is widely run by node operators and staking services.
- Hyperledger Besu, written in Java, serves both the public network and permissioned enterprise deployments.
- Erigon, written in Go, began as a fork of Geth redesigned for lower disk use and fast archive access.
- Reth, written in Rust, is a newer client designed for speed and modular use by other projects.
The clients differ in database design, disk and memory needs, sync speed and support for archive data, which keeps the full history of past states. They all produce the same results for valid blocks.
Client diversity
Client diversity is the goal of spreading nodes and validators across several clients so that no single one dominates. The concern is software bugs. If a client used by more than one-third of staked ether has a bug that splits it from the rest of the network, Ethereum stops finalising blocks until the problem is fixed. If a buggy client is used by more than two-thirds of stake, the network could finalise an invalid chain, and validators who followed it could face heavy penalties when trying to rejoin the correct one.
For this reason the community publishes estimates of client shares and encourages large staking providers to avoid the majority client. Diversity on the execution layer has historically been harder to achieve than on the consensus layer, because one client held a large majority for many years. Reliance on a single client is one form of centralization risk for the network.
External links
Ref 1070001397