Beacon API: serve debug/fork_choice

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
api

調査の方向性

The issue names its reference point, forky's internal/source/beacon_node.go, and the doc file docs/rpc.md. Start by locating the existing /lean/v0/fork_choice handler in the RPC module and see how it assembles a fork-choice response from the store, then mirror that for the GET /eth/v1/debug/fork_choice route with justified/finalized checkpoints and one node per stored block. Check how the gloas fork exposes payload status so it can be placed in extra_data, and finish with the rpc.md entry. Done means a forky poll returns nodes instead of a 404.

索引モデルが issue の本文から書いたものです。

説明

Problem. ethereum-package's forky service collects nothing from an ethlambda beacon node. It polls /eth/v2/debug/fork_choice, falls back to /eth/v1/debug/fork_choice on a 404, and gets a 404 from that too. It retries every poll, publishes no frame, and its UI stays empty. This comes from reading forky's source (internal/source/beacon_node.go); nothing was run.

The lean surface has /lean/v0/fork_choice; the beacon surface has no fork-choice dump.

Fix.

  • Serve GET /eth/v1/debug/fork_choice per beacon-APIs: the justified and finalized checkpoints, then one fork_choice_nodes entry per block the store holds, each with its slot, root, parent, checkpoints, weight, validity and execution block hash.
  • Add gloas's payload status to each node in extra_data (forky passes extra_data through), so a dump taken under gloas shows FULL and EMPTY.
  • forky uses v1 when v2 is missing, so v1 alone is enough for it.
  • Document it in docs/rpc.md.
主要言語
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 を短くまとめたダイジェスト。