net: Remove “tor” as a network specification #34031

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:remove_deprecated_tor changing 5 files +15 −12
  1. fanquake commented at 1:41 pm on December 8, 2025: member

    “tor” as a network specification was deprecated in 60dc8e4208 in favor of “onion” and this commit removes it and updates the relevant test.

    Previously #16029. This has been warning as being deprecated since v0.17.0.

    This PR only removes the already deprecated usage of tor as a network specification, the use of tor throughout the codebase, is not deprecated.

  2. DrahtBot commented at 1:41 pm on December 8, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34031.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK laanwj, davidgumberg, janb84, stickies-v
    Stale ACK pablomartin4btc, sipa

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  3. pablomartin4btc approved
  4. pablomartin4btc commented at 3:12 pm on December 8, 2025: member
    ACK 7efb18c38150344ca6f7efbcd8441792a2ea921f
  5. sipa commented at 4:40 pm on December 8, 2025: member

    ACK 7efb18c38150344ca6f7efbcd8441792a2ea921f

    14 major releases ought to be a long enough deprecation period.

  6. fanquake commented at 4:55 pm on December 8, 2025: member
    cc @laanwj
  7. fanquake renamed this:
    netbase: Remove "tor" as a network specification
    net: Remove "tor" as a network specification
    on Dec 8, 2025
  8. DrahtBot added the label P2P on Dec 8, 2025
  9. laanwj commented at 9:47 am on December 9, 2025: member

    There’s one left in init.cpp:

     0diff --git a/src/init.cpp b/src/init.cpp
     1index bfb9483ad8730541848fc4789bafe343165d28f2..9849be22f9e45387cf1303b05100cdee58496f90 100644
     2--- a/src/init.cpp
     3+++ b/src/init.cpp
     4@@ -1683,7 +1683,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
     5             ipv4_proxy = name_proxy = proxy;
     6         } else if (net_str == "ipv6") {
     7             ipv6_proxy = name_proxy = proxy;
     8-        } else if (net_str == "tor" || net_str == "onion") {
     9+        } else if (net_str == "onion") {
    10             onion_proxy = proxy;
    11         } else if (net_str == "cjdns") {
    12             cjdns_proxy = proxy;
    
  10. fanquake force-pushed on Dec 9, 2025
  11. laanwj commented at 10:09 am on December 9, 2025: member

    Test needs a change too:

     0diff --git a/test/functional/feature_proxy.py b/test/functional/feature_proxy.py
     1index ba8a0212a6a0dd9cf166ab87d3b60486cb844aba..aec81fa79888af42dec3387e4a2ccddee0d5204c 100755
     2--- a/test/functional/feature_proxy.py
     3+++ b/test/functional/feature_proxy.py
     4@@ -468,8 +468,8 @@ class ProxyTest(BitcoinTestFramework):
     5         assert_equal(nets["ipv6"]["proxy"], "127.6.6.6:6666")
     6         self.stop_node(1)
     7
     8-        self.log.info("Test overriding the Tor proxy")
     9-        self.start_node(1, extra_args=["-proxy=127.1.1.1:1111", "-proxy=127.2.2.2:2222=tor"])
    10+        self.log.info("Test overriding the Onion proxy")
    11+        self.start_node(1, extra_args=["-proxy=127.1.1.1:1111", "-proxy=127.2.2.2:2222=onion"])
    12         nets = networks_dict(self.nodes[1].getnetworkinfo())
    13         assert_equal(nets["ipv4"]["proxy"], "127.1.1.1:1111")
    14         assert_equal(nets["ipv6"]["proxy"], "127.1.1.1:1111")
    
  12. netbase: Remove "tor" as a network specification
    "tor" as a network specification was deprecated in 60dc8e4208 in favor
    of "onion" and this commit removes it and updates the relevant test.
    
    Co-authored-by: Mara van der Laan <126646+laanwj@users.noreply.github.com>
    c4c70a256e
  13. doc: add release note for 34031 e7ac5a133c
  14. fanquake force-pushed on Dec 9, 2025
  15. DrahtBot added the label CI failed on Dec 9, 2025
  16. laanwj approved
  17. laanwj commented at 10:57 am on December 9, 2025: member
    Code review ACK e7ac5a133cc354b1e60cb9c3660da03e79c50173
  18. DrahtBot requested review from sipa on Dec 9, 2025
  19. DrahtBot requested review from pablomartin4btc on Dec 9, 2025
  20. DrahtBot removed the label CI failed on Dec 9, 2025
  21. janb84 commented at 9:52 am on December 10, 2025: contributor

    ACK e7ac5a133cc354b1e60cb9c3660da03e79c50173

    As a review I did some searches for tor usage and there is still a lot of usage of the name tor. This is not an issue but what is not super clear to me is to what extend tor is deprecated or where we would like to use onion now.

    suggestion NIT: add some clarity in the PR description that only the tor network specification is deprecated and not the usage of the name tor or code referring to tor (or something similar) to limit followup PR’s that see this as an invitation to remove the name Tor everywhere.

  22. stickies-v approved
  23. stickies-v commented at 11:37 am on December 10, 2025: contributor
    ACK e7ac5a133cc354b1e60cb9c3660da03e79c50173
  24. fanquake merged this on Dec 10, 2025
  25. fanquake closed this on Dec 10, 2025

  26. laanwj commented at 12:28 pm on December 10, 2025: member

    suggestion NIT: add some clarity in the PR description that only the tor network specification is deprecated and not the usage of the name tor or code referring to tor (or something similar) to limit followup PR’s that see this as an invitation to remove the name Tor everywhere.

    Right. Usage of “Tor” is fine, and doesn’t need to be removed. It’s just that Tor is a general overlay network with exis nodes, but this specific proxy is the one used for .onion addresses, so calling it onion is way less confusing.

  27. fanquake deleted the branch on Dec 10, 2025

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: 2025-12-19 03:13 UTC

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