SSZ Transactions Root
EIP-6404 proposes a migration process of existing Merkle-Patricia Trie (MPT) commitments for transactions to Simple Serialize (SSZ) in Ethereum. This aims to align the encoding of the transactions_root, taking advantage of the more modern SSZ format. This brings several advantages, including better support for light clients who no longer need to obtain and decode entire transactions to verify transaction related fields provided by the execution JSON-RPC API, including information about the transactionâs signer and the transaction hash. The EIP also provides specifications for existing definitions, consensus ExecutionPayload building, consensus ExecutionPayload changes, consensus ExecutionPayloadHeader changes, execution block header changes, handling reorgs, consensus ExecutionPayload validation, and more. The proposal is still in draft form and was last updated on January 30, 2023.
This EIP defines a migration process of existing Merkle-Patricia Trie (MPT) commitments for transactions to Simple Serialize (SSZ).
While the consensus
ExecutionPayloadHeader and the execution block header map to each other conceptually, they are encoded differently. This EIP aims to align the encoding of the
transactions_root, taking advantage of the more modern SSZ format. This brings several advantages:
Transaction inclusion proofs: Changing the transaction representation to EIP-6493
SignedTransactioncommits to the transaction root hash on-chain, allowing verification of the list of all transaction hashes within a block, and allowing compact transaction inclusion proofs.
Reducing complexity: The proposed design reduces the number of use cases that require support for Merkle-Patricia Trie (MPT), RLP encoding, keccak hashing, and secp256k1 public key recovery.
Reducing ambiguity: The name
transactions_rootis currently used to refer to different roots. While the execution block header refers to a Merkle Patricia Trie (MPT) root, the consensus
ExecutionPayloadHeaderinstead refers to an SSZ root. With these changes,
transactions_rootconsistently refers to the same SSZ root.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
uint64(2**20) (= 1,048,576)
class ExecutionPayload(Container): ... transactions: List[SignedTransaction, MAX_TRANSACTIONS_PER_PAYLOAD] ...
ExecutionPayloadHeader is updated for the new
payload_header.transactions_root = payload.transactions.hash_tree_root()
Execution block header changes
The execution block header's
txs-root is updated to match the consensus
While a unique transaction identifier
tx_hash is defined for each transaction, there is no on-chain commitment to this identifier for RLP transactions. Instead, transactions are "summarized" by their
def compute_tx_root(tx: SignedTransaction) -> Root: return tx.hash_tree_root()
Note that for SSZ transactions with
tx.signature.type_ == TRANSACTION_TYPE_SSZ, the
tx_hash is equivalent to the
tx_root. Like the
tx_root remains perpetually stable across future upgrades.
It is RECOMMENDED that implementations introduce indices for tracking transactions by
This change enables the use of SSZ transactions as defined in EIP-6493.
Applications that rely on the replaced MPT
transactions_root in the block header require migration to the SSZ
While there is no on-chain commitment of the
tx_hash, it is widely used in JSON-RPC and the Ethereum Wire Protocol to uniquely identify transactions. The
tx_root is a different identifier and will be required for use cases such as transaction inclusion proofs where an on-chain commitment is required.
Copyright and related rights waived via CC0.
Adopted by projects
Not miss a beat of EIPs' update?
Subscribe EIPs Fun to receive the latest updates of EIPs Good for Buidlers to follow up.View all