Label a beacon block published through the Beacon API as local, not gossip

未關閉
#846 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 6 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
57/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
rust

研究方向

Start in crates/net/p2p/src/gossipsub/handler.rs at the cited publish_beacon_block and custody labeling lines, then trace every BlockSource reader and the import_timing::source_label mapping. Check how fork choice timeliness and import metrics handle a local block, and read docs/telemetry.md's Known gaps entry. Done means published block rows use local, the gap is removed, and a test covers the source label.

由索引模型根據 Issue 內容生成。

描述

Problem. publish_beacon_block hands the block a validator client published to the chain actor as BlockSource::Gossip (crates/net/p2p/src/gossipsub/handler.rs:999-1004), though it never crossed the wire.

Its telemetry rows (lambdaclass/ethlambda#765) are therefore filed under source = 'gossip' with near-zero arrival latency, mixed into the arrival distribution every cross-client comparison reads. docs/telemetry.md ("Known gaps") lists this, with the workaround of filtering on the missing decode_end row. The same path already labels the block's custody columns local (handler.rs:985-992), so blocks and columns disagree.

Why not in lambdaclass/ethlambda#765. BlockSource is not a telemetry type. It is the chain actor's view of how a block arrived, and it feeds more than the rows: import metrics and timeliness bookkeeping, for instance. A new variant is a change to ethlambda-network-api and every match on it, to be checked for each reader rather than slipped into a telemetry PR.

Fix.

  • Add a BlockSource::Local variant, sent by publish_beacon_block.
  • Give it the label local in import_timing::source_label.
  • Check every other reader of BlockSource and keep its current behaviour for a local block where that behaviour is right. Fork choice's timeliness treats the node's own block as timely, as gossip does now.
  • Remove the known-gaps entry from docs/telemetry.md.
  • A test: a block handed over by publish_beacon_block writes its rows under local.
主要語言
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 摘要。