Specify the "snap" ENR entry and how it signals snap versions
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go, markdown
調査の方向性
Start with the existing entry specs in enr-entries/ (eth.md, les.md) and caps/snap.md, then read eth/protocols/snap/discovery.go in go-ethereum to see how the snap entry is written today. The work is to draft enr-entries/snap.md and settle the three open questions about old consumers, retiring snap/1, and DNS trees, which need maintainer decisions first. Done means a reviewed spec file that the maintainers accept and that matches the current go-ethereum behaviour.
索引モデルが issue の本文から書いたものです。
説明
Problem
The snap ENR entry has no specification. enr-entries/ defines eth, les and ng, but not snap. Go-ethereum defines the entry in code only (eth/protocols/snap/discovery.go): the key snap with an empty list as its value. Go-ethereum attaches the same entry to every snap version that it registers.
DNS discovery lists depend on this entry. devp2p nodeset filter -snap selects a node when its ENR has a snap entry with any list value, and the snap.* trees of EIP-1459 are built that way. Go-ethereum uses those trees to find snap peers.
The entry does not say which snap versions a node serves. Before snap/2 (EIP-8189), this was not a problem, because the only version was snap/1. Now caps/snap.md names snap/2 as the current version, and snap/2 is not compatible with snap/1: it removes GetTrieNodes and TrieNodes and adds GetBlockAccessLists. Clients now ship different version sets:
- Go-ethereum offers snap/1, and snap/2 only when it is enabled.
- Nethermind offers snap/1, and also snap/2 when block access lists are enabled.
- Reth (main, not released) serves only snap/2, with
--snap.v2.
A node that serves only snap/2 cannot use the current entry correctly. With the entry, presence-only filters put it in snap.* trees, and a default go-ethereum peer, which speaks only snap/1, can never negotiate snap with it. Without the entry, no consumer can find it as a snap server.
Data
On mainnet, of 14,103 execution nodes with a recent client identification, only Geth writes the entry today: 7,014 of 7,756 Geth nodes. Nethermind and Besu serve snap/1 but do not write it. Changes for both are open: NethermindEth/nethermind#14585 and besu-eth/besu#11565. As more clients write the entry, the version question becomes more important.
Proposal
Add enr-entries/snap.md:
entry-key = "snap"
entry-value = [ version, ... ]
versionis a snap protocol version that the node serves, as an unsigned integer.- An empty list means
[1]. This keeps every existing go-ethereum record valid. - A node writes the entry only when it serves snap, not while it only syncs with snap.
- Consumers ignore elements that they do not understand, as
eth.mdandles.mdalready require. - A consumer that needs a specific version selects on the list, and does not select on presence only.
Existing parsers accept this format, because go-ethereum decodes the value with a tail field.
Open questions
- Old consumers. A presence-only filter would still select a node that writes
[2]. Should a node that does not serve snap/1 omit the entry until consumers are version aware? Or should consumers change first, withdevp2p nodeset filter -snaptaking a version argument? - Retiring snap/1. When clients stop serving snap/1, the empty-list rule (
[]means[1]) must not make old records look current. Is a defined end date for that rule necessary? - DNS trees. Should
snap.*trees stay "serves snap/1", or should there be one tree per version (for example,snap2.*)?
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 301
- 平均マージ
- 12時間 3分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ethereum/devp2p のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ethereum/devp2p#282 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
ethereum/devp2p#279 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ethereum/devp2p#277 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
ethereum/devp2p の issue をすべて見る
似ている issue
-
external-plugin ready-for-review
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/awesome-copilot#6655 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
c-w-z/commit-decision-record#32 ·
メンテナーはふだん 1 日以内に返信
-
perf: the Evaluations leaderboard and the @ model menus download every model image at once対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug confirmed issue
難易度 2/5 半日 初心者へのやさしさ 78/100
open-webui/open-webui#35213 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
exa-studio/ApiVault#338 ·