{"eip":7942,"title":"Available Attestation","description":"A reorg-resilient solution for Ethereum","authors":["Mingfei Zhang (@Mart1i1n) \u003cmingfei.zh@outlook.com\u003e","Rujia Li \u003crujia@tsinghua.edu.cn\u003e","Xueqian Lu \u003cxueqian.lu@bitheart.org\u003e","Sisi Duan \u003cduansisi@tsinghua.edu.cn\u003e"],"status":"Draft","type":"Standards Track","category":"Core","created":"2025-04-30","discussionsTo":"https://ethereum-magicians.org/t/eip-7942-available-attestation-a-reorg-resilient-solution-for-ethereum/23927","repo":"EIPs","label":"EIP-7942","officialUrl":"https://eips.ethereum.org/EIPS/eip-7942","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7942.md","url":"https://eips.huatuo.xyz/eip-7942/","tldr":{"en":"A draft consensus change that makes Ethereum proof-of-stake resistant to reorg attacks by only treating a block as stable when it carries attestations from at least one-third of the previous slot's validators, and by switching fork choice to the longest stable chain.","ja":"Ethereum のプルーフ・オブ・ステークを reorg 攻撃に耐えられるようにするドラフトのコンセンサス変更。直前のスロットのバリデーターの少なくとも 3 分の 1 からのアテステーションを持つブロックのみを安定とみなし、フォーク選択を最長の安定チェーンに切り替える。","ko":"직전 슬롯 검증자의 3분의 1 이상이 증명한 블록만 안정적인 블록으로 간주하고 포크 선택을 가장 긴 안정 체인으로 바꿔, 이더리움 지분증명이 리오그 공격에 저항하게 만드는 드래프트 합의 변경.","zh":"一项草案共识层变更，通过仅在区块携带上一个 slot 至少三分之一验证者的见证时才将其视为稳定区块，并把分叉选择改为最长稳定链，使以太坊权益证明能够抵御重组攻击。"},"tags":["consensus","fork-choice","reorg","attestations","security"],"explainers":{"en":{"lang":"en","tldr":"A draft consensus change that makes Ethereum proof-of-stake resistant to reorg attacks by only treating a block as stable when it carries attestations from at least one-third of the previous slot's validators, and by switching fork choice to the longest stable chain.","tags":["consensus","fork-choice","reorg","attestations","security"],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7942/","markdown":"## What problem does it solve?\n\nMany of the known practical attacks on Ethereum's proof-of-stake are **reorganization (reorg) attacks**: malicious validators make honest blocks get orphaned, either by manipulating the weight of competing forks (ex-ante reorgs, balancing attacks, sandwich reorgs) or by getting honest validators to prune the canonical chain (bouncing, justification-withholding and staircase attacks).\n\nThe mitigations deployed so far, such as proposer boosting, were added one at a time. Some opened new holes (proposer boosting enabled the sandwich reorg), and many lack formal proofs or assume the attacker controls only a small share of stake. EIP-7942, based on a peer-reviewed paper by the authors, proposes a single mechanism with a security proof.\n\n## How it works\n\nThe core idea is a **weak quorum**: if more than one-third of validators attested to a block, at least one honest validator has seen and validated it, so the block is provably available.\n\n- **Available Attestation (AA)**: a block in slot `t` that received attestations from more than one-third of slot `t`'s validators is written `AA_t`.\n- **Stable block**: a block in slot `t` whose parent is `AA_{t-1}`, and which includes those attestations as proof. Any other block is **unstable**.\n\nThe proposal makes four changes:\n\n1. **Parent selection**: a proposer builds on the latest AA block if one exists; otherwise it falls back to the fork-choice head (producing an unstable block).\n2. **Longest Stable Chain** fork choice replaces HLMD-GHOST: the head is the chain with the most stable blocks; ties go to the leaf with the highest slot. Weight-based rules are vulnerable to attestation withholding; counting stable blocks is not.\n3. **`unstable_root`**: each block may reference the latest unstable block so its transactions are not lost; they finalize when the referencing block finalizes.\n4. **Simpler filtering and justification**: only chains that justify the latest justified checkpoint are considered, and the mid-epoch \"unrealized\" justification logic is removed. Justification updates only at epoch boundaries.\n\nCasper FFG, the finality gadget, is unchanged, so safety is preserved. The authors argue liveness holds after the network becomes synchronous, and that reorgs are prevented under synchrony.\n\n## Sample code\n\nThe fork-choice change, as given in the spec's pseudocode:\n\n```python\n@dataclass\nclass Chain(object):\n    leaf: Root\n    length: uint64                  # number of stable blocks\n    justified_checkpoint: Checkpoint\n\ndef get_filtered_block_tree(store: Store) -\u003e List[Chain]:\n    # Only chains that justify the latest justified checkpoint are viable\n    return [c for c in store.chains\n            if c.justified_checkpoint.root == store.justified_checkpoint.root]\n\ndef get_head(store: Store) -\u003e Root:\n    chains = get_filtered_block_tree(store)\n    return max(chains, key=lambda c: c.length).leaf   # longest stable chain\n```\n\nProposer-side parent selection, paraphrased:\n\n```python\ndef choose_parent(store, slot):\n    aa = latest_block_with_one_third_attestations(store, slot - 1)\n    if aa is not None:\n        return aa.root          # new block will be stable\n    return get_head(store)      # new block will be unstable\n```\n\n## Things to know\n\n- **Status: Draft.** It is not scheduled for any network upgrade.\n- It changes fork choice, validator duties and the block format, so it would require a hard fork and changes in every consensus client.\n- Committees are sampled randomly, so the one-third threshold per committee only holds with high probability. The spec gives a formula for the per-committee threshold given a target failure probability and argues that with a validator set as large as Ethereum's, one-third of the committee size is an adequate threshold.\n- The reorg-resilience claim applies to synchronous networks; under partial synchrony the claim is standard safety and liveness. Formal proofs are in the authors' companion paper.\n"},"ja":{"lang":"ja","tldr":"Ethereum のプルーフ・オブ・ステークを reorg 攻撃に耐えられるようにするドラフトのコンセンサス変更。直前のスロットのバリデーターの少なくとも 3 分の 1 からのアテステーションを持つブロックのみを安定とみなし、フォーク選択を最長の安定チェーンに切り替える。","tags":["consensus","fork-choice","reorg","attestations","security"],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7942/","markdown":"## 何を解決するのか\n\nEthereum のプルーフ・オブ・ステークに対する既知の実用的な攻撃の多くは、**再編成（reorg）攻撃**です。悪意のあるバリデーターが、競合するフォークの重みを操作することで（ex-ante reorg、バランシング攻撃、サンドイッチ reorg）、あるいは正直なバリデーターに正規チェーンを切り捨てさせることで（バウンシング攻撃、justification withholding 攻撃、階段攻撃）、正直なブロックを孤立させます。\n\nこれまでに導入された緩和策（proposer boosting など）は、1 つずつ追加されてきました。新たな穴を開けたものもあり（proposer boosting はサンドイッチ reorg を可能にしました）、多くは形式的な証明を欠くか、攻撃者がステークの小さな割合しか支配していないと仮定しています。EIP-7942 は、著者らの査読済み論文に基づき、セキュリティ証明つきの単一のメカニズムを提案します。\n\n## 仕組み\n\n中核となるアイデアは**弱いクォーラム**です。バリデーターの 3 分の 1 を超える数があるブロックにアテステーションしたなら、少なくとも 1 人の正直なバリデーターがそれを見て検証しているので、そのブロックが利用可能であることが証明できます。\n\n- **Available Attestation（AA）**: スロット `t` のバリデーターの 3 分の 1 を超える数からアテステーションを受けた、スロット `t` のブロックを `AA_t` と書きます。\n- **安定ブロック**: 親が `AA_{t-1}` であり、その証明としてそれらのアテステーションを含むスロット `t` のブロック。それ以外のブロックは**不安定**です。\n\n提案は 4 つの変更を行います。\n\n1. **親の選択**: プロポーザーは、存在すれば最新の AA ブロックの上にブロックを構築します。存在しなければ、フォーク選択のヘッドにフォールバックします（不安定なブロックが生成されます）。\n2. **Longest Stable Chain** のフォーク選択が HLMD-GHOST を置き換えます。ヘッドは、安定ブロックが最も多いチェーンで、同数の場合はスロットが最も高いリーフが選ばれます。重みに基づくルールはアテステーションの保留に対して脆弱ですが、安定ブロックの数え上げはそうではありません。\n3. **`unstable_root`**: 各ブロックは、トランザクションが失われないよう、最新の不安定なブロックを参照できます。それらは、参照しているブロックがファイナライズされたときにファイナライズされます。\n4. **フィルタリングと justification の簡素化**: 最新の justified チェックポイントを justify するチェーンだけが考慮され、エポック途中の「unrealized」justification のロジックは削除されます。justification の更新はエポック境界でのみ行われます。\n\nファイナリティのガジェットである Casper FFG は変更されないので、セーフティは保たれます。著者らは、ネットワークが同期状態になった後はライブネスが保たれ、同期下では reorg が防止されると主張しています。\n\n## サンプルコード\n\n仕様の疑似コードに示されたフォーク選択の変更:\n\n```python\n@dataclass\nclass Chain(object):\n    leaf: Root\n    length: uint64                  # number of stable blocks\n    justified_checkpoint: Checkpoint\n\ndef get_filtered_block_tree(store: Store) -\u003e List[Chain]:\n    # Only chains that justify the latest justified checkpoint are viable\n    return [c for c in store.chains\n            if c.justified_checkpoint.root == store.justified_checkpoint.root]\n\ndef get_head(store: Store) -\u003e Root:\n    chains = get_filtered_block_tree(store)\n    return max(chains, key=lambda c: c.length).leaf   # longest stable chain\n```\n\nプロポーザー側の親選択（意訳）:\n\n```python\ndef choose_parent(store, slot):\n    aa = latest_block_with_one_third_attestations(store, slot - 1)\n    if aa is not None:\n        return aa.root          # new block will be stable\n    return get_head(store)      # new block will be unstable\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** どのネットワークアップグレードにも予定されていません。\n- フォーク選択、バリデーターの職務、ブロック形式を変更するため、ハードフォークと、すべてのコンセンサスクライアントでの変更が必要になります。\n- 委員会はランダムにサンプリングされるため、委員会ごとの 3 分の 1 のしきい値は高い確率でしか成り立ちません。仕様は、目標とする失敗確率に対する委員会ごとのしきい値の式を示し、Ethereum ほど大きなバリデーターセットであれば、委員会サイズの 3 分の 1 で十分なしきい値になると主張しています。\n- reorg 耐性の主張は同期ネットワークに当てはまります。部分同期下では、主張は標準的なセーフティとライブネスです。形式的な証明は著者らの関連論文にあります。\n"},"ko":{"lang":"ko","tldr":"직전 슬롯 검증자의 3분의 1 이상이 증명한 블록만 안정적인 블록으로 간주하고 포크 선택을 가장 긴 안정 체인으로 바꿔, 이더리움 지분증명이 리오그 공격에 저항하게 만드는 드래프트 합의 변경.","tags":["consensus","fork-choice","reorg","attestations","security"],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7942/","markdown":"## 어떤 문제를 해결하나요?\n\n이더리움 지분증명에 대해 알려진 실용적 공격의 상당수는 **리오가나이제이션(reorg) 공격**입니다. 악의적인 검증자가 경쟁하는 포크의 가중치를 조작하거나(사전 리오그, 밸런싱 공격, 샌드위치 리오그), 정직한 검증자가 정규 체인을 잘라 내도록 유도해(바운싱, justification 보류, 계단식 공격) 정직한 블록을 고아로 만듭니다.\n\n지금까지 배포된 완화책들, 예를 들어 proposer boosting은 하나씩 추가되었습니다. 일부는 새로운 구멍을 만들었고(proposer boosting이 샌드위치 리오그를 가능하게 했습니다), 많은 경우 형식적 증명이 없거나 공격자가 지분의 작은 비중만 통제한다고 가정합니다. EIP-7942는 저자들의 동료 심사 논문에 기반해, 보안 증명이 있는 단일 메커니즘을 제안합니다.\n\n## 어떻게 동작하나요?\n\n핵심 아이디어는 **약한 쿼럼**입니다. 검증자의 3분의 1을 넘는 수가 어떤 블록을 증명했다면 정직한 검증자가 적어도 한 명은 그것을 보고 검증한 것이므로, 그 블록은 가용하다고 증명됩니다.\n\n- **Available Attestation(AA)**: 슬롯 `t`의 검증자 3분의 1을 넘는 수로부터 증명을 받은 슬롯 `t`의 블록을 `AA_t`라고 씁니다.\n- **안정 블록**: 부모가 `AA_{t-1}`이고, 그 증명으로 해당 증명들을 포함하는 슬롯 `t`의 블록. 그 밖의 블록은 **불안정**합니다.\n\n제안은 네 가지를 바꿉니다.\n\n1. **부모 선택**: 제안자는 최신 AA 블록이 있으면 그 위에 블록을 만들고, 없으면 포크 선택의 헤드로 되돌아갑니다(불안정한 블록이 만들어집니다).\n2. **Longest Stable Chain** 포크 선택이 HLMD-GHOST를 대체합니다. 헤드는 안정 블록이 가장 많은 체인이며, 동률이면 슬롯이 가장 높은 리프가 이깁니다. 가중치 기반 규칙은 증명 보류에 취약하지만, 안정 블록 개수를 세는 방식은 그렇지 않습니다.\n3. **`unstable_root`**: 각 블록은 트랜잭션이 유실되지 않도록 최신 불안정 블록을 참조할 수 있습니다. 이 트랜잭션들은 참조한 블록이 확정될 때 함께 확정됩니다.\n4. **더 단순한 필터링과 justification**: 최신 justified 체크포인트를 justify하는 체인만 고려하고, 에폭 중간의 \"unrealized\" justification 로직은 제거합니다. justification은 에폭 경계에서만 갱신됩니다.\n\n최종성 장치인 Casper FFG는 바뀌지 않으므로 안전성은 유지됩니다. 저자들은 네트워크가 동기 상태가 된 뒤에는 활성이 유지되고, 동기 상태에서는 리오그가 방지된다고 주장합니다.\n\n## 샘플 코드\n\n명세의 의사 코드에 나온 포크 선택 변경:\n\n```python\n@dataclass\nclass Chain(object):\n    leaf: Root\n    length: uint64                  # number of stable blocks\n    justified_checkpoint: Checkpoint\n\ndef get_filtered_block_tree(store: Store) -\u003e List[Chain]:\n    # Only chains that justify the latest justified checkpoint are viable\n    return [c for c in store.chains\n            if c.justified_checkpoint.root == store.justified_checkpoint.root]\n\ndef get_head(store: Store) -\u003e Root:\n    chains = get_filtered_block_tree(store)\n    return max(chains, key=lambda c: c.length).leaf   # longest stable chain\n```\n\n제안자 측 부모 선택(의역):\n\n```python\ndef choose_parent(store, slot):\n    aa = latest_block_with_one_third_attestations(store, slot - 1)\n    if aa is not None:\n        return aa.root          # new block will be stable\n    return get_head(store)      # new block will be unstable\n```\n\n## 알아둘 점\n\n- **상태: Draft.** 어떤 네트워크 업그레이드에도 예정되어 있지 않습니다.\n- 포크 선택, 검증자 의무, 블록 형식을 바꾸므로 하드 포크와 모든 합의 클라이언트의 변경이 필요합니다.\n- 위원회는 무작위로 샘플링되므로, 위원회별 3분의 1 임계값은 높은 확률로만 성립합니다. 명세는 목표 실패 확률에 따른 위원회별 임계값 공식을 제시하고, 이더리움처럼 큰 검증자 집합에서는 위원회 크기의 3분의 1이 충분한 임계값이라고 주장합니다.\n- 리오그 복원력에 대한 주장은 동기 네트워크에 적용되며, 부분 동기 하에서는 일반적인 안전성과 활성에 대한 주장입니다. 형식적 증명은 저자들의 동반 논문에 있습니다.\n"},"zh":{"lang":"zh","tldr":"一项草案共识层变更，通过仅在区块携带上一个 slot 至少三分之一验证者的见证时才将其视为稳定区块，并把分叉选择改为最长稳定链，使以太坊权益证明能够抵御重组攻击。","tags":["consensus","fork-choice","reorg","attestations","security"],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7942/","markdown":"## 它解决什么问题？\n\n针对以太坊权益证明的许多已知实际攻击都是**重组（reorg）攻击**：恶意验证者要么通过操纵相互竞争的分叉的权重（事前重组、平衡攻击、三明治重组），要么诱使诚实验证者修剪规范链（弹跳攻击、扣留 justification 攻击和阶梯攻击），使诚实区块被孤立。\n\n迄今部署的缓解措施，例如 proposer boosting，都是逐个加入的。有些措施打开了新的漏洞（proposer boosting 使三明治重组成为可能），许多措施缺乏形式化证明，或假定攻击者只控制一小部分质押。EIP-7942 基于作者们经同行评审的论文，提出了一个带有安全性证明的统一机制。\n\n## 它如何运作\n\n核心思想是**弱法定人数**：如果超过三分之一的验证者对某个区块做了见证，那么至少有一位诚实验证者看到并验证过它，因此该区块可证明是可用的。\n\n- **Available Attestation（AA）**：slot `t` 中的某个区块，如果获得了 slot `t` 超过三分之一验证者的见证，则记为 `AA_t`。\n- **稳定区块**：slot `t` 中的区块，其父区块是 `AA_{t-1}`，并且包含这些见证作为证明。任何其他区块都是**不稳定**的。\n\n该提案做了四项改动：\n\n1. **父区块选择**：如果存在最新的 AA 区块，提议者就在其基础上构建；否则回退到分叉选择的头部（产生一个不稳定区块）。\n2. **最长稳定链（Longest Stable Chain）** 分叉选择取代 HLMD-GHOST：头部是稳定区块最多的那条链；出现平局时，取 slot 最高的叶子。基于权重的规则容易受到见证扣留的攻击；而统计稳定区块则不会。\n3. **`unstable_root`**：每个区块可以引用最新的不稳定区块，使其交易不会丢失；它们会在引用它的区块最终确认时一并最终确认。\n4. **更简单的过滤和 justification**：只考虑能 justify 最新 justified 检查点的链，并移除了纪元中途的\"未实现\"justification 逻辑。justification 只在纪元边界更新。\n\n最终性机制 Casper FFG 保持不变，因此安全性得以保留。作者认为，网络变为同步后活性成立，并且在同步条件下可以防止重组。\n\n## 示例代码\n\n分叉选择的改动，来自规范的伪代码：\n\n```python\n@dataclass\nclass Chain(object):\n    leaf: Root\n    length: uint64                  # number of stable blocks\n    justified_checkpoint: Checkpoint\n\ndef get_filtered_block_tree(store: Store) -\u003e List[Chain]:\n    # Only chains that justify the latest justified checkpoint are viable\n    return [c for c in store.chains\n            if c.justified_checkpoint.root == store.justified_checkpoint.root]\n\ndef get_head(store: Store) -\u003e Root:\n    chains = get_filtered_block_tree(store)\n    return max(chains, key=lambda c: c.length).leaf   # longest stable chain\n```\n\n提议者一侧的父区块选择（意译）：\n\n```python\ndef choose_parent(store, slot):\n    aa = latest_block_with_one_third_attestations(store, slot - 1)\n    if aa is not None:\n        return aa.root          # new block will be stable\n    return get_head(store)      # new block will be unstable\n```\n\n## 需要注意\n\n- **状态：Draft。** 它没有被安排进任何网络升级。\n- 它改变了分叉选择、验证者职责和区块格式，因此需要一次硬分叉，并要求所有共识客户端都做出修改。\n- 委员会是随机抽样的，所以每个委员会三分之一的阈值只能以高概率成立。规范给出了在目标失败概率下每个委员会阈值的公式，并认为在像以太坊这样庞大的验证者集合下，委员会规模的三分之一是一个足够合适的阈值。\n- 抗重组的结论适用于同步网络；在部分同步下，结论是标准的安全性和活性。形式化证明见作者的配套论文。\n"}}}
