IPv6 support: discovery and listeners bind IPv4 only
維護者通常 6 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 18/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- rust
- 領域
- networking
研究方向
Start in bin/ethlambda/src/main.rs: run_node builds p2p_socket on 0.0.0.0, and build_swarm listens on /ip4/0.0.0.0 for QUIC/TCP; spawn_discovery hands one UDP socket to ethrex. Read read_ip and Options::validate_ports for ENR and flag handling, plus #825 for the bootnode refusal. Done means IPv6 listeners/discovery (or a documented ethrex dependency), ip6/udp6/tcp6/quic6 read and written, CLI flags validated, and tests covering dual-stack and IPv6-only peers.
由索引模型根據 Issue 內容生成。
描述
Problem
The node binds IPv4 sockets only, so IPv6 works only for outbound connections:
- Discovery (discv5) is IPv4-only.
run_nodebuildsp2p_socketon0.0.0.0(bin/ethlambda/src/main.rs) and passes its IP asDiscoverySpawnConfig::bind_ip.spawn_discoveryopens oneUdpSocketthere and hands it to ethrex'sDiscoveryServer. An IPv4 socket cannot send to an IPv6 address or receive from one, so discv5 never reaches an IPv6-only peer, whether it was found by discovery or given as a bootnode. - The swarm listens on IPv4 only.
build_swarmlistens on/ip4/0.0.0.0for QUIC and TCP, so no peer can connect in over IPv6. Outbound dials to IPv6 do work: libp2p-quic opens a[::]:0dialer endpoint when no IPv6 listener exists, and TCP opens a socket of the target's family. --discovery.advertise-ipaccepts an IPv6 address. It writesip6into the ENR, but the sockets behind the record are IPv4, so the published record is one no peer can reach.- ENRs from peers.
read_ipprefersipoverip6, and the IPv6-specific ports (udp6,tcp6,quic6) are never read or written.
Today this matters only for IPv6-only peers. A dual-stack record carries ip, which wins.
What support would take
Lighthouse runs dual-stack: --listen-address can be given once per family, the IPv6 ports have their own flags (--port6, --discovery-port6, --quic-port6), and discv5 gets one socket per family. Covering that here means:
- Discovery on IPv6 too. ethrex's
DiscoveryServertakes a single socket, so this needs either a dual-stack socket with IPv4-mapped addresses handled throughout, or ethrex accepting a second socket. - QUIC and TCP listeners on
::as well as0.0.0.0. - The ENR's
ip6/udp6/tcp6/quic6entries, written for our record and read from peers'. - CLI flags for the IPv6 listen address and ports, and
Options::validate_portsrules for them. - Refusing an IPv6
--discovery.advertise-ipuntil the above exists, or warning that the record is unreachable.
Related
#825 (open) makes beacon --bootnodes refuse an IPv6 entry that is only a discv5 contact (a bare /ip6/.../udp/<port> multiaddr, or an ENR whose only address is ip6 and whose only port is udp) when discovery is bound to IPv4. The caller passes in the bind address, so the refusal lifts on its own once discovery binds IPv6.
- 主要語言
- Rust
- 星號
- 86
- 分支
- 34
- 平均合併
- 9 天 20 小時
- 30 天內合併 PR
- 77
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
lambdaclass/ethlambda 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
lambdaclass/ethlambda#850 ·
維護者通常 6 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
lambdaclass/ethlambda#777 · 1 個 reaction ·
維護者通常 6 天內回覆
-
Run all gossip validation tests可能重新可做 @dicethedev 於 9 天前認領,目前沒有進行中的 PR。 未關閉
難度 2/5 1-3 小時 新手友好度 62/100
lambdaclass/ethlambda#725 · 2 則留言 ·
維護者通常 6 天內回覆
-
Handle malformed DB data可能重新可做 @dicethedev 於 115 天前認領,目前沒有進行中的 PR。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
lambdaclass/ethlambda#529 · 4 則留言 ·
維護者通常 6 天內回覆
-
Document architectural choices可能重新可做 @dicethedev 於 115 天前認領,目前沒有進行中的 PR。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
lambdaclass/ethlambda#521 · 2 則留言 ·
維護者通常 6 天內回覆
查看 lambdaclass/ethlambda 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 1/5 1 小時以內 新手友好度 82/100
stackabletech/airflow-operator#898 ·
維護者通常 1 天內回覆
-
2 advisory ignore entries no longer match anything (`bytes`, `time` already patched in `Cargo.lock`)可能已有人在做 @zyl71 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 88/100
-
難度 1/5 1 小時以內 新手友好度 85/100
stackabletech/druid-operator#905 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
bytecodealliance/wrpc#1785 ·
維護者通常 1 天內回覆