Query on bitcoin/doc/tor.md out of date? #12376

issue Willtech opened this issue on February 7, 2018
  1. Willtech commented at 11:24 AM on February 7, 2018: contributor

    Using config from bitcoin/doc/tor.md kills Tor service, will not restart using sudo systemctl start tor or upon reboot after first start with new config success on Fedora 23. Bitcoin Core v0.15.1. Tor v0.2.8.11-1.fc23.

    I will leave the actual Tor errors/logs for elsewhere or, if necessary.

    Question - since the linked document says:

    Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket API, to create and destroy 'ephemeral' hidden services programmatically. Bitcoin Core has been updated to make use of this.

    This means that if Tor is running (and proper authentication has been configured), Bitcoin Core automatically creates a hidden service to listen on. This will positively affect the number of available .onion nodes.

    Does that make the following lines for /etc/tor/torrc redundant - removing these from torrc resolve the Tor issue:

    HiddenServiceDir /var/lib/tor/bitcoin-service/
    HiddenServicePort 8333 127.0.0.1:8333
    HiddenServicePort 18333 127.0.0.1:18333

    I note the following lines in my v0.15.1 debug.log before the preceeding lines were added, while they were added (before Tor was stopped) and after the lines were removed and Tor was working again - and at the start of the log I get discover=0:

    2018-02-07 10:52:58 torcontrol thread start
    2018-02-07 10:52:58 Bound to 127.0.0.1:8333
    2018-02-07 10:52:58 init message: Loading P2P addresses...
    2018-02-07 10:52:58 tor: Got service ID {onion}, advertising service {onion}.onion:8333
    2018-02-07 10:52:58 AddLocal({onion}.onion:8333,4)

    Seperately (Yes, no not support questions..) is it also necessary to -setexternalip= for Bitcoin Core to your onion service at command line / in bitcoin.confas the linked document suggests, even when using 'ephemeral' hidden service working with AddLocal message?

    The full setup I am using is here - note that I have additional lines in my bitcoin.conf.

  2. fanquake added the label Docs on Feb 7, 2018
  3. fanquake added the label P2P on Feb 7, 2018
  4. laanwj commented at 1:55 PM on February 7, 2018: member

    Does that make the following lines for /etc/tor/torrc redundant - removing these from torrc resolve the Tor issue.

    That creates a tor hidden service manually. Bitcoind can also create a tor hidden service automatically (with -listenonion) but those two are not exclusive. Specifying both will not cause an error, it will just result in two hidden services.

    Seperately (Yes, no not support questions..) is it also necessary to -setexternalip= for Bitcoin Core to your onion service at command line / in bitcoin.confas the linked document suggests, even when using 'ephemeral' hidden service working with AddLocal message?

    The automatic hidden service will automatically be regarded as local address and thus gossiped. Unless you override the external IP with -externalip, in which case I think you do need to specify it because that overrides the automatic setting.

  5. Willtech commented at 10:26 AM on February 9, 2018: contributor
  6. Willtech commented at 10:51 AM on February 9, 2018: contributor

    FWIW I have done some more follow up on this.

    Tor fails to start with -zero- lines of debug output with full debug output enabled. It is a hard crash. Not even a new logfile notice is written.

    I have tried stopping bitcoin-qt, then stopping Tor, uncommenting the relevant hidden-service lines in /etc/tor/torrc, and then attempting to restart Tor. No success - just in case it was a port bind conflict or something similar.

    The hidden-service lines exactly match the format of the example hidden-service lines in the default torrc file.

    I have thoroughly reviewed the standard torrc examples and notes. I have used nyx to explore all Tor options and cannot locate either error in the config lines or additional options to assist.

    In the pull request edit to /doc/tor.md I have only noted under the intro to section 2:

    For Tor version 0.2.7.0 and older versions of Tor only as it is redundant in newer versions.

    This is since manually setting up the hidden service in Tor is no longer necessary with newer versions of Bitcoin Core used with newer versions of Tor, and the document already notes this in section 3. Besides that, the edits to torrc breaks things. The use of the options listed in the next part of section 2 are still valid, but are once again redundant as Bitcoin Core does all of the necessary steps automatically.

    BTW in what release version of Bitcoin Core was Tor control first included? I saw somewhere a mention of v0.7.0 ?

  7. Willtech referenced this in commit e237a2e71a on Feb 11, 2018
  8. Willtech referenced this in commit 15b58821f9 on Feb 11, 2018
  9. Willtech referenced this in commit 77b749f316 on Feb 11, 2018
  10. Willtech commented at 3:45 AM on February 11, 2018: contributor

    The pull request commit has been updated.

  11. Willtech commented at 4:13 AM on February 11, 2018: contributor

    This is obviously a Tor issue, no issue with the suggested edits to /etc/tor/torrc can be identified comparing against multiple sources.

    If I start Tor with the hidden-service lines commented out, uncomment them, then restart Tor with a hup via nyx it loads the config quite fine with no complaint.

  12. Willtech referenced this in commit eff56f7e64 on Feb 16, 2018
  13. Willtech referenced this in commit a3a01423d8 on Apr 12, 2018
  14. Willtech referenced this in commit 8dcd724f4d on Apr 12, 2018
  15. Willtech referenced this in commit 66e83bc7fb on May 1, 2018
  16. Willtech referenced this in commit 39d2911918 on May 1, 2018
  17. laanwj referenced this in commit ff2dc8b8c3 on May 1, 2018
  18. laanwj referenced this in commit c5f7efe331 on May 1, 2018
  19. Bushstar referenced this in commit 9abc4163e2 on May 3, 2018
  20. stamhe referenced this in commit 83b0e194fd on Jun 27, 2018
  21. HashUnlimited referenced this in commit 5b119ace5e on Sep 6, 2018
  22. lionello referenced this in commit 318bd50824 on Nov 7, 2018
  23. joemphilips referenced this in commit e3d1b3f4d1 on Nov 9, 2018
  24. markblundeberg referenced this in commit da578300e9 on Jun 5, 2019
  25. jtoomim referenced this in commit 1b1c6bfc46 on Jun 29, 2019
  26. jonspock referenced this in commit 4a2eaa0a76 on Jul 4, 2019
  27. jonspock referenced this in commit 2c1056d027 on Jul 4, 2019
  28. proteanx referenced this in commit 4d52f0671d on Jul 5, 2019
  29. jonspock referenced this in commit 0b4a16fa7a on Jul 9, 2019
  30. adamjonas commented at 1:39 PM on April 29, 2020: member
  31. MarcoFalke closed this on Apr 29, 2020

  32. PastaPastaPasta referenced this in commit 40507852c4 on May 10, 2020
  33. PastaPastaPasta referenced this in commit 89a1aff693 on May 10, 2020
  34. PastaPastaPasta referenced this in commit 0e22dd1852 on May 10, 2020
  35. UdjinM6 referenced this in commit 505542663d on May 11, 2020
  36. ckti referenced this in commit fa2ea601d7 on Mar 28, 2021
  37. malbit referenced this in commit ac3ec20dda on Nov 5, 2021
  38. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me