{"eip":6466,"title":"SSZ receipts","description":"Migration of RLP receipts to SSZ","authors":["Etan Kissling (@etan-status)","Gajinder Singh (@g11tech)","Vitalik Buterin (@vbuterin)"],"status":"Draft","type":"Standards Track","category":"Core","created":"2023-02-08","requires":[658,2718,6404,7495,7668,7702,7916,8016,8116],"discussionsTo":"https://ethereum-magicians.org/t/eip-6466-ssz-receipts/12884","repo":"EIPs","label":"EIP-6466","officialUrl":"https://eips.ethereum.org/EIPS/eip-6466","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-6466.md","url":"https://eips.huatuo.xyz/eip-6466/","tldr":{"en":"Draft plan to replace RLP-encoded transaction receipts and their Patricia-trie root with SSZ receipts, so individual logs and fields can be proven cheaply.","ja":"RLP エンコードされたトランザクションレシートと、その Patricia トライのルートを SSZ レシートに置き換え、個々のログやフィールドを低コストで証明できるようにする、ドラフトの計画。","ko":"RLP로 인코딩된 트랜잭션 영수증과 그 패트리샤 트라이 루트를 SSZ 영수증으로 교체해, 개별 로그와 필드를 저렴하게 증명할 수 있게 하는 초안 계획.","zh":"一项草案计划：用 SSZ 收据取代 RLP 编码的交易收据及其 Patricia 树根，使单个日志和字段可以被低成本地证明。"},"tags":["ssz","receipts","logs","core","serialization"],"explainers":{"en":{"lang":"en","tldr":"Draft plan to replace RLP-encoded transaction receipts and their Patricia-trie root with SSZ receipts, so individual logs and fields can be proven cheaply.","tags":["ssz","receipts","logs","core","serialization"],"related":[6404,2718,7702,658,8116],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-6466/","markdown":"## What problem does it solve?\n\nEvery transaction produces a receipt (success flag, gas, logs). Today receipts are RLP-encoded and committed in the block header's `receipts_root` via a Merkle-Patricia Trie. Two weaknesses follow:\n\n- **Hard to prove pieces.** Each receipt is hashed as one blob, so proving a single log means supplying the whole receipt. That is costly for light clients, bridges and L2 fraud proofs.\n- **Missing data.** JSON-RPC returns `from`, `gasUsed` and `contractAddress`, but the on-chain receipt doesn't contain them, so they cannot be verified against the header (`from` has to be recovered with `ecrecover`).\n\nEIP-6466 moves receipts to SSZ (Simple Serialize, the format already used by the consensus layer), part of a broader effort with [EIP-6404](/eip-6404/) for SSZ transactions.\n\n## How it works\n\nA `Log` becomes an SSZ container: `address`, up to 4 `topics`, and `data`.\n\nA `Receipt` is a tagged union of three shapes that share one Merkle layout, so each field sits at a stable position (generalized index):\n\n| Variant | Emitted for | Fields |\n| --- | --- | --- |\n| `BasicReceipt` | ordinary calls, blob transactions | `from`, `gas_used`, `logs`, `status` |\n| `CreateReceipt` | contract deployments | adds `contract_address` |\n| `SetCodeReceipt` | [EIP-7702](/eip-7702/) set-code transactions | adds `authorities` (failed authorizations appear as the zero address) |\n\n`status` keeps the [EIP-658](/eip-658/) meaning. `gas_used` is the gas of that transaction alone. The `logs_bloom`, the old intermediate state root and `cumulative_gas_used` are removed.\n\nThe header's `receipts_root` becomes the SSZ `hash_tree_root` of the list of receipts, and the consensus `ExecutionPayload` field changes type accordingly. Over JSON-RPC, receipts gain an `authorities` array, stop returning `logsBloom` for new receipts, and `logIndex` counts within the receipt rather than the block (per [EIP-8116](/eip-8116/)).\n\n## Sample code\n\nSSZ type definitions from the spec (Python-style, as used in consensus specs):\n\n```python\nclass Log(Container):\n    address: ExecutionAddress            # Bytes20\n    topics: List[Bytes32, 4]             # LOG0..LOG4\n    data: ProgressiveByteList\n\nclass BasicReceipt(ProgressiveContainer(active_fields=[1, 1, 0, 1, 1])):\n    from_: ExecutionAddress\n    gas_used: GasAmount                  # uint64\n    logs: ProgressiveList[Log]\n    status: boolean\n\nclass Receipt(CompatibleUnion({\n    0x01: BasicReceipt,\n    0x02: CreateReceipt,\n    0x03: SetCodeReceipt,\n})):\n    pass\n\n# Header commitment\nblock_header.receipts_root = ProgressiveList[Receipt](*receipts).hash_tree_root()\n```\n\n## Things to know\n\n- **Status: Draft.** It is not scheduled for any network upgrade and depends on several other draft proposals (EIP-6404 transactions, progressive SSZ types, EIP-8116 and others).\n- It is a breaking change for anything that verifies receipts against the header with MPT proofs, and for log filtering that relies on the bloom.\n- RLP and SSZ receipts can collide when encoded, so a given network channel must use only one format; the block header tells you which fork's format applies.\n- Committing `from` and `contract_address` lets verifiers skip `ecrecover`, which also makes future signature-scheme changes easier.\n"},"ja":{"lang":"ja","tldr":"RLP エンコードされたトランザクションレシートと、その Patricia トライのルートを SSZ レシートに置き換え、個々のログやフィールドを低コストで証明できるようにする、ドラフトの計画。","tags":["ssz","receipts","logs","core","serialization"],"related":[6404,2718,7702,658,8116],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-6466/","markdown":"## 何を解決するのか\n\nすべてのトランザクションはレシート（成功フラグ、ガス、ログ）を生成します。現在、レシートは RLP エンコードされ、Merkle-Patricia Trie を介してブロックヘッダーの `receipts_root` にコミットされます。ここから 2 つの弱点が生じます。\n\n- **一部分を証明しにくい。** 各レシートは 1 つのかたまりとしてハッシュされるため、1 つのログを証明するにもレシート全体を提示しなければなりません。ライトクライアント、ブリッジ、L2 の不正証明にとってはコストが高くなります。\n- **データの欠落。** JSON-RPC は `from`、`gasUsed`、`contractAddress` を返しますが、オンチェーンのレシートにはそれらが含まれていないため、ヘッダーに対して検証できません（`from` は `ecrecover` で復元する必要があります）。\n\nEIP-6466 は、レシートを SSZ（Simple Serialize、コンセンサスレイヤーで既に使われているフォーマット）に移行します。SSZ トランザクションに関する [EIP-6404](/eip-6404/) とともに、より大きな取り組みの一部です。\n\n## 仕組み\n\n`Log` は SSZ のコンテナになります。`address`、最大 4 つの `topics`、そして `data` です。\n\n`Receipt` は、1 つの Merkle レイアウトを共有する 3 つの形のタグ付きユニオンで、各フィールドは安定した位置（generalized index）に置かれます。\n\n| バリアント | 発行されるケース | フィールド |\n| --- | --- | --- |\n| `BasicReceipt` | 通常の呼び出し、blob トランザクション | `from`、`gas_used`、`logs`、`status` |\n| `CreateReceipt` | コントラクトのデプロイ | `contract_address` を追加 |\n| `SetCodeReceipt` | [EIP-7702](/eip-7702/) の set-code トランザクション | `authorities` を追加（失敗した認可はゼロアドレスとして現れる） |\n\n`status` は [EIP-658](/eip-658/) の意味を維持します。`gas_used` はそのトランザクション単独のガスです。`logs_bloom`、古い中間ステートルート、`cumulative_gas_used` は削除されます。\n\nヘッダーの `receipts_root` は、レシートのリストの SSZ `hash_tree_root` になり、コンセンサスの `ExecutionPayload` フィールドもそれに合わせて型が変わります。JSON-RPC では、レシートに `authorities` 配列が加わり、新しいレシートでは `logsBloom` が返されなくなり、`logIndex` はブロックではなくレシート内でカウントされるようになります（[EIP-8116](/eip-8116/) による）。\n\n## サンプルコード\n\n仕様の SSZ 型定義（コンセンサス仕様で使われている Python 風の記法）:\n\n```python\nclass Log(Container):\n    address: ExecutionAddress            # Bytes20\n    topics: List[Bytes32, 4]             # LOG0..LOG4\n    data: ProgressiveByteList\n\nclass BasicReceipt(ProgressiveContainer(active_fields=[1, 1, 0, 1, 1])):\n    from_: ExecutionAddress\n    gas_used: GasAmount                  # uint64\n    logs: ProgressiveList[Log]\n    status: boolean\n\nclass Receipt(CompatibleUnion({\n    0x01: BasicReceipt,\n    0x02: CreateReceipt,\n    0x03: SetCodeReceipt,\n})):\n    pass\n\n# Header commitment\nblock_header.receipts_root = ProgressiveList[Receipt](*receipts).hash_tree_root()\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** どのネットワークアップグレードにもスケジュールされておらず、他の複数のドラフト提案（EIP-6404 のトランザクション、progressive SSZ 型、EIP-8116 など）に依存しています。\n- MPT 証明でヘッダーに対してレシートを検証するものや、bloom に依存するログのフィルタリングにとって、破壊的な変更です。\n- RLP と SSZ のレシートはエンコード時に衝突しうるため、1 つのネットワークチャネルでは 1 つのフォーマットだけを使わなければなりません。どのフォークのフォーマットが適用されるかは、ブロックヘッダーからわかります。\n- `from` と `contract_address` をコミットすることで、検証者は `ecrecover` を省略でき、将来の署名方式の変更も容易になります。\n"},"ko":{"lang":"ko","tldr":"RLP로 인코딩된 트랜잭션 영수증과 그 패트리샤 트라이 루트를 SSZ 영수증으로 교체해, 개별 로그와 필드를 저렴하게 증명할 수 있게 하는 초안 계획.","tags":["ssz","receipts","logs","core","serialization"],"related":[6404,2718,7702,658,8116],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-6466/","markdown":"## 어떤 문제를 해결하나요?\n\n모든 트랜잭션은 영수증(성공 플래그, 가스, 로그)을 만듭니다. 현재 영수증은 RLP로 인코딩되어 Merkle-Patricia Trie를 통해 블록 헤더의 `receipts_root`에 커밋됩니다. 여기서 두 가지 약점이 생깁니다.\n\n- **일부만 증명하기 어렵다.** 각 영수증이 하나의 덩어리로 해시되므로 로그 하나를 증명하려 해도 영수증 전체를 제공해야 합니다. 라이트 클라이언트, 브리지, L2 사기 증명에는 비용이 큽니다.\n- **빠진 데이터.** JSON-RPC는 `from`, `gasUsed`, `contractAddress`를 반환하지만 온체인 영수증에는 이것들이 없어서 헤더에 대해 검증할 수 없습니다(`from`은 `ecrecover`로 복구해야 합니다).\n\nEIP-6466은 영수증을 SSZ(Simple Serialize, 컨센서스 레이어가 이미 쓰는 포맷)로 옮기며, SSZ 트랜잭션에 대한 [EIP-6404](/eip-6404/)와 함께 더 넓은 노력의 일부입니다.\n\n## 어떻게 동작하나요?\n\n`Log`는 SSZ 컨테이너가 됩니다. `address`, 최대 4개의 `topics`, 그리고 `data`입니다.\n\n`Receipt`는 하나의 Merkle 레이아웃을 공유하는 세 가지 형태의 태그드 유니온이어서 각 필드가 안정적인 위치(generalized index)에 놓입니다.\n\n| 변형 | 발행되는 경우 | 필드 |\n| --- | --- | --- |\n| `BasicReceipt` | 일반 호출, 블롭 트랜잭션 | `from`, `gas_used`, `logs`, `status` |\n| `CreateReceipt` | 컨트랙트 배포 | `contract_address` 추가 |\n| `SetCodeReceipt` | [EIP-7702](/eip-7702/) set-code 트랜잭션 | `authorities` 추가(실패한 인가는 영 주소로 표시) |\n\n`status`는 [EIP-658](/eip-658/)의 의미를 유지합니다. `gas_used`는 해당 트랜잭션 하나만의 가스입니다. `logs_bloom`, 예전의 중간 상태 루트, `cumulative_gas_used`는 제거됩니다.\n\n헤더의 `receipts_root`는 영수증 목록의 SSZ `hash_tree_root`가 되고, 컨센서스의 `ExecutionPayload` 필드도 그에 맞춰 타입이 바뀝니다. JSON-RPC에서는 영수증에 `authorities` 배열이 추가되고, 새 영수증에는 `logsBloom`이 더 이상 반환되지 않으며, `logIndex`는 블록이 아니라 영수증 안에서 셉니다([EIP-8116](/eip-8116/)에 따름).\n\n## 샘플 코드\n\n명세의 SSZ 타입 정의(컨센서스 명세에서 쓰는 Python 스타일):\n\n```python\nclass Log(Container):\n    address: ExecutionAddress            # Bytes20\n    topics: List[Bytes32, 4]             # LOG0..LOG4\n    data: ProgressiveByteList\n\nclass BasicReceipt(ProgressiveContainer(active_fields=[1, 1, 0, 1, 1])):\n    from_: ExecutionAddress\n    gas_used: GasAmount                  # uint64\n    logs: ProgressiveList[Log]\n    status: boolean\n\nclass Receipt(CompatibleUnion({\n    0x01: BasicReceipt,\n    0x02: CreateReceipt,\n    0x03: SetCodeReceipt,\n})):\n    pass\n\n# Header commitment\nblock_header.receipts_root = ProgressiveList[Receipt](*receipts).hash_tree_root()\n```\n\n## 알아둘 점\n\n- **상태: Draft.** 어떤 네트워크 업그레이드에도 예정되어 있지 않으며, 여러 다른 초안 제안(EIP-6404 트랜잭션, progressive SSZ 타입, EIP-8116 등)에 의존합니다.\n- MPT 증명으로 헤더에 대해 영수증을 검증하는 모든 것과 bloom에 의존하는 로그 필터링에는 호환성을 깨는 변경입니다.\n- RLP와 SSZ 영수증은 인코딩했을 때 충돌할 수 있으므로, 하나의 네트워크 채널에서는 한 가지 포맷만 써야 합니다. 어느 포크의 포맷이 적용되는지는 블록 헤더가 알려 줍니다.\n- `from`과 `contract_address`를 커밋하면 검증자가 `ecrecover`를 건너뛸 수 있고, 이는 향후 서명 방식 변경도 쉽게 만듭니다.\n"},"zh":{"lang":"zh","tldr":"一项草案计划：用 SSZ 收据取代 RLP 编码的交易收据及其 Patricia 树根，使单个日志和字段可以被低成本地证明。","tags":["ssz","receipts","logs","core","serialization"],"related":[6404,2718,7702,658,8116],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-6466/","markdown":"## 它解决什么问题？\n\n每笔交易都会产生一个收据（成功标志、gas、日志）。目前，收据采用 RLP 编码，并通过 Merkle-Patricia Trie 提交到区块头的 `receipts_root` 中。由此带来两个弱点：\n\n- **难以证明局部。** 每个收据作为一个整体被哈希，因此要证明单个日志就必须提供整个收据。这对轻客户端、跨链桥和 L2 欺诈证明来说成本很高。\n- **缺失的数据。** JSON-RPC 会返回 `from`、`gasUsed` 和 `contractAddress`，但链上收据并不包含它们，因此无法对照区块头验证（`from` 必须通过 `ecrecover` 恢复）。\n\nEIP-6466 把收据迁移到 SSZ（Simple Serialize，共识层已经在使用的格式），它与关于 SSZ 交易的 [EIP-6404](/eip-6404/) 同属一项更广泛的工作。\n\n## 它如何运作\n\n`Log` 变成一个 SSZ 容器：`address`、最多 4 个 `topics` 和 `data`。\n\n`Receipt` 是三种形态的带标签联合，它们共享同一个 Merkle 布局，因此每个字段都位于稳定的位置（generalized index）：\n\n| 变体 | 适用于 | 字段 |\n| --- | --- | --- |\n| `BasicReceipt` | 普通调用、blob 交易 | `from`、`gas_used`、`logs`、`status` |\n| `CreateReceipt` | 合约部署 | 增加 `contract_address` |\n| `SetCodeReceipt` | [EIP-7702](/eip-7702/) 的 set-code 交易 | 增加 `authorities`（失败的授权显示为零地址） |\n\n`status` 保持 [EIP-658](/eip-658/) 的含义。`gas_used` 仅是该笔交易自身的 gas。`logs_bloom`、旧的中间状态根和 `cumulative_gas_used` 被移除。\n\n区块头的 `receipts_root` 变成收据列表的 SSZ `hash_tree_root`，共识的 `ExecutionPayload` 字段类型也相应改变。在 JSON-RPC 中，收据新增 `authorities` 数组，新收据不再返回 `logsBloom`，并且 `logIndex` 在收据内部而不是在区块内计数（依据 [EIP-8116](/eip-8116/)）。\n\n## 示例代码\n\n规范中的 SSZ 类型定义（Python 风格，与共识规范中使用的一致）：\n\n```python\nclass Log(Container):\n    address: ExecutionAddress            # Bytes20\n    topics: List[Bytes32, 4]             # LOG0..LOG4\n    data: ProgressiveByteList\n\nclass BasicReceipt(ProgressiveContainer(active_fields=[1, 1, 0, 1, 1])):\n    from_: ExecutionAddress\n    gas_used: GasAmount                  # uint64\n    logs: ProgressiveList[Log]\n    status: boolean\n\nclass Receipt(CompatibleUnion({\n    0x01: BasicReceipt,\n    0x02: CreateReceipt,\n    0x03: SetCodeReceipt,\n})):\n    pass\n\n# Header commitment\nblock_header.receipts_root = ProgressiveList[Receipt](*receipts).hash_tree_root()\n```\n\n## 需要注意\n\n- **状态：Draft。** 它没有被排入任何网络升级，并且依赖若干其他草案提案（EIP-6404 交易、progressive SSZ 类型、EIP-8116 等）。\n- 对于任何用 MPT 证明对照区块头验证收据的东西，以及依赖 bloom 的日志过滤，这是一项破坏性变更。\n- RLP 和 SSZ 收据在编码后可能发生冲突，因此某个网络通道必须只使用一种格式；区块头会告诉你适用哪个分叉的格式。\n- 提交 `from` 和 `contract_address` 使验证者可以跳过 `ecrecover`，这也让未来更换签名方案更容易。\n"}},"requiredBy":[6493,7792,7799,7919]}
