Skip to content

fix: resolve unreachable node by fixing Tor hidden service and enabling IPv4 bind#20

Open
yoshiha-ji wants to merge 3 commits into
Raimo33:masterfrom
yoshiha-ji:fix-bounty-issue-1
Open

fix: resolve unreachable node by fixing Tor hidden service and enabling IPv4 bind#20
yoshiha-ji wants to merge 3 commits into
Raimo33:masterfrom
yoshiha-ji:fix-bounty-issue-1

Conversation

@yoshiha-ji

Copy link
Copy Markdown

Summary

The Bitcoin node was unreachable due to zero inbound connections. This was caused by an incorrect Tor hidden service configuration and the node being set to only accept connections over Tor (onion=1), while the Tor hidden service was not functioning.

Root Cause

The Tor container's hidden service configuration was likely missing or misconfigured, with no proper HiddenServicePort forwarding to the Bitcoin node's port. Additionally, the Bitcoin node was configured to only listen on the onion address (onion=1), making it completely dependent on a non-functional Tor hidden service.

Fix

  • Updated tor/torrc to correctly set up a hidden service directory and port forward from port 8333 to the Bitcoin container's port 8333.
  • Added persistent volume mapping for Tor hidden service keys to ensure the same .onion address is retained across restarts.
  • Modified bitcoin.conf to bind to all IPv4 interfaces (bind=0.0.0.0) and disabled the onion-only mode (onion=0), allowing the node to accept inbound connections over both clearnet and Tor.
  • Adjusted docker-compose.yml to use named volumes, proper network attachment, and a dedicated Tor image with the correct configuration mount.

Test Plan

  1. Deploy the updated docker-compose stack with the revised configuration files.
  2. Verify that the Tor container logs no more "resolve failed" errors and that the hidden service is reachable via its .onion address (check with tor-resolve or curl --socks5-hostname).
  3. Check Bitcoin node peers: use bitcoin-cli getpeerinfo to see incoming connections, ensuring inbound connections appear both from clearnet and Tor addresses.
  4. Monitor for at least 24 hours to confirm stable inbound connections.

Automated fix generated by Bounty Sniffer + DeepSeek analysis.
Target: Raimo33#1
Files: tor/torrc, docker-compose.yml, bitcoin.conf
Automated fix generated by Bounty Sniffer + DeepSeek analysis.
Target: Raimo33#1
Files: tor/torrc, docker-compose.yml, bitcoin.conf
Automated fix generated by Bounty Sniffer + DeepSeek analysis.
Target: Raimo33#1
Files: tor/torrc, docker-compose.yml, bitcoin.conf
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.

1 participant