{
 "number": 36177,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36177",
 "title": "net: fix startup failures from stale Tor examples",
 "author": "l0rinc",
 "author_association": "MEMBER",
 "created_at": "2026-09-05T22:32:07Z",
 "updated_at": "2026-09-08T23:34:16Z",
 "age_days": 11,
 "draft": false,
 "labels": [
  "P2P"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "b960b1e3e99290937fa2e0b39b69953d59906bfe",
 "head_ref": "l0rinc/proxy-network-names",
 "head_repo": "l0rinc/bitcoin",
 "head_history": [
  {
   "t": "2026-09-08T23:32:14Z",
   "sha": "b960b1e3e99290937fa2e0b39b69953d59906bfe"
  }
 ],
 "additions": 43,
 "deletions": 26,
 "changed_files": 4,
 "commit_count": 4,
 "size_bucket": "S",
 "mergeable_state": "unstable",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "concept_ack": [
     {
      "login": "jeanpablojp",
      "url": "https://github.com/bitcoin/bitcoin/pull/36177#pullrequestreview-5126650621"
     }
    ]
   },
   "conflicts": [
    {
     "number": 35578,
     "title": "net: don\u2019t self advertise tor exit node ip addresses in outbound connections",
     "author": "stratospher"
    }
   ]
  }
 },
 "acks_parsed": {
  "jeanpablojp": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2026-09-06T21:23:10Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 1,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "jeanpablojp"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "unstable",
  "last_author_activity": "2026-09-08T23:34:16Z",
  "last_reviewer_activity": "2026-09-06T21:23:10Z",
  "last_reviewer": "jeanpablojp",
  "author_silent_days": 8,
  "waiting_on_author_days": 0,
  "days_since_update": 8
 },
 "refs": {
  "mentioned": [
   34031
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 34031,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2025-12-10",
    "title": "net: Remove \\\"tor\\\" as a network specification"
   }
  ],
  "conflicts": [
   35578
  ]
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "doc/tor.md",
  "test/functional/feature_proxy.py",
  "test/functional/rpc_net.py"
 ],
 "body": "**Problem:** #34031 removed `tor` as a network name, but the `-proxy` help and Tor documentation still advertise it, and following those examples fails at startup.\nThe proxy option also maintains its own network-name mapping while `-onlynet` and `getnodeaddresses` use the shared parser.\n\n**Fix:** Reuse the shared parser and canonical network names for `-proxy`, and document `onion` consistently. Unsupported network names are now echoed as supplied, matching the other interfaces, while accepted names remain case-insensitive.",
 "commits": [
  {
   "sha": "59be91c81ee19d9a5c5f5edf9d83b5db4577c481",
   "date": "2026-09-08T23:26:58Z",
   "message": "test: characterize proxy network name errors\n\nThe `-proxy` error lowercases unsupported network names, unlike `-onlynet` and `getnodeaddresses`.\nAlso cover rejection of the `tor` name removed in #34031, mixed-case `onion` acceptance, I2P exclusion, and clearing the IPv4 and name proxies together.\n\nCo-authored-by: jeanpablo <me@jeanpablo.jp>"
  },
  {
   "sha": "5b6ebee30a317aa80823f53700e4499a0308de25",
   "date": "2026-09-08T23:26:58Z",
   "message": "refactor: share proxy network parsing\n\nUse the shared network parser to select each per-network proxy, matching `-onlynet` and `getnodeaddresses`.\nKeep accepted names, proxy assignments, and error messages unchanged."
  },
  {
   "sha": "27859b3c48a1279aaf71d9ee812e153eddc94813",
   "date": "2026-09-08T23:26:58Z",
   "message": "net: preserve network name case in proxy errors\n\n`-proxy` lowercases unsupported network names in its error message, unlike `-onlynet` and `getnodeaddresses`.\nLet the shared parser handle case-insensitive matching so the diagnostic retains the user's spelling."
  },
  {
   "sha": "b960b1e3e99290937fa2e0b39b69953d59906bfe",
   "date": "2026-09-08T23:26:58Z",
   "message": "doc: use onion in proxy help and examples\n\n`tor` was removed as a network name in #34031, but the proxy help and Tor examples still advertise it.\nUse canonical network names in the help and document `onion` with the removal reference."
  }
 ],
 "timeline": [
  {
   "t": "2026-09-06T21:23:10Z",
   "kind": "review",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "state": "COMMENTED",
   "commit": "723bf379ea17489611b3a992336cc939f3c94747",
   "text": "Concept ACK\n\nBuilt and ran `feature_proxy.py` and `rpc_net.py`, and checked against the base that the refactor commit keeps the same accepted names and the same per-network proxies."
  },
  {
   "t": "2026-09-06T21:23:10Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "doc/tor.md",
   "commit": "723bf379ea17489611b3a992336cc939f3c94747",
   "in_reply_to": null,
   "text": "This reads as if `onion` were new in 31.0, but v30.0 already accepted `tor` and `onion` for `-proxy` (ca5781e23a). Naming Core also keeps this 31.0 apart from the Tor 0.4.6 above. Something like this?\n\n```suggestion\n- Bitcoin Core 31.0 removed `tor` as a network name. The name to use for onion\n  services is `onion`, as in `-onlynet=onion` or `-proxy=addr:port=onion`\n  ([#34031](https://github.com/bitcoin/bitcoin/pull/34031)).\n```"
  },
  {
   "t": "2026-09-06T21:23:10Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "test/functional/rpc_net.py",
   "commit": "723bf379ea17489611b3a992336cc939f3c94747",
   "in_reply_to": null,
   "text": "nit: `OnIoN` isn't a fourth network here, it's the same one covering case-insensitive matching, and the comment above still describes only the three. Worth widening it?\n\n```suggestion\n        # Test for the absence of onion, I2P and CJDNS addresses, and case-insensitive names.\n```"
  },
  {
   "t": "2026-09-06T21:23:10Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "test/functional/feature_proxy.py",
   "commit": "b960b1e3e99290937fa2e0b39b69953d59906bfe",
   "in_reply_to": null,
   "text": "I found this pre-existing coverage gap while reviewing the refactor. Keeping the name proxy when clearing the IPv4 proxy still passes `feature_proxy.py`. Could we add this case, better placed next to the CJDNS removal below?\n\n```suggestion\n        self.stop_node(1)\n\n        self.log.info(\"Test that clearing the IPv4 proxy also clears the name proxy\")\n        self.start_node(1, extra_args=[f\"-proxy={self.conf1.addr[0]}:{self.conf1.addr[1]}\", \"-proxy=0=ipv4\", \"-dns=0\"])\n        with self.nodes[1].assert_debug_log(\n            expected_msgs=[\"trying v1 connection (manual) to example.com:8333\"],\n            unexpected_msgs=[\"SOCKS5 connecting example.com\"],\n        ):\n            self.nodes[1].addnode(\"example.com:8333\", \"onetry\", v2transport=False)\n        self.stop_node(1)\n```"
  },
  {
   "t": "2026-09-08T23:32:14Z",
   "kind": "force_push",
   "who": "l0rinc",
   "commit": "b960b1e3e99290937fa2e0b39b69953d59906bfe"
  },
  {
   "t": "2026-09-08T23:33:07Z",
   "kind": "review_comment",
   "who": "l0rinc",
   "assoc": "MEMBER",
   "path": "test/functional/feature_proxy.py",
   "commit": "b960b1e3e99290937fa2e0b39b69953d59906bfe",
   "in_reply_to": 3945305942,
   "text": "While it's not strictly related, we do need the coverage in this area - added the test and you as coauthor"
  },
  {
   "t": "2026-09-08T23:33:17Z",
   "kind": "review_comment",
   "who": "l0rinc",
   "assoc": "MEMBER",
   "path": "test/functional/rpc_net.py",
   "commit": "723bf379ea17489611b3a992336cc939f3c94747",
   "in_reply_to": 3945305940,
   "text": "removed the whole comment instead"
  },
  {
   "t": "2026-09-08T23:33:31Z",
   "kind": "review_comment",
   "who": "l0rinc",
   "assoc": "MEMBER",
   "path": "doc/tor.md",
   "commit": "723bf379ea17489611b3a992336cc939f3c94747",
   "in_reply_to": 3945305932,
   "text": "Simplified similarly"
  },
  {
   "t": "2026-09-08T23:34:16Z",
   "kind": "review",
   "who": "l0rinc",
   "assoc": "MEMBER",
   "state": "COMMENTED",
   "commit": "b960b1e3e99290937fa2e0b39b69953d59906bfe",
   "text": "Thanks @jeanpablojp, rebased, added new test, updated doc and removed redundant code comment"
  }
 ],
 "labels_log": [
  {
   "t": "2026-09-05T22:32:10Z",
   "action": "labeled",
   "label": "P2P",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 3574,
 "text_tokens_estimate": 893,
 "changed_paths": [
  "doc/tor.md",
  "src/init.cpp",
  "test/functional/feature_proxy.py",
  "test/functional/rpc_net.py"
 ],
 "files": [
  {
   "path": "doc/tor.md",
   "add": 6,
   "del": 2
  },
  {
   "path": "src/init.cpp",
   "add": 13,
   "del": 11
  },
  {
   "path": "test/functional/feature_proxy.py",
   "add": 21,
   "del": 10
  },
  {
   "path": "test/functional/rpc_net.py",
   "add": 3,
   "del": 3
  }
 ],
 "test_lines": 37,
 "git": {
  "head": "b960b1e3e99290937fa2e0b39b69953d59906bfe",
  "head_matches_backup": true,
  "base": "59fd053dac83c989dcb18f6d92e0d17eb7ecb227",
  "commits": [
   {
    "sha": "59be91c81e",
    "subject": "test: characterize proxy network name errors",
    "files": 2,
    "add": 24,
    "del": 13
   },
   {
    "sha": "5b6ebee30a",
    "subject": "refactor: share proxy network parsing",
    "files": 1,
    "add": 11,
    "del": 9
   },
   {
    "sha": "27859b3c48",
    "subject": "net: preserve network name case in proxy errors",
    "files": 2,
    "add": 2,
    "del": 2
   },
   {
    "sha": "b960b1e3e9",
    "subject": "doc: use onion in proxy help and examples",
    "files": 2,
    "add": 7,
    "del": 3
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "308b5c005ab4738a",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}