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

オープン
#846 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
77

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lambdaclass/ethlambda のほかの issue

lambdaclass/ethlambda の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。