Skip to content

net: CJDNS overlay (--cjdns-reachable, --only-net=cjdns) - #652

Open
rearden-grok[bot] wants to merge 4 commits into
net/listen-onionfrom
net/cjdns
Open

rearden-grok[bot] wants to merge 4 commits into
net/listen-onionfrom
net/cjdns

Conversation

@rearden-grok

@rearden-grok rearden-grok Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Plan 08 (docs/personal-node-plans/08-cjdns.md). Stacked on #651 (net/listen-onion).

  • NetAddr::Cjdns from BIP155 AddrV2::Cjdns (fc00::/8 only). Global unicast tagged as CJDNS is dropped. Peers v2 round-trips the overlay address.
  • --cjdns-reachable (default off): dial via kernel IPv6 TCP; fc00::/8 may appear in localaddresses. Off: do not dial; do not advertise ULA as a home IP.
  • --only-net=cjdns without --cjdns-reachable is a Config error. --listen [fc00:…]:port parses as CJDNS; --no-listen does not bind.
  • NixOS cjdns.reachable; After/Wants cjdns.service. No in-process router and no TUN in CI.

Test plan

  • cargo test -p rbitcoin-net --lib netaddr_cjdns
  • cargo test -p rbitcoin-net --lib learn_addrv2_keeps_cjdns
  • cargo test -p rbitcoin-net --lib cjdns_not_dialed
  • cargo test -p rbitcoin-node --lib only_net_cjdns
  • cargo test -p rbitcoin-node --lib listen_cjdns
  • nix build .#checks.x86_64-linux.nixos-module-eval --no-link
  • required CI + nixos-module-runtime

Do not merge unless asked.

Made with Cursor

@rearden-grok rearden-grok Bot added the nixos-module-runtime Run NixOS module VM test (nixos-module-runtime), not just eval label Sep 19, 2026
@rearden-grok
rearden-grok Bot force-pushed the net/cjdns branch 2 times, most recently from d70d6db to f092d40 Compare September 19, 2026 22:21
rearden-grok Bot and others added 4 commits September 19, 2026 19:00
Tag fc00::/8 separately from IPv6 so --only-net can distinguish them.
Keep learned CJDNS in peers v2; do not dial or advertise until reachable.
Direct TCP for overlay (not SOCKS/SAM).

Co-authored-by: Cursor <cursoragent@cursor.com>
only-net=cjdns without the reachable flag is a Config error, same honesty
as onion-without-SOCKS. --listen on an fc00 address parses as CJDNS.

Co-authored-by: Cursor <cursoragent@cursor.com>
First-class NixOS option. Runtime argv greps --cjdns-reachable. STREAM
FORWARD may use listenOnion loopback when p2p.listen is false.

Co-authored-by: Cursor <cursoragent@cursor.com>
NodeConfig::validate grew past cargo-crap 30 after CJDNS connect/only-net
guards. Extract helpers and pin the connect-without-reachable path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nixos-module-runtime Run NixOS module VM test (nixos-module-runtime), not just eval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants