How ethereum/discv4-dns-lists works
Project type and purpose
• This is an open-source tooling project (“discv4-dns-lists”) whose sole purpose is to crawl the Ethereum discovery V4 DHT, produce EIP-1459-compliant node lists in JSON form, and publish those lists under ethdisco.net DNS names.
File structure
• Top-level files:
• LICENSE, README.md – documentation/legal
• all.json – the raw crawl output of every discovered node
• Per-zone directories (e.g., all.mainnet.ethdisco.net, snap.sepolia.ethdisco.net, les.hoodi.ethdisco.net, etc.) each contain:
• enrtree-info.json – metadata about the ENR tree for that network/prefix
• nodes.json – the filtered list of node ENRs matching that network and prefix
• These directory names map one-to-one to DNS zones under ethdisco.net (e.g., all.mainnet.ethdisco.net)
Key insights from README
• Uses go-ethereum’s devp2p crawler to dump the DHT into all.json
• Filters all.json by the “eth” ENR entry to separate out per-chain (mainnet, sepolia, holesky, hoodi) and per-protocol prefix (all, les, snap) lists
• Publishes the filtered JSON in DNS zones under ethdisco.net
Main components & data flow
a. Ethereum Discovery DHT
b. Crawler (Go-Ethereum devp2p tool)
c. Raw output storage (all.json)
d. Filter process (reads all.json → produces per-zone JSON)
e. DNS zone generator/publisher (serves nodes.json & enrtree-info.json at each ethdisco.net subdomain)
f. Consumers (Ethereum clients or tooling querying ethdisco.net for peer lists)
Flow:
DHT ──► Crawler ──► all.json ──► Filter engine ──► { for each prefix+chain: nodes.json + enrtree-info.json } ──► DNS server ──► Clients
Architectural patterns & principles
• Pipeline/batch-processing: crawl → transform → publish
• Separation of concerns: distinct steps for crawling, filtering, and publishing
• Configuration-by-convention: directory naming enforces DNS zone structure
• Stateless intermediate steps: filter engine always reads the latest all.json
Technologies & frameworks
• Go (go-ethereum devp2p crawler)
• JSON for data interchange
• DNS (zone files or dynamic DNS backend) for publication
• Shell or Go scripts to orchestrate crawl → filter → publish
Be detailed but focused
• Don’t break out every single JSON file as its own component; instead show a repeating pattern for “prefix.chain.ethdisco.net.”
• Essence: pipeline of crawling, filtering, publishing.