Skip to content

net: isolated SOCKS broadcast of local-origin txs - #649

Open
rearden-grok[bot] wants to merge 7 commits into
net/wallet-onionfrom
net/ephemeral-tor
Open

rearden-grok[bot] wants to merge 7 commits into
net/wallet-onionfrom
net/ephemeral-tor

Conversation

@rearden-grok

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

Copy link
Copy Markdown
Contributor

Summary

Plan 06 (docs/personal-node-plans/06-ephemeral-tor-broadcast.md). Stacked on #648 (net/wallet-onion).

  • RPC / Electrum / Esplora accepts are tagged local-origin. With --proxy or --onion, standing peers do not INV those txs.
  • After accept the node dial_isolateds 1–2 AddrMan peers (onion first), BIP324-handshakes, sends tx, disconnects. Fresh SOCKS USERPASS ≠ standing. Failure logs and does not fall back to standing INV.
  • Not Dandelion++. No extra flag: NixOS proxy description documents the behavior.

Test plan

  • cargo test -p rbitcoin-net --lib ephemeral_broadcast_
  • cargo test -p rbitcoin-net --lib local_origin_
  • nix build .#checks.x86_64-linux.nixos-module-eval --no-link
  • required CI

Do not merge unless asked.

Made with Cursor

rearden-grok Bot and others added 7 commits September 20, 2026 15:08
Process-RAM set, not a store schema. P2P accept_tx_from does not mark.
Later isolated broadcast skips standing INV for these txids.

Co-authored-by: Cursor <cursoragent@cursor.com>
Isolated broadcast (on with --proxy/--onion) must not leak a locally
submitted tx onto long-lived peers. P2P-originated txs still INV.

Co-authored-by: Cursor <cursoragent@cursor.com>
After accept, dial_isolated + BIP324 handshake sends tx to 1–2 AddrMan
peers (onion first) and disconnects. Failure logs and does not fall
back to standing INV. Fake SOCKS records fresh USERPASS ≠ standing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document that --proxy/--onion skips standing INV for local submits and
opens a short-lived SOCKS circuit. Not Dandelion++. NixOS proxy option
carries the same fact; no extra flag.

Co-authored-by: Cursor <cursoragent@cursor.com>
mark_local_origin on transaction.broadcast / broadcast_package pushed
dispatch_pinned over the cognitive-complexity cap. Same accept path.

Co-authored-by: Cursor <cursoragent@cursor.com>
coverage-crap scored spawn_isolated_broadcast_loop at 72 because the
tokio loop was untested. Drive the helper from units and keep the spawn
wrapper thin.

Co-authored-by: Cursor <cursoragent@cursor.com>
Direct Socks { proxy, randomize } omitted shared_creds after the stack rebase, so ephemeral-tor and everything above it failed to compile.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants