-onlynet=onion plus -onlynet=ipv4/etc, without -onion=, in spite of -torcontrol= specified, incorrectly kills startup #24980

issue midnightmagic openend this issue on April 25, 2022
  1. midnightmagic commented at 6:12 pm on April 25, 2022: contributor

    In v22, using the options: -onlynet=onion -onlynet=ipv4 -onlynet=ipv6, combined with the options -torcontrol= (etc) functioned and bitcoind correctly pulled the onion socks address via a probe to tor. In v23, that combination of options no longer functions and -onion= is required.

    ** expected **

    Using -onlynet=onion (and ipv4 and ipv6) if -torcontrol= is specified should still work.

    Actual behavior

    bitcoind refuses to start up due to commitid e53a8505db preventing it from doing so in init.cpp.

    To reproduce

    Run as per above.

    System information

    Sources built from fcf6c8f4eb217763545ede1766831a6b93f583bd (tag v23.0 as of this writing I .. think?)

    Error message in debug.log is:

    Error: Outbound connections restricted to Tor (-onlynet=onion) but the proxy for reaching the Tor network is not provided (no -proxy= and no -onion= given) or it is explicitly forbidden (-onion=0) Shutdown: In progress… scheduler thread exit Shutdown: done

  2. midnightmagic added the label Bug on Apr 25, 2022
  3. vasild commented at 9:04 am on April 26, 2022: contributor

    Actually, the relevant setting here is -listenonion=1, not -torcontrol=...: if -listenonion=1, then we would connect to “Tor control” (using -torcontrol= if given or the default 127.0.0.1:9051) and may retrieve a Tor proxy from there.

    Working on a fix.

  4. vasild referenced this in commit 111bec2fdc on Apr 26, 2022
  5. vasild commented at 9:23 am on April 26, 2022: contributor
    A fix is in #24991. @midnightmagic does it resolve the problem for you?
  6. vasild referenced this in commit bbbb1755da on Apr 26, 2022
  7. vasild referenced this in commit c313568a97 on Apr 29, 2022
  8. luke-jr referenced this in commit c9c2818619 on May 21, 2022
  9. vasild referenced this in commit 28ae912f50 on May 23, 2022
  10. vasild referenced this in commit 2d0b4e4ff6 on Sep 5, 2022
  11. midnightmagic commented at 2:09 am on September 8, 2022: contributor
    Oh, you totally pinged me. I didn’t receive it. I did notice the recent commentary and fiddlings in PR#24991. Would you like me to wait until that’s resolved before testing?
  12. vasild commented at 8:54 am on September 8, 2022: contributor
    Would be nice if you can test whether that PR resolves the issue for you. The PR is good to go IMO.
  13. fanquake added the label P2P on Sep 8, 2022
  14. fanquake closed this on Sep 13, 2022

  15. fanquake referenced this in commit 94d17845d0 on Sep 13, 2022
  16. sidhujag referenced this in commit 58d242900d on Sep 13, 2022
  17. schildbach commented at 1:20 pm on November 10, 2022: contributor
    Unfortunately, bitcoind 24.0rc4 doesn’t completely fix this issue for me. See https://github.com/bitcoin/bitcoin/issues/26478
  18. janus referenced this in commit be88ae4040 on Jan 20, 2023
  19. bitcoin locked this on Nov 10, 2023

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: 2024-11-27 06:12 UTC

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