Conversation
|
we will need to put this behind a flag ( |
9fa5f12 to
513c1fa
Compare
62b3381 to
60e2d25
Compare
|
Can remove |
9a8cb28 to
57965b0
Compare
8187eea to
d8636d0
Compare
8c2b001 to
e908eee
Compare
2ef0d18 to
62cb4ee
Compare
There was a problem hiding this comment.
Pull request overview
Adds initial QUIC transport support (behind hidden/debug flags) across Nimbus networking, ENR generation, and local/test tooling, alongside vendor bumps required for QUIC integration.
Changes:
- Update networking stack to support TCP and/or QUIC transports and advertise QUIC in ENR records.
- Add hidden CLI/config flags and ports for QUIC, and adjust bootstrap/ENR port handling.
- Update test/simulation scripts, docker compose examples, and Makefile port allocations for QUIC.
Reviewed changes
Copilot reviewed 14 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vendor/nim-libp2p | Bumps libp2p dependency to version that presumably includes QUIC support. |
| vendor/nim-eth | Bumps nim-eth dependency to support QUIC ENR fields / discovery changes. |
| tests/test_keymanager_api.nim | Enables TCP + QUIC flags in test node startup with a dedicated QUIC port offset. |
| tests/simulation/restapi.sh | Extends port cleanup to UDP and adds TCP/QUIC flags for simulation flows. |
| scripts/run-beacon-node.sh | Adds QUIC-related flags and introduces derived port variables. |
| scripts/launch_local_testnet.sh | Adds UDP port cleanup and plumbs TCP/QUIC + separate ENR/bootstrap port flags. |
| ncli/ncli_testnet.nim | Adds hidden flags for TCP/QUIC enablement and splits ENR/bootstrap ports (tcp/udp/quic). |
| docker/dist/binaries/docker-compose-example1.yml | Exposes an additional UDP port for QUIC and adds corresponding flags. |
| docker/dist/README.md.tpl | Updates example command to include QUIC flags/port. |
| config.nims | Tweaks compile flags for lsquic objects when stack-usage limiting is enabled. |
| beacon_chain/spec/network.nim | Introduces default QUIC port and ENR “quic” field constant. |
| beacon_chain/rpc/rest_node_api.nim | Updates discovery address derivation to use new toPeerAddr proto-selection API. |
| beacon_chain/nimbus_beacon_node.nim | Updates ENR record creation to conditionally include TCP/QUIC ports. |
| beacon_chain/networking/eth2_network.nim | Implements proto-aware address extraction (TCP/UDP/QUIC), transport selection, and switch builder changes. |
| beacon_chain/networking/eth2_discovery.nim | Threads QUIC ENR port into discovery protocol initialization. |
| beacon_chain/conf_light_client.nim | Adds hidden TCP/QUIC enable flags and QUIC port configuration for light client. |
| beacon_chain/conf.nim | Adds hidden TCP/QUIC enable flags, QUIC ports (incl. external), and exports default QUIC port. |
| Makefile | Adjusts REST test port stride, forces verbose builds for tools, and adds QUIC flags/port to params. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
beacon_chain/nimbus_beacon_node.nim
Outdated
| std/[os, random, strutils, terminal, times], | ||
| chronos, chronicles, | ||
| metrics, metrics/chronos_httpserver, | ||
| lsquic/lsquic_ffi, |
There was a problem hiding this comment.
Leftover from when I had this code to debug lsquic:
proc logging(ctx: pointer, buf: cstring, len: csize_t): cint {.cdecl.} =
echo $buf
return 0
let logger = struct_lsquic_logger_if(log_buf: logging)
discard lsquic_set_log_level("debug")
discard lsquic_logger_lopt("engine=debug,conn=debug,stream=debug")
lsquic_logger_init(addr logger, nil, LLTS_HHMMSSUS)
I'll remove it. 🤔 It is weird that the compiler did not complaint, because i see: switch("warningAsError", "UnusedImport:on") in config.nims
73e6960 to
182892c
Compare
|
Richard requested testing of this on But since it's not merged into |
|
Could we get this merged into |
|
@tersec, do you think this PR could be merged into |
| defaultValueDesc: "*" | ||
| name: "listen-address" .}: Option[IpAddress] | ||
|
|
||
| tcpEnabled* {. |
There was a problem hiding this comment.
This is presumably the existing mplex support?
Adds QUIC transport support to Nimbus beacon node while keeping TCP as the default transport.
nim-libp2pdependency and relax stack-usage flags for relevantlsquicobjectsNotes
--debug-quic; existing TCP behavior remains unchanged by default