node: Tor control ADD_ONION and Electrum hidden service - #646
Open
rearden-grok[bot] wants to merge 8 commits into
Open
rearden-grok[bot] wants to merge 8 commits into
rearden-grok[bot] wants to merge 8 commits into
Conversation
5 tasks
rearden-grok
Bot
force-pushed
the
net/onion-addrman
branch
from
September 20, 2026 02:03
fec1f84 to
e89beb5
Compare
rearden-grok
Bot
force-pushed
the
net/tor-control-hs
branch
3 times, most recently
from
September 20, 2026 14:17
0f707c9 to
40f1a56
Compare
Cookie hex and quoted password AUTHENTICATE, then GETINFO version. Wrong cookie is a 515 error, not a panic. Fake control only — no live Tor. Co-authored-by: Cursor <cursoragent@cursor.com>
NEW writes PrivateKey to the path (0600 on Unix). A second call sends the stored blob and must get the same ServiceID from the fake control. Co-authored-by: Cursor <cursoragent@cursor.com>
Omitted ADDR is 127.0.0.1:9051. Cookie or password; failed AUTH is Init. Unset --tor-control does not open a control connection. Co-authored-by: Cursor <cursoragent@cursor.com>
Virtual port and target are the bound Electrum port on 127.0.0.1.
Key lives at {datadir}/onion/electrum.priv. Log the .onion:port.
Co-authored-by: Cursor <cursoragent@cursor.com>
OnceLock so ADD_ONION can fill the hostname after the TCP bind. No ssl_port. Empty hosts object when no onion is set. Co-authored-by: Cursor <cursoragent@cursor.com>
First-class tor.control / controlCookie and electrum.hiddenService. When set, systemd After/Wants tor.service. Eval pins --tor-control argv. RPC stays off the onion. Co-authored-by: Cursor <cursoragent@cursor.com>
dispatch_pinned cognitive complexity and start_electrum argument count exceeded the workspace -D warnings bar. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
rearden-grok
Bot
force-pushed
the
net/tor-control-hs
branch
from
September 20, 2026 14:41
40f1a56 to
a612af5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan
docs/personal-node-plans/03-tor-control-hs.md: system tor control AUTH + persistent ElectrumADD_ONION. Fake control port only — no live Tor.Stacked on #645 (
net/onion-addrman). NixOSAfter/Wantstor.servicewhen control is set; labelednixos-module-runtime.Summary
GETINFO version. Wrong cookie is515/ startIniterror. Unset--tor-controldoes not connect.--tor-control [HOST:PORT](omit ADDR →127.0.0.1:9051),--tor-control-cookie,--tor-control-password.ADD_ONION NEW:ED25519-V3persists{datadir}/onion/electrum.priv(0600). Reuse sends the stored blob and keeps the same ServiceID.--tor-control+--electrum-listenmaps virtual port to127.0.0.1:<bound>and logs….onion:port. RPC stays off the onion.server.features.hostsis{ "<id>.onion": { "tcp_port": N } }with nossl_port.tor.control/tor.controlCookie/electrum.hiddenService. Eval pins--tor-control. Runtime test uses a dummytor.service(not live tor).Test plan
cargo test -p rbitcoin-node --lib tor_control_cargo test -p rbitcoin-node --lib tor_add_onion_cargo test -p rbitcoin-node --lib electrum_hidden_service_add_onion_when_listeningcargo test -p rbitcoin-electrum --lib features_hosts_onion_tcpcargo clippy --workspace --all-targets -- -D warningscargo deny check/./scripts/ast-grep.sh/cargo fmt --all -- --checknix build .#checks.x86_64-linux.nixos-module-eval --no-linknixos-module-runtime(labeled)Made with Cursor