Check the payload block hash rule on live nodes before gloas refuses

未关闭
#818 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 6 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust

调研方向

Start with crates/net/p2p/src/beacon/payload_hash.rs and docs/spec_deviations.md; review the existing counters and ignored payload_hash::tests::verify_block_cost test. After deployment, track mismatch and validation overload metrics across the named networks for several days, measure worst case peak memory, and verify final header fields and the envelope counter on Platåberget before changing envelope_verdict to refuse mismatches.

由索引模型根据 Issue 内容生成。

描述

lambdaclass/ethlambda#770 added a rule the consensus specification does not have: beacon p2p rebuilds the execution header from a payload's fields and compares keccak256(rlp(header)) with its block_hash (crates/net/p2p/src/beacon/payload_hash.rs). A pre-gloas gossip block that does not match is IGNOREd. A gloas envelope is only counted and logged, because the Amsterdam header may still change. The PR pinned the encoding with real-chain vectors per fork and a local check over 200 mainnet blocks, but nothing on a running node, which is out of a code review's scope.

What to measure once it is deployed:

  • lean_beacon_payload_block_hash_mismatch_total{kind} on the mainnet, Hoodi, Sepolia and Platåberget followers: it should stay at zero for several days. A non-zero block count means honest blocks are being dropped from gossip. A non-zero envelope count means the gloas encoding is off.
  • Validation-permit saturation on beacon_block: the rate of lean_beacon_gossip_validation_total{kind="beacon_block",reason="overloaded"} before and after. The hash runs inside a gossip_validation_permits permit (about 0.24 ms for a 238-transaction mainnet block, up to 0.6 s for the worst-case block at the size limit; see docs/spec_deviations.md).
  • Peak memory of the worst case (1,048,576 tiny transactions, each copied into the trie). It was not measured; the ignored payload_hash::tests::verify_block_cost could measure it locally.

Before gloas refuses on a mismatch (envelope_verdict in payload_hash.rs):

  • re-pin block_access_list_hash and slot_number against the final EIP-7928 and EIP-7843 header, with a real envelope from a network on the final header;
  • check the envelope counter has stayed at zero on Platåberget.

Refusing would then mean turning envelope_verdict into the same Ignore(PayloadBlockHashMismatch) path block_verdict uses.

主要语言
Rust
星标
86
派生
34
平均合并
9 天 20 小时
30 天内合并 PR
77

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lambdaclass/ethlambda 的其他 Issue

查看 lambdaclass/ethlambda 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。