---
eip: 6404
label: EIP-6404
title: SSZ transactions
status: Draft
type: Standards Track
category: Core
created: 2023-01-30
requires: 155, 1559, 2718, 2930, 4844, 7495, 7702, 7916, 7932, 8016
official: https://eips.ethereum.org/EIPS/eip-6404
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-6404.md
canonical: https://eips.huatuo.xyz/eip-6404/
lang: en
tldr: A draft plan to re-encode every Ethereum transaction type from RLP into SSZ, so transactions get a Merkle-tree root that allows cheap partial proofs and match how the consensus layer already hashes data.
tags: [ssz, rlp, transactions, serialization, core]
---

# EIP-6404: SSZ transactions

> Migration of RLP transactions to SSZ

**TL;DR:** A draft plan to re-encode every Ethereum transaction type from RLP into SSZ, so transactions get a Merkle-tree root that allows cheap partial proofs and match how the consensus layer already hashes data.

## What problem does it solve?

Execution-layer transactions are encoded with **RLP**, while the consensus layer uses **SSZ** for everything else. That mismatch causes real friction:

- **Linear hashing.** The signing hash and `tx_hash` are a keccak256 over the whole RLP encoding. To prove anything about a transaction, even just its recipient or value, you need all of it, including large calldata.
- **Weak inclusion proofs.** The block's `transactions_root` is a Merkle-Patricia trie over serialized transactions, so there is no direct commitment to `tx_hash`.
- **Two incompatible roots.** The beacon chain hashes the same transactions via SSZ as opaque bytes, producing a root unrelated to the execution header's.
- **Technical debt.** Legacy transactions lack a type byte, `v` / `y_parity` and `chain_id` semantics differ between types, and field order is inconsistent.

EIP-6404 proposes a lossless conversion of all existing transaction types to a single, normalised SSZ representation.

## How it works

- Each [EIP-2718](/eip-2718/) type (legacy, access list, EIP-1559, [EIP-4844](/eip-4844/) blob, EIP-7702 set-code) gets an SSZ payload container. Contract creations and pre-EIP-155 "replayable" legacy transactions get their own variants, giving ten payload kinds in a `CompatibleUnion`.
- Containers use **progressive** SSZ types ([EIP-7495](/eip-7495/) `ProgressiveContainer`, [EIP-7916](/eip-7916/) `ProgressiveList`), so new fields can be added later without changing the Merkle positions of old ones.
- Fees are grouped into a struct: `max_fees_per_gas` holds `regular` and, for blob transactions, `blob`.
- Signatures become an opaque byte list prefixed with an algorithm ID per [EIP-7932](/eip-7932/) (`0x00` = secp256k1), leaving room for other schemes.
- The original RLP type is kept, so the RLP form, `sig_hash` and historical `tx_hash` can always be recomputed.

Block-level changes:

- The execution header's `transactions_root` becomes the SSZ `hash_tree_root` of the transaction list, identical to the consensus `ExecutionPayload` root.
- The Engine API sends transactions SSZ-encoded.
- Each transaction gains a new identifier, `tx_root = hash_tree_root(tx)`; existing `tx_hash`-based APIs remain.

## Sample code

Shape of an EIP-1559 transaction in the new format (SSZ pseudocode from the spec, abbreviated):

```python
class BasicFeesPerGas(ProgressiveContainer(active_fields=[1])):
    regular: uint256

class RlpBasicTransactionPayload(ProgressiveContainer(active_fields=[1]*10)):
    type_: uint8                     # 0x02, original RLP type
    chain_id: uint256
    nonce: uint64
    max_fees_per_gas: BasicFeesPerGas
    gas: uint64
    to: Bytes20
    value: uint256
    input_: ProgressiveByteList
    access_list: ProgressiveList[AccessTuple]
    max_priority_fees_per_gas: BasicFeesPerGas

class Transaction(Container):
    payload: TransactionPayload      # union of all payload kinds
    signature: ProgressiveByteList   # [algorithm byte] + signature bytes

tx_root = tx.hash_tree_root()        # new identifier
block_header.transactions_root = ProgressiveList[Transaction](txs).hash_tree_root()
```

With a Merkle root, a verifier (for example an L1 contract checking L2 data) can prove `to` and `value` with a short branch instead of the whole transaction.

## Things to know

- **Status: Draft.** It has been revised many times and depends on other in-progress proposals (progressive SSZ types, signature algorithm registry). It is not scheduled for any specific upgrade here; check current upgrade plans before relying on it.
- Tools that verify the old MPT `transactions_root` would need to migrate. `tx_hash` keeps working in JSON-RPC and devp2p, but there is no on-chain commitment to it.
- RLP and SSZ encodings can collide, so a single channel must use only one format.
- The spec's intrinsic-gas helper still contains a "FIXME", a sign that details are unsettled.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-6404
