{"eip":7045,"title":"Increase max attestation inclusion slot","description":"Increases max attestation inclusion slot to the last slot in `N+1` where `N` is the epoch containing the attestation's slot.","authors":["Danny Ryan (@djrtwo)"],"status":"Final","type":"Standards Track","category":"Core","created":"2023-05-18","discussionsTo":"https://ethereum-magicians.org/t/eip-7045-increase-attestation-slot-inclusion-range/14342","repo":"EIPs","label":"EIP-7045","officialUrl":"https://eips.ethereum.org/EIPS/eip-7045","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7045.md","url":"https://eips.huatuo.xyz/eip-7045/","tldr":{"en":"Lets beacon-chain attestations be included until the end of the epoch after the one they were made in, strengthening LMD-GHOST security and enabling a fast confirmation rule; shipped in Deneb.","ja":"ビーコンチェーンのアテステーションを、作成されたエポックの次のエポックの終わりまで取り込めるようにする。LMD-GHOST のセキュリティを強化し、高速な確認ルールを可能にする。Deneb で導入された。","ko":"비콘 체인 어테스테이션이 작성된 에포크의 다음 에포크가 끝날 때까지 포함될 수 있게 한다. LMD-GHOST 보안을 강화하고 빠른 확인 규칙을 가능하게 한다. Deneb에서 적용되었다.","zh":"允许信标链的证明（attestation）在其产生所在 epoch 的下一个 epoch 结束之前都可以被打包，增强 LMD-GHOST 的安全性并支持快速确认规则；已随 Deneb 上线。"},"tags":["consensus","attestations","beacon-chain","deneb","dencun"],"explainers":{"en":{"lang":"en","tldr":"Lets beacon-chain attestations be included until the end of the epoch after the one they were made in, strengthening LMD-GHOST security and enabling a fast confirmation rule; shipped in Deneb.","tags":["consensus","attestations","beacon-chain","deneb","dencun"],"related":[4844,4788,7044,7514,1153],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7045/","markdown":"## What problem does it solve?\n\nValidators publish attestations (votes) every epoch, and block proposers include them in blocks. Before this change, an attestation made in slot `s` could only be included up to slot `s + SLOTS_PER_EPOCH` (32 slots later on mainnet). This sliding one-epoch window was chosen in Phase 0 because it gave every attestation the same amount of time.\n\nLater research showed that the alternative, allowing inclusion through the **current and the next epoch**, is what the LMD-GHOST fork-choice security proofs need. It also enables a new **confirmation rule** that can treat blocks as confirmed after roughly 3-4 slots in normal mainnet conditions.\n\n## How it works\n\nThe max inclusion slot changes from \"attestation slot + 32\" to \"**the last slot of epoch N+1**\", where N is the epoch containing the attestation's slot. Attestations made early in an epoch now get a longer window than those made late in it.\n\nThis is a consensus-layer change only. It was included in the **Deneb** consensus upgrade, which activated together with Cancun as Dencun on mainnet. The execution layer is unchanged. The concrete changes:\n\n- **`process_attestation`**: the upper bound on the slot is removed. Validity now comes from the minimum inclusion delay plus the rule that the attestation's target epoch is the current or previous epoch.\n- **`get_attestation_participation_flag_indices`**: `TIMELY_TARGET_FLAG` is set regardless of `inclusion_delay`, so a late but valid attestation with a correct target vote still earns a non-zero reward. That keeps proposers motivated to include them.\n- **P2P gossip** for attestations and aggregates is widened to propagate during the extended range.\n\nThe fork timestamp listed in the spec for mainnet is `1710338135`.\n\n## Sample code\n\nSimplified before/after of the inclusion check (consensus-spec style Python):\n\n```python\n# Before (Altair..Capella)\nassert data.target.epoch in (get_previous_epoch(state), get_current_epoch(state))\nassert data.slot + MIN_ATTESTATION_INCLUSION_DELAY \u003c= state.slot \u003c= data.slot + SLOTS_PER_EPOCH\n\n# After (Deneb, EIP-7045): no upper slot bound;\n# the target-epoch check alone limits inclusion to the end of epoch N+1\nassert data.target.epoch in (get_previous_epoch(state), get_current_epoch(state))\nassert data.slot + MIN_ATTESTATION_INCLUSION_DELAY \u003c= state.slot\n```\n\nAnd the reward-flag change:\n\n```python\n# Before\nif is_matching_target and inclusion_delay \u003c= SLOTS_PER_EPOCH:\n    participation_flag_indices.append(TIMELY_TARGET_FLAG_INDEX)\n\n# After (Deneb)\nif is_matching_target:\n    participation_flag_indices.append(TIMELY_TARGET_FLAG_INDEX)\n```\n\n## Things to know\n\n- **Status: Final**, live on mainnet since the Deneb upgrade. It required a hard fork because it changes block validity rules.\n- The source and head timeliness flags are unchanged. Only the target reward is decoupled from inclusion delay, so late attestations still earn less in total than timely ones.\n- Validators do not need to change anything. Client software handles the wider window.\n- Other consensus-side changes in the same upgrade include [EIP-7044](/eip-7044/) (perpetually valid voluntary exits) and [EIP-7514](/eip-7514/) (max epoch churn limit); [EIP-4844](/eip-4844/) blobs were the headline feature of Dencun.\n"},"ja":{"lang":"ja","tldr":"ビーコンチェーンのアテステーションを、作成されたエポックの次のエポックの終わりまで取り込めるようにする。LMD-GHOST のセキュリティを強化し、高速な確認ルールを可能にする。Deneb で導入された。","tags":["consensus","attestations","beacon-chain","deneb","dencun"],"related":[4844,4788,7044,7514,1153],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7045/","markdown":"## 何を解決するのか\n\nバリデーターはエポックごとにアテステーション（投票）を公開し、ブロック提案者がそれをブロックに取り込みます。この変更以前は、スロット `s` で作成されたアテステーションは、スロット `s + SLOTS_PER_EPOCH`（メインネットでは 32 スロット後）までしか取り込めませんでした。この 1 エポックのスライディングウィンドウは、すべてのアテステーションに同じ長さの猶予を与えるため、Phase 0 で選ばれたものです。\n\nその後の研究で、代替案である**現在のエポックと次のエポック**を通じた取り込みの許可こそが、LMD-GHOST フォークチョイスのセキュリティ証明に必要であることが分かりました。また、通常のメインネット条件下でおよそ 3〜4 スロット後にブロックを確認済みとみなせる、新しい**確認ルール**も可能になります。\n\n## 仕組み\n\n最大取り込みスロットは「アテステーションのスロット + 32」から「**エポック N+1 の最後のスロット**」に変わります。ここで N はアテステーションのスロットを含むエポックです。エポックの早い時点で作られたアテステーションは、遅い時点で作られたものより長い猶予を得ます。\n\nこれはコンセンサスレイヤーのみの変更です。Cancun と同時にメインネットで有効化された **Deneb** コンセンサスアップグレード（Dencun）に含まれました。実行レイヤーは変更されません。具体的な変更点は次のとおりです。\n\n- **`process_attestation`**: スロットの上限が削除されます。有効性は、最小取り込み遅延と、アテステーションのターゲットエポックが現在または直前のエポックであるという規則から決まります。\n- **`get_attestation_participation_flag_indices`**: `inclusion_delay` に関係なく `TIMELY_TARGET_FLAG` が設定されるため、遅れても有効で、ターゲット投票が正しいアテステーションはゼロでない報酬を得られます。これにより、提案者がそれらを取り込む動機が保たれます。\n- アテステーションとアグリゲートの **P2P ゴシップ**は、拡張された範囲でも伝播するよう広げられます。\n\n仕様に記載されているメインネットのフォークタイムスタンプは `1710338135` です。\n\n## サンプルコード\n\n取り込みチェックの変更前後を簡略化したもの（consensus-spec スタイルの Python）:\n\n```python\n# Before (Altair..Capella)\nassert data.target.epoch in (get_previous_epoch(state), get_current_epoch(state))\nassert data.slot + MIN_ATTESTATION_INCLUSION_DELAY \u003c= state.slot \u003c= data.slot + SLOTS_PER_EPOCH\n\n# After (Deneb, EIP-7045): no upper slot bound;\n# the target-epoch check alone limits inclusion to the end of epoch N+1\nassert data.target.epoch in (get_previous_epoch(state), get_current_epoch(state))\nassert data.slot + MIN_ATTESTATION_INCLUSION_DELAY \u003c= state.slot\n```\n\n報酬フラグの変更:\n\n```python\n# Before\nif is_matching_target and inclusion_delay \u003c= SLOTS_PER_EPOCH:\n    participation_flag_indices.append(TIMELY_TARGET_FLAG_INDEX)\n\n# After (Deneb)\nif is_matching_target:\n    participation_flag_indices.append(TIMELY_TARGET_FLAG_INDEX)\n```\n\n## 知っておくべきこと\n\n- **ステータス: Final。** Deneb アップグレード以降、メインネットで稼働しています。ブロックの有効性ルールを変更するため、ハードフォークが必要でした。\n- source と head のタイムリネスフラグは変更されていません。target の報酬だけが取り込み遅延から切り離されたため、遅れたアテステーションの合計報酬は、遅れなかったものより依然として少なくなります。\n- バリデーターは何も変更する必要はありません。拡張されたウィンドウはクライアントソフトウェアが処理します。\n- 同じアップグレードに含まれる他のコンセンサス側の変更には、[EIP-7044](/eip-7044/)（永続的に有効な自発的退出）と [EIP-7514](/eip-7514/)（エポックあたりの最大 churn 上限）があります。Dencun の目玉機能は [EIP-4844](/eip-4844/) の blob でした。\n"},"ko":{"lang":"ko","tldr":"비콘 체인 어테스테이션이 작성된 에포크의 다음 에포크가 끝날 때까지 포함될 수 있게 한다. LMD-GHOST 보안을 강화하고 빠른 확인 규칙을 가능하게 한다. Deneb에서 적용되었다.","tags":["consensus","attestations","beacon-chain","deneb","dencun"],"related":[4844,4788,7044,7514,1153],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7045/","markdown":"## 어떤 문제를 해결하나요?\n\n검증자는 에포크마다 어테스테이션(투표)을 발행하고, 블록 제안자는 이를 블록에 포함합니다. 이 변경 이전에는 슬롯 `s`에서 만든 어테스테이션을 슬롯 `s + SLOTS_PER_EPOCH`(메인넷에서는 32슬롯 뒤)까지만 포함할 수 있었습니다. 이 한 에포크짜리 슬라이딩 윈도우는 모든 어테스테이션에 같은 시간을 주기 때문에 Phase 0에서 선택되었습니다.\n\n이후 연구에서, **현재 에포크와 다음 에포크** 동안 포함을 허용하는 대안이 LMD-GHOST 포크 선택 보안 증명에 필요하다는 것이 밝혀졌습니다. 또한 일반적인 메인넷 조건에서 대략 3~4슬롯 뒤에 블록을 확정된 것으로 볼 수 있는 새로운 **확인 규칙**도 가능해집니다.\n\n## 어떻게 동작하나요?\n\n최대 포함 슬롯이 \"어테스테이션 슬롯 + 32\"에서 \"**에포크 N+1의 마지막 슬롯**\"으로 바뀝니다. 여기서 N은 어테스테이션의 슬롯이 속한 에포크입니다. 에포크 초반에 만든 어테스테이션은 후반에 만든 것보다 더 긴 윈도우를 갖게 됩니다.\n\n이는 합의 계층만의 변경입니다. Cancun과 함께 메인넷에서 Dencun으로 활성화된 **Deneb** 합의 업그레이드에 포함되었습니다. 실행 계층은 변하지 않습니다. 구체적인 변경 사항은 다음과 같습니다.\n\n- **`process_attestation`**: 슬롯 상한이 제거됩니다. 이제 유효성은 최소 포함 지연과, 어테스테이션의 타깃 에포크가 현재 또는 이전 에포크여야 한다는 규칙에서 결정됩니다.\n- **`get_attestation_participation_flag_indices`**: `inclusion_delay`와 관계없이 `TIMELY_TARGET_FLAG`가 설정되므로, 늦었더라도 유효하고 타깃 투표가 올바른 어테스테이션은 0이 아닌 보상을 받습니다. 덕분에 제안자가 이를 계속 포함할 동기가 유지됩니다.\n- 어테스테이션과 어그리게이트의 **P2P 가십**이 확장된 범위에서도 전파되도록 넓어집니다.\n\n명세에 나온 메인넷 포크 타임스탬프는 `1710338135`입니다.\n\n## 샘플 코드\n\n포함 검사의 변경 전후를 단순화한 코드(consensus-spec 스타일 Python):\n\n```python\n# Before (Altair..Capella)\nassert data.target.epoch in (get_previous_epoch(state), get_current_epoch(state))\nassert data.slot + MIN_ATTESTATION_INCLUSION_DELAY \u003c= state.slot \u003c= data.slot + SLOTS_PER_EPOCH\n\n# After (Deneb, EIP-7045): no upper slot bound;\n# the target-epoch check alone limits inclusion to the end of epoch N+1\nassert data.target.epoch in (get_previous_epoch(state), get_current_epoch(state))\nassert data.slot + MIN_ATTESTATION_INCLUSION_DELAY \u003c= state.slot\n```\n\n그리고 보상 플래그 변경:\n\n```python\n# Before\nif is_matching_target and inclusion_delay \u003c= SLOTS_PER_EPOCH:\n    participation_flag_indices.append(TIMELY_TARGET_FLAG_INDEX)\n\n# After (Deneb)\nif is_matching_target:\n    participation_flag_indices.append(TIMELY_TARGET_FLAG_INDEX)\n```\n\n## 알아둘 점\n\n- **상태: Final.** Deneb 업그레이드 이후 메인넷에서 동작 중입니다. 블록 유효성 규칙을 바꾸기 때문에 하드 포크가 필요했습니다.\n- source 및 head 적시성 플래그는 바뀌지 않았습니다. 타깃 보상만 포함 지연에서 분리되었으므로, 늦은 어테스테이션은 여전히 제때 포함된 것보다 총 보상이 적습니다.\n- 검증자는 아무것도 바꿀 필요가 없습니다. 넓어진 윈도우는 클라이언트 소프트웨어가 처리합니다.\n- 같은 업그레이드에 포함된 다른 합의 측 변경으로는 [EIP-7044](/eip-7044/)(영구적으로 유효한 자발적 종료)와 [EIP-7514](/eip-7514/)(최대 에포크 churn 한도)가 있습니다. Dencun의 대표 기능은 [EIP-4844](/eip-4844/) blob이었습니다.\n"},"zh":{"lang":"zh","tldr":"允许信标链的证明（attestation）在其产生所在 epoch 的下一个 epoch 结束之前都可以被打包，增强 LMD-GHOST 的安全性并支持快速确认规则；已随 Deneb 上线。","tags":["consensus","attestations","beacon-chain","deneb","dencun"],"related":[4844,4788,7044,7514,1153],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7045/","markdown":"## 它解决什么问题？\n\n验证者每个 epoch 都会发布证明（投票），区块提议者把它们打包进区块。在这一变更之前，在 slot `s` 产生的证明只能被打包到 slot `s + SLOTS_PER_EPOCH`（主网上是 32 个 slot 之后）。这个滑动的一个 epoch 窗口是在 Phase 0 选定的，因为它给每个证明提供了相同的时间。\n\n后来的研究表明，另一种方案，即允许在**当前和下一个 epoch** 内打包，才是 LMD-GHOST 分叉选择安全性证明所需要的。它还支持一种新的**确认规则**，在正常的主网条件下，大约 3-4 个 slot 后就可以把区块视为已确认。\n\n## 它如何运作\n\n最大打包 slot 从\"证明所在 slot + 32\"改为\"**epoch N+1 的最后一个 slot**\"，其中 N 是证明所在 slot 所属的 epoch。在 epoch 早期产生的证明现在比晚期产生的拥有更长的窗口。\n\n这仅是共识层的变更。它包含在 **Deneb** 共识层升级中，该升级与 Cancun 一起在主网上作为 Dencun 激活。执行层不变。具体变更如下：\n\n- **`process_attestation`**：移除了 slot 的上限。有效性现在由最小打包延迟，加上证明的目标 epoch 必须是当前或上一个 epoch 这一规则决定。\n- **`get_attestation_participation_flag_indices`**：无论 `inclusion_delay` 是多少都会设置 `TIMELY_TARGET_FLAG`，因此迟到但有效且目标投票正确的证明仍能获得非零奖励。这让提议者仍有动力打包它们。\n- 证明和聚合的 **P2P gossip** 被放宽，以便在延长的范围内传播。\n\n规范中列出的主网分叉时间戳为 `1710338135`。\n\n## 示例代码\n\n打包检查的简化前后对比（共识规范风格的 Python）：\n\n```python\n# Before (Altair..Capella)\nassert data.target.epoch in (get_previous_epoch(state), get_current_epoch(state))\nassert data.slot + MIN_ATTESTATION_INCLUSION_DELAY \u003c= state.slot \u003c= data.slot + SLOTS_PER_EPOCH\n\n# After (Deneb, EIP-7045): no upper slot bound;\n# the target-epoch check alone limits inclusion to the end of epoch N+1\nassert data.target.epoch in (get_previous_epoch(state), get_current_epoch(state))\nassert data.slot + MIN_ATTESTATION_INCLUSION_DELAY \u003c= state.slot\n```\n\n以及奖励标志的变更：\n\n```python\n# Before\nif is_matching_target and inclusion_delay \u003c= SLOTS_PER_EPOCH:\n    participation_flag_indices.append(TIMELY_TARGET_FLAG_INDEX)\n\n# After (Deneb)\nif is_matching_target:\n    participation_flag_indices.append(TIMELY_TARGET_FLAG_INDEX)\n```\n\n## 需要注意\n\n- **状态：Final**，自 Deneb 升级起已在主网上线。由于它改变了区块有效性规则，因此需要一次硬分叉。\n- source 和 head 的及时性标志不变。只有 target 奖励与打包延迟脱钩，因此迟到的证明总体上获得的奖励仍低于及时的证明。\n- 验证者无需做任何改动。更宽的窗口由客户端软件处理。\n- 同一次升级中的其他共识层变更包括 [EIP-7044](/eip-7044/)（永久有效的自愿退出）和 [EIP-7514](/eip-7514/)（最大 epoch 流动上限）；[EIP-4844](/eip-4844/) 的 blob 是 Dencun 的头条特性。\n"}},"requiredBy":[7569]}
