{"eip":7688,"title":"Forward compatible consensus data structures","description":"Transition consensus SSZ data structures to ProgressiveContainer","authors":["Etan Kissling (@etan-status)","Cayman (@wemeetagain)"],"status":"Review","type":"Standards Track","category":"Core","created":"2024-04-15","requires":[7495,7607,7916],"discussionsTo":"https://ethereum-magicians.org/t/eip-7688-forward-compatible-consensus-data-structures/19673","repo":"EIPs","label":"EIP-7688","officialUrl":"https://eips.ethereum.org/EIPS/eip-7688","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7688.md","url":"https://eips.huatuo.xyz/eip-7688/","tldr":{"en":"Moves beacon-chain SSZ types to ProgressiveContainer and ProgressiveList so Merkle proofs keep working across forks, without changing how data is serialized.","ja":"Beacon Chain の SSZ 型を ProgressiveContainer と ProgressiveList に移行し、データのシリアライズ方法を変えずに、フォークをまたいでも Merkle 証明が動き続けるようにする。","ko":"비콘 체인의 SSZ 타입을 ProgressiveContainer와 ProgressiveList로 옮겨, 데이터 직렬화 방식은 바꾸지 않으면서 포크를 넘어서도 Merkle 증명이 계속 동작하게 한다.","zh":"将信标链的 SSZ 类型迁移为 ProgressiveContainer 和 ProgressiveList，使 Merkle 证明在跨分叉后依然有效，同时不改变数据的序列化方式。"},"tags":["consensus","ssz","merkle","proofs","core"],"explainers":{"en":{"lang":"en","tldr":"Moves beacon-chain SSZ types to ProgressiveContainer and ProgressiveList so Merkle proofs keep working across forks, without changing how data is serialized.","tags":["consensus","ssz","merkle","proofs","core"],"related":[7495,7916],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7688/","markdown":"## What problem does it solve?\n\nBeacon-chain objects such as `BeaconState`, `BeaconBlockBody` and `ExecutionPayload` are SSZ `Container`s. SSZ defines both how they are serialized and how they are Merkleized, and the Merkle root lets anyone prove a single field, for example that a validator is not `slashed`, against a block root. Staking pools, bridges and light clients verify such proofs inside smart contracts or devices.\n\nThe catch: with a plain `Container`, the shape of the Merkle tree depends on the number of fields. When a fork adds or removes a field, the *generalized index* (gindex, the path in the tree) of other fields can move, and every verifier has to be updated in lockstep with the fork schedule. Fixed `List[T, N]` capacities cause similar churn when limits change.\n\nEIP-7688 gives these structures stable Merkleization, so a verifier that checks `validator.slashed` keeps working as long as that field still exists.\n\n## How it works\n\nIt applies two new SSZ types:\n\n- **`ProgressiveContainer`** ([EIP-7495](/eip-7495/)) carries an `active_fields` bitmap. Each field gets a permanent position. A fork that appends a field extends the bitmap with a trailing `1`; a fork that removes a field sets its bit to `0` rather than shifting the others.\n- **`ProgressiveList` / `ProgressiveBitlist`** ([EIP-7916](/eip-7916/)) replace capacity-bound lists. Each element gets a gindex that does not depend on how many elements there are. Limits move from the type into runtime checks.\n\nContainers that are expected to evolve are converted, including `Attestation`, `IndexedAttestation`, `ExecutionPayload(Header)`, `ExecutionRequests`, `BeaconBlockBody` and `BeaconState`. Many list fields inside them (validators, balances, attestations, withdrawals, deposits and others) become progressive lists. Smaller building blocks such as `Validator`, `Checkpoint` and `AttestationData` are declared immutable: if they ever need an incompatible change, a new type and new field name must be introduced instead.\n\nOnly Merkleization changes. **Serialization of the affected types stays the same**, and per-topic network message size bounds are defined so gossip limits do not depend on the old list capacities.\n\n## Sample code\n\nThe conversion pattern from the spec, in the consensus-specs Python style:\n\n```python\n# Before: tree shape depends on the field count\nclass Foo(Container):\n    a: uint8\n    b: uint16\n\n# After: each field has a stable gindex\nclass Foo(ProgressiveContainer(active_fields=[1, 1])):\n    a: uint8\n    b: uint16\n\n# A later fork appends c and drops a: positions of b and c stay stable\nclass Foo(ProgressiveContainer(active_fields=[0, 1, 1])):\n    b: uint16\n    c: uint32\n```\n\nA list with a fixed capacity becomes a progressive list plus a runtime limit:\n\n```python\n# Before\nattestations: List[Attestation, MAX_ATTESTATIONS_ELECTRA]\n# After\nattestations: ProgressiveList[Attestation]\nassert len(body.attestations) \u003c= MAX_ATTESTATIONS_ELECTRA  # enforced in logic\n```\n\n## Things to know\n\n- **Status: Review.** The spec text and the list of converted types may still change. It depends on EIP-7495 and EIP-7916, which are also in Review.\n- Existing proofs and verifiers need one final update when this is adopted, since gindices change once. The benefit is that later forks should not break them again.\n- Some old limits, such as `MAX_TRANSACTIONS_PER_PAYLOAD`, are no longer enforced by the type; other constraints (gas, network message size) still bound real sizes.\n- If you write on-chain verifiers for beacon state, follow this EIP closely: it determines how stable your proof paths will be.\n"},"ja":{"lang":"ja","tldr":"Beacon Chain の SSZ 型を ProgressiveContainer と ProgressiveList に移行し、データのシリアライズ方法を変えずに、フォークをまたいでも Merkle 証明が動き続けるようにする。","tags":["consensus","ssz","merkle","proofs","core"],"related":[7495,7916],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7688/","markdown":"## 何を解決するのか\n\n`BeaconState`、`BeaconBlockBody`、`ExecutionPayload` などの Beacon Chain のオブジェクトは SSZ の `Container` です。SSZ はシリアライズ方法と Merkle 化の方法の両方を定義しており、Merkle ルートを使えば、たとえばあるバリデーターが `slashed` でないことを、ブロックルートに対して単一のフィールドとして証明できます。ステーキングプール、ブリッジ、ライトクライアントは、こうした証明をスマートコントラクトやデバイス内で検証します。\n\n問題は、通常の `Container` では Merkle ツリーの形がフィールド数に依存することです。フォークでフィールドが追加・削除されると、他のフィールドの*一般化インデックス*（gindex、ツリー内のパス）が動く可能性があり、すべての検証側がフォークのスケジュールに合わせて同時に更新される必要があります。固定容量の `List[T, N]` も、上限が変わるときに同様の手戻りを生みます。\n\nEIP-7688 はこれらの構造に安定した Merkle 化を与えます。これにより、`validator.slashed` を検証する検証側は、そのフィールドが存在する限り動き続けます。\n\n## 仕組み\n\n2 つの新しい SSZ 型を適用します。\n\n- **`ProgressiveContainer`**（[EIP-7495](/eip-7495/)）は `active_fields` ビットマップを持ちます。各フィールドには恒久的な位置が割り当てられます。フィールドを追加するフォークはビットマップの末尾に `1` を足し、フィールドを削除するフォークは他をずらさずにそのビットを `0` にします。\n- **`ProgressiveList` / `ProgressiveBitlist`**（[EIP-7916](/eip-7916/)）は、容量に縛られたリストを置き換えます。各要素の gindex は要素数に依存しません。上限は型から実行時のチェックに移ります。\n\n進化が見込まれるコンテナが変換の対象で、`Attestation`、`IndexedAttestation`、`ExecutionPayload(Header)`、`ExecutionRequests`、`BeaconBlockBody`、`BeaconState` などが含まれます。その中の多くのリストフィールド（validators、balances、attestations、withdrawals、deposits など）はプログレッシブリストになります。`Validator`、`Checkpoint`、`AttestationData` のような小さな部品は immutable と宣言されます。互換性のない変更が必要になった場合は、代わりに新しい型と新しいフィールド名を導入しなければなりません。\n\n変わるのは Merkle 化だけです。**対象の型のシリアライズは同じまま**で、トピックごとのネットワークメッセージのサイズ上限が定義されているため、gossip の上限が従来のリスト容量に依存することもありません。\n\n## サンプルコード\n\n仕様にある変換パターンを、consensus-specs の Python スタイルで示します。\n\n```python\n# Before: tree shape depends on the field count\nclass Foo(Container):\n    a: uint8\n    b: uint16\n\n# After: each field has a stable gindex\nclass Foo(ProgressiveContainer(active_fields=[1, 1])):\n    a: uint8\n    b: uint16\n\n# A later fork appends c and drops a: positions of b and c stay stable\nclass Foo(ProgressiveContainer(active_fields=[0, 1, 1])):\n    b: uint16\n    c: uint32\n```\n\n固定容量のリストは、プログレッシブリストと実行時の上限チェックに置き換わります。\n\n```python\n# Before\nattestations: List[Attestation, MAX_ATTESTATIONS_ELECTRA]\n# After\nattestations: ProgressiveList[Attestation]\nassert len(body.attestations) \u003c= MAX_ATTESTATIONS_ELECTRA  # enforced in logic\n```\n\n## 知っておくべきこと\n\n- **ステータス: Review。** 仕様の文面や変換対象の型の一覧は、まだ変わる可能性があります。EIP-7495 と EIP-7916 に依存しており、これらも Review の段階です。\n- これが採用されると、gindex が一度だけ変わるため、既存の証明と検証側は最後に 1 回更新が必要です。メリットは、以降のフォークでは再び壊れないはずだという点です。\n- `MAX_TRANSACTIONS_PER_PAYLOAD` のような古い上限の一部は、型によって強制されなくなります。実際のサイズは、他の制約（gas、ネットワークメッセージのサイズ）によって引き続き制限されます。\n- Beacon State のオンチェーン検証側を書く場合は、この EIP を注意深く追ってください。証明パスがどれだけ安定するかを決めるものだからです。\n"},"ko":{"lang":"ko","tldr":"비콘 체인의 SSZ 타입을 ProgressiveContainer와 ProgressiveList로 옮겨, 데이터 직렬화 방식은 바꾸지 않으면서 포크를 넘어서도 Merkle 증명이 계속 동작하게 한다.","tags":["consensus","ssz","merkle","proofs","core"],"related":[7495,7916],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7688/","markdown":"## 어떤 문제를 해결하나요?\n\n`BeaconState`, `BeaconBlockBody`, `ExecutionPayload` 같은 비콘 체인 객체는 SSZ `Container`입니다. SSZ는 직렬화 방식과 Merkle화 방식을 모두 정의하며, Merkle 루트를 이용하면 예를 들어 어떤 검증자가 `slashed`가 아니라는 것처럼 필드 하나를 블록 루트에 대해 증명할 수 있습니다. 스테이킹 풀, 브리지, 라이트 클라이언트는 이런 증명을 스마트 컨트랙트나 기기 안에서 검증합니다.\n\n문제는 일반 `Container`에서는 Merkle 트리의 모양이 필드 수에 따라 달라진다는 점입니다. 포크에서 필드가 추가되거나 제거되면 다른 필드의 *일반화 인덱스*(gindex, 트리 안의 경로)가 움직일 수 있고, 모든 검증자는 포크 일정에 맞춰 동시에 업데이트되어야 합니다. 고정 용량의 `List[T, N]`도 한도가 바뀔 때 비슷한 변동을 일으킵니다.\n\nEIP-7688은 이런 구조에 안정적인 Merkle화를 제공하므로, `validator.slashed`를 검증하는 검증자는 그 필드가 존재하는 한 계속 동작합니다.\n\n## 어떻게 동작하나요?\n\n두 가지 새 SSZ 타입을 적용합니다.\n\n- **`ProgressiveContainer`**([EIP-7495](/eip-7495/))는 `active_fields` 비트맵을 가집니다. 각 필드는 영구적인 위치를 갖습니다. 필드를 추가하는 포크는 비트맵 끝에 `1`을 붙이고, 필드를 제거하는 포크는 다른 필드를 밀지 않고 해당 비트를 `0`으로 설정합니다.\n- **`ProgressiveList` / `ProgressiveBitlist`**([EIP-7916](/eip-7916/))는 용량이 제한된 리스트를 대체합니다. 각 요소의 gindex는 요소 개수에 따라 달라지지 않습니다. 한도는 타입에서 런타임 검사로 옮겨집니다.\n\n앞으로 변경될 것으로 예상되는 컨테이너가 변환 대상이며, `Attestation`, `IndexedAttestation`, `ExecutionPayload(Header)`, `ExecutionRequests`, `BeaconBlockBody`, `BeaconState` 등이 포함됩니다. 그 안의 많은 리스트 필드(validators, balances, attestations, withdrawals, deposits 등)는 progressive 리스트가 됩니다. `Validator`, `Checkpoint`, `AttestationData` 같은 작은 구성 요소는 immutable로 선언됩니다. 호환되지 않는 변경이 필요해지면 대신 새 타입과 새 필드 이름을 도입해야 합니다.\n\n바뀌는 것은 Merkle화뿐입니다. **영향을 받는 타입의 직렬화는 그대로**이며, 토픽별 네트워크 메시지 크기 한도가 정의되어 있어 gossip 한도가 기존 리스트 용량에 의존하지 않습니다.\n\n## 샘플 코드\n\n명세의 변환 패턴을 consensus-specs Python 스타일로 나타냈습니다.\n\n```python\n# Before: tree shape depends on the field count\nclass Foo(Container):\n    a: uint8\n    b: uint16\n\n# After: each field has a stable gindex\nclass Foo(ProgressiveContainer(active_fields=[1, 1])):\n    a: uint8\n    b: uint16\n\n# A later fork appends c and drops a: positions of b and c stay stable\nclass Foo(ProgressiveContainer(active_fields=[0, 1, 1])):\n    b: uint16\n    c: uint32\n```\n\n고정 용량 리스트는 progressive 리스트와 런타임 한도로 바뀝니다.\n\n```python\n# Before\nattestations: List[Attestation, MAX_ATTESTATIONS_ELECTRA]\n# After\nattestations: ProgressiveList[Attestation]\nassert len(body.attestations) \u003c= MAX_ATTESTATIONS_ELECTRA  # enforced in logic\n```\n\n## 알아둘 점\n\n- **상태: Review.** 명세 본문과 변환 대상 타입 목록은 아직 바뀔 수 있습니다. EIP-7495와 EIP-7916에 의존하며, 이들도 Review 단계입니다.\n- 이것이 채택되면 gindex가 한 번 바뀌므로 기존 증명과 검증자는 마지막으로 한 번 업데이트가 필요합니다. 이점은 이후 포크가 다시 이들을 깨뜨리지 않아야 한다는 것입니다.\n- `MAX_TRANSACTIONS_PER_PAYLOAD` 같은 일부 오래된 한도는 더 이상 타입으로 강제되지 않습니다. 다른 제약(gas, 네트워크 메시지 크기)이 실제 크기를 계속 제한합니다.\n- 비콘 상태에 대한 온체인 검증자를 작성한다면 이 EIP를 면밀히 따라가세요. 증명 경로가 얼마나 안정적일지를 결정합니다.\n"},"zh":{"lang":"zh","tldr":"将信标链的 SSZ 类型迁移为 ProgressiveContainer 和 ProgressiveList，使 Merkle 证明在跨分叉后依然有效，同时不改变数据的序列化方式。","tags":["consensus","ssz","merkle","proofs","core"],"related":[7495,7916],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7688/","markdown":"## 它解决什么问题？\n\n`BeaconState`、`BeaconBlockBody` 和 `ExecutionPayload` 等信标链对象都是 SSZ 的 `Container`。SSZ 既定义了它们如何序列化，也定义了如何 Merkle 化，借助 Merkle 根，任何人都可以针对区块根证明单个字段，例如某个验证者没有被 `slashed`。质押池、跨链桥和轻客户端会在智能合约或设备中验证这类证明。\n\n问题在于：使用普通的 `Container` 时，Merkle 树的形状取决于字段数量。当某次分叉增加或移除字段时，其他字段的*广义索引*（gindex，即树中的路径）可能发生移动，所有验证方都必须随分叉计划同步更新。固定容量的 `List[T, N]` 在上限变化时也会引起类似的反复改动。\n\nEIP-7688 为这些结构提供稳定的 Merkle 化，因此只要字段仍然存在，检查 `validator.slashed` 的验证方就能持续正常工作。\n\n## 它如何运作\n\n它应用了两种新的 SSZ 类型：\n\n- **`ProgressiveContainer`**（[EIP-7495](/eip-7495/)）带有一个 `active_fields` 位图。每个字段拥有永久的位置。追加字段的分叉会在位图末尾加一个 `1`；移除字段的分叉则把该字段对应的位设为 `0`，而不是移动其他字段。\n- **`ProgressiveList` / `ProgressiveBitlist`**（[EIP-7916](/eip-7916/)）取代受容量限制的列表。每个元素的 gindex 不依赖于元素数量。上限从类型中移到运行时检查里。\n\n预计会演进的容器会被转换，包括 `Attestation`、`IndexedAttestation`、`ExecutionPayload(Header)`、`ExecutionRequests`、`BeaconBlockBody` 和 `BeaconState`。其中许多列表字段（validators、balances、attestations、withdrawals、deposits 等）会变成 progressive 列表。`Validator`、`Checkpoint` 和 `AttestationData` 等较小的构件被声明为不可变：如果将来需要不兼容的改动，就必须引入新的类型和新的字段名。\n\n只有 Merkle 化发生变化。**受影响类型的序列化保持不变**，并且为各个主题定义了网络消息大小上限，使 gossip 限制不再依赖旧的列表容量。\n\n## 示例代码\n\n规范中的转换模式，采用 consensus-specs 的 Python 风格：\n\n```python\n# Before: tree shape depends on the field count\nclass Foo(Container):\n    a: uint8\n    b: uint16\n\n# After: each field has a stable gindex\nclass Foo(ProgressiveContainer(active_fields=[1, 1])):\n    a: uint8\n    b: uint16\n\n# A later fork appends c and drops a: positions of b and c stay stable\nclass Foo(ProgressiveContainer(active_fields=[0, 1, 1])):\n    b: uint16\n    c: uint32\n```\n\n固定容量的列表变成 progressive 列表加运行时限制：\n\n```python\n# Before\nattestations: List[Attestation, MAX_ATTESTATIONS_ELECTRA]\n# After\nattestations: ProgressiveList[Attestation]\nassert len(body.attestations) \u003c= MAX_ATTESTATIONS_ELECTRA  # enforced in logic\n```\n\n## 需要注意\n\n- **状态：Review。** 规范文本和被转换类型的清单仍可能变化。它依赖 EIP-7495 和 EIP-7916，这两者同样处于 Review 阶段。\n- 采用后，现有的证明和验证方需要最后更新一次，因为 gindex 会变一次。好处是之后的分叉应该不会再次破坏它们。\n- 一些旧的上限，例如 `MAX_TRANSACTIONS_PER_PAYLOAD`，不再由类型强制执行；其他约束（gas、网络消息大小）仍会限制实际大小。\n- 如果你为信标状态编写链上验证合约，请密切关注这个 EIP：它决定了你的证明路径会有多稳定。\n"}},"requiredBy":[8015,8025]}
