Beacon API: resolve state roots and the genesis id, and serve states/{state_id}/root
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with docs/spec_deviations.md ("block_id cannot name genesis...") and docs/rpc.md to see the current contract, then read the store that keys states by block root and the Table::BlockRoots anchor logic, since the new state-root index has to be written at import and pruned alongside States/StateDiffs. Find the existing debug beacon states handler to add the 0x state-root and anchor-at-slot-0 genesis resolution, then add the GET /eth/v1/beacon/states/{state_id}/root route next to the other state routes. Done means both ids resolve for locally built devnets, the 404 stays for checkpoint-synced directories, and both docs pages and the rpc.md heading list are updated.
索引モデルが issue の本文から書いたものです。
説明
Problem. Three of ethereum-package's tools load beacon states by state root or by genesis, and ethlambda refuses both. These findings come from reading each tool's source against main (b2722cfd); nothing was run.
- checkpointz (the package runs it in
fullmode): it downloads the finalized bundle's state withGET /eth/v2/debug/beacon/states/0x<state_root>, gets a 404, and never serves a checkpoint. So no node can checkpoint-sync from it. It also asks for blockgenesisevery 15 s and logs "invalid genesis block". - dora: it loads every state with
0x<state_root>orgenesis. Blocks are indexed, but nothing derived from a state is: the validator set, the duties, epoch participation and the validator pages are all missing. - tracoor: it captures no states. Its first call,
GET /eth/v1/beacon/states/{slot}/root, is not served. With that route it would then ask for the state by state root, which is refused too.
Both refusals are deliberate (docs/spec_deviations.md, "block_id cannot name genesis, and state_id cannot be a state root"):
- states are keyed by block root, with no reverse index;
Table::BlockRootsstarts above the store's anchor, and a checkpoint-synced directory has no genesis block anyway.
Fix.
- Index state root to block root for the states the store holds, written at import and pruned with
States/StateDiffs. Resolve a0xstate_idthrough it. - Serve
GET /eth/v1/beacon/states/{state_id}/root. - Resolve
genesis, on either id, when the store's anchor is at slot 0: that anchor is the genesis block and state, as on every devnet that starts from its owngenesis.ssz. Keep the 404 for a checkpoint-synced directory. - Update docs/spec_deviations.md and docs/rpc.md. The rpc.md heading "Accepted ids, and three that are refused" lists only two.
- 主要言語
- Rust
- スター
- 86
- フォーク
- 34
- 平均マージ
- 9日 20時間
- マージ済み PR(30日)
- 77
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
lambdaclass/ethlambda のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
lambdaclass/ethlambda#850 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lambdaclass/ethlambda#777 · リアクション 1 件 ·
メンテナーはふだん 6 日以内に返信
-
Run all gossip validation tests再び着手できるかも @dicethedev が 9 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
lambdaclass/ethlambda#725 · コメント 2 件 ·
メンテナーはふだん 6 日以内に返信
-
Handle malformed DB data再び着手できるかも @dicethedev が 115 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
lambdaclass/ethlambda#529 · コメント 4 件 ·
メンテナーはふだん 6 日以内に返信
-
Document architectural choices再び着手できるかも @dicethedev が 115 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lambdaclass/ethlambda#521 · コメント 2 件 ·
メンテナーはふだん 6 日以内に返信
lambdaclass/ethlambda の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
bytecodealliance/wrpc#1785 ·
メンテナーはふだん 1 日以内に返信
-
2 advisory ignore entries no longer match anything (`quick-xml` already patched in `Cargo.lock`)オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
longbridge/nsh#2758 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
antithesishq/bombadil#473 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
libracoder/kiri#669 ·
メンテナーはふだん 1 日以内に返信