Bound how far Beacon API requests can advance a state before validating them
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
Read the implementations and related PRs #663, #671, and #646 for the attester and proposer duties, sync duties, and block publication paths. Trace where each path calls process_slots and how it determines the head, then inspect the relevant tests. Done means each path rejects requests that would advance too far when the head lags, while preserving the stated late or missing boundary block cases.
由索引模型根据 Issue 内容生成。
描述
Several Beacon API paths advance a stored state with process_slots to answer a request, bounded only by the wall clock, not by the head. With the head lagging the clock (syncing, stalled, or behind after downtime) — or with an attacker choosing an old parent — one request can run hundreds of epoch transitions (~0.7–0.9 s each on mainnet, per #632/#633) on a blocking thread. The cache doesn't save it: its key includes the head root, which moves while syncing.
The existing 503 while-syncing guards don't cover this: SyncStatusController reports synced during a beacon catch-up (#636, "still open" #1).
| Path | PR | Advance | Status |
|---|---|---|---|
POST /eth/v1/validator/duties/attester/{epoch}, GET /eth/v{1,2}/validator/duties/proposer/{epoch} |
#663 | head → wall_epoch + 1 |
merged without a cap ("fix in another PR") |
POST /eth/v1/validator/duties/sync/{epoch} |
#671 | head → first epoch of clock_period (a period is 256 epochs) |
approved, cap requested |
POST /eth/v2/beacon/blocks |
#646 | any known parent → block slot, before the signature check | cap requested |
Proposal
- Duties (#663):
503whenepoch > head_epoch + 2. - Sync duties (#671): only advance when
first_epoch(requested_period - 1) <= head_epoch + 1, else503. This also avoids answering a committee the chain may not produce: sync duties carry nodependent_root, so a VC can't detect a wrong answer. - Block publication (#646):
400when the parent is below the finalized checkpoint or more than a couple of epochs behind the block's slot.
Each keeps the honest case these PRs were written for (a late or missing boundary block) and refuses the expensive, speculative ones. A test per path with the head several epochs behind the clock should assert the refusal.
- 主要语言
- Rust
- 星标
- 86
- 派生
- 34
- 平均合并
- 9 天 20 小时
- 30 天内合并 PR
- 77
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lambdaclass/ethlambda 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
lambdaclass/ethlambda#850 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
lambdaclass/ethlambda#777 · 1 个 reaction ·
维护者通常 6 天内回复
-
Run all gossip validation tests可能重新可做 @dicethedev 于 9 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
lambdaclass/ethlambda#725 · 2 条评论 ·
维护者通常 6 天内回复
-
Handle malformed DB data可能重新可做 @dicethedev 于 115 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
lambdaclass/ethlambda#529 · 4 条评论 ·
维护者通常 6 天内回复
-
Document architectural choices可能重新可做 @dicethedev 于 115 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
lambdaclass/ethlambda#521 · 2 条评论 ·
维护者通常 6 天内回复
查看 lambdaclass/ethlambda 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
antithesishq/bombadil#473 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
libracoder/kiri#669 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 5 天内回复
-
autofixer: follow-up
难度 2/5 1-3 小时 新手友好度 75/100
tursodatabase/turso#12217 ·
维护者通常 1 天内回复
-
Declare the CMS schema library in the optional recipients extra可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area:python in-progress
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复