IPv6 support: discovery and listeners bind IPv4 only
Los mantenedores suelen responder en 6 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- networking
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 86
- Forks
- 34
- Merge medio
- 9 d 20 h
- PR fusionados (30 d)
- 77
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lambdaclass/ethlambda
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lambdaclass/ethlambda#850 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lambdaclass/ethlambda#777 · 1 reacción ·
Los mantenedores suelen responder en 6 días
-
Run all gossip validation testsQuizá libre de nuevo @dicethedev la tomó hace 9 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
lambdaclass/ethlambda#725 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
-
Handle malformed DB dataQuizá libre de nuevo @dicethedev la tomó hace 115 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lambdaclass/ethlambda#529 · 4 comentarios ·
Los mantenedores suelen responder en 6 días
-
Document architectural choicesQuizá libre de nuevo @dicethedev la tomó hace 115 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lambdaclass/ethlambda#521 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
Todos los issues de lambdaclass/ethlambda
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
bytecodealliance/wrpc#1785 ·
Los mantenedores suelen responder en 1 día
-
2 advisory ignore entries no longer match anything (`quick-xml` already patched in `Cargo.lock`)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
longbridge/nsh#2758 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
antithesishq/bombadil#473 ·
Los mantenedores suelen responder en 2 días
-
bench/api.sh exec test fails with curl exit 52, and --ignore-failure still records the timingsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
libracoder/kiri#669 ·
Los mantenedores suelen responder en 1 día