Claim a gossip block's slot and proposer before its stateful checks
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- backend, networking, security
調査の方向性
Start with crates/net/p2p/src/beacon/verdict.rs and gossip::block::cheap_checks, then trace the stateful checks run on spawn_blocking under gossip_validation_permits. Review payload_hash::tests::verify_block_cost for the hash cost and the validation behavior described in docs/spec_deviations.md. Add a concurrent test for two signed blocks with the same (slot, proposer) and confirm only one is hashed; the issue leaves the fix design open.
索引モデルが issue の本文から書いたものです。
説明
Beacon gossip records a block's (slot, proposer) in P2PServer::seen_blocks only when its verdict reaches the p2p actor (settle in crates/net/p2p/src/beacon/verdict.rs). The stateful checks run before that, on spawn_blocking threads under gossip_validation_permits (128). So several distinct blocks for one slot and proposer that arrive together all pass the cheap checks' AlreadySeen rule (gossip::block::cheap_checks) and are each checked in full:
- the parent-state lookup and the proposer's BLS signature (on
mainalready); - since lambdaclass/ethlambda#770, the payload block hash on an
Accept: a transactions trie and keccak, measured at up to 0.6 s for a block at the 10 MiB gossip limit filled with 1,048,576 tiny transactions (payload_hash::tests::verify_block_cost).
It takes the slot's proposer signing equivocations (slashable) and sending them directly, since honest peers relay only the first. The work is bounded by the permit count: past it, blocks are forwarded unchecked under Overloaded. lambdaclass/ethlambda#770 documents the window in docs/spec_deviations.md and leaves the fix out, because it changes how every block is validated, not only the hash.
Possible fixes:
- A shared claim set keyed by
(slot, proposer)(an LRU sized likeSEEN_BLOCKS_CAPACITY), taken by the blocking task before its signature check, or at least before the hash. A second block for a claimed key answersIgnore(AlreadySeen)without further work. A claim is released when its block fails its signature or an earlier rule, so it never stands for an invalid block, which keeps the specification's "first block with a valid signature". - Independently, a transaction-count budget above which
block_verdictdoes not hash, leaving the block to the execution client. Mainnet's gas limit allows a few thousand transactions, so a cap such as 2^14 would bound the trie without touching real blocks.
A test should send two signed blocks for one key through the stateful checks at once and assert that only one is hashed.
- 主要言語
- 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 日以内に返信