{
 "number": 36637,
 "input_hash": "e9c58fbc32d83e3d",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-29T01:22:06+00:00",
 "result": {
  "summary": "Sends the -torpassword configuration argument as a hex-encoded string in the Tor control port AUTHENTICATE command instead of a double-quoted string. It also adds a functional test verifying that passwords containing backslashes and quotes authenticate successfully against a mock Tor control server.",
  "problem": "Tor control passwords containing backslashes fail authentication or are mangled. Bitcoin Core previously sent the password as a QuotedString escaping only double quotes, causing Tor's control port parser to misinterpret backslash sequences or reject strings as unterminated.",
  "card": "Encodes -torpassword as unquoted hexadecimal when authenticating to the Tor control port instead of escaping quoted strings. Currently, passwords containing backslashes fail authentication or get mangled because Bitcoin Core only escapes double quotes while Tor parses backslash escapes. The Tor control specification explicitly permits hex-encoded tokens to avoid escaping issues, and this PR adds a functional test covering backslashes and quotes.",
  "evidence": [
   "PR description: 'The Tor password was sent as a QuotedString with only double quotes escaped; as Tor interprets backslash escapes inside it, any password containing a backslash was mangled (or left the string unterminated). The Tor Control spec deliberately allows the token to be sent as unquoted hex \"to avoid escaping issues\"...'"
  ],
  "scope_notes": "",
  "changed_since_previous": "None substantive; the approach and test coverage remain the same.",
  "thread": {
   "last_event_at": "2026-10-27T10:25:30Z",
   "events": 7,
   "head_sha": "a1903e3abe515be94e0f345671d9dc67f4c72a6a",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-26",
    "id": "rc:4375707823",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36637#discussion_r4375707823",
    "what": "address suggestion to update or remove the password-authentication example comment"
   },
   {
    "at": "2026-10-26",
    "id": "rc:4381616091",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36637#discussion_r4381616091",
    "what": "address suggestion to check received hex in mock Tor server"
   }
  ],
  "risk": {
   "level": "low",
   "touches": [
    "other",
    "tests"
   ],
   "why": "A mistake in encoding the authentication command would cause Tor control port authentication to fail, preventing automatic Tor onion service configuration."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-27",
   "open_concerns": [
    "maflcko: update or remove the password-authentication example comment so it matches the wire format",
    "winterrdog: have the mock Tor server verify the received hex and return 515 Bad authentication on mismatch"
   ],
   "resolved_concerns": [
    "vasild: use default empty list instead of None for extra_args (answered by jpk68 2026-10-24)"
   ]
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (winterrdog, vasild, winterrdog)",
   "reason": "Recorded winterrdog's Tested ACK on Windows 10/MSVC (r:5665548329). Open suggestions from maflcko and winterrdog remain awaiting author response.",
   "evidence": [
    "maflcko (suggestion, maintenance, must be answered, open): update or remove the password-authentication example comment so it matches the wire format",
    "winterrdog (suggestion, maintenance, must be answered, open): have the mock Tor server verify the received hex and return 515 Bad authentication on mismatch",
    "winterrdog: Concept ACK \u2014 hex-encoding removes the need for escaping entirely, is explicitly allowed by Tor spec, and is preferred over #36374",
    "vasild: ACK \u2014 verified against the Tor control spec documentation",
    "winterrdog: Tested ACK \u2014 successfully built and tested on Windows 10 / MSVC 19.51.36257 / x86_64"
   ],
   "objections": [
    {
     "reviewer": "vasild",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "style",
     "harm": "",
     "request": "use default empty list instead of None for extra_args",
     "question": "",
     "text": "use default empty list instead of None for extra_args",
     "clears_with": "answer",
     "blocking": false,
     "status": "answered",
     "status_note": "author noted that mutable default argument would fail linter in CI",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [
      "rc:4368067528"
     ],
     "evidence": "2026-10-24: 'def restart_with_mock(self, mock_tor, extra_args=[]):'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36637#discussion_r4367272355",
     "id": "rc:4367272355",
     "at": "2026-10-24",
     "status_at": "2026-10-24",
     "status_by": "jpk68",
     "resolution_evidence": "2026-10-24: jpk68: 'Using `extra_args=[]` would cause this to fail `lint_py_lint` in CI, though, yes?'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "maflcko",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "update or remove the password-authentication example comment so it matches the wire format",
     "question": "",
     "text": "update or remove the password-authentication example comment so it matches the wire format",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-26: 'Update the example or remove it so the authentication summary matches the wire format.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36637#discussion_r4375707823",
     "id": "rc:4375707823",
     "at": "2026-10-26",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "winterrdog",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "have the mock Tor server verify the received hex and return 515 Bad authentication on mismatch",
     "question": "",
     "text": "have the mock Tor server verify the received hex and return 515 Bad authentication on mismatch",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-26: 'the mock could explicitly check the received hex and reply with a `515 Bad authentication` if it does not match, rather than accepting any `AUTHENTICATE`'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36637#discussion_r4381616091",
     "id": "rc:4381616091",
     "at": "2026-10-26",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "winterrdog",
     "reason": "hex-encoding removes the need for escaping entirely, is explicitly allowed by Tor spec, and is preferred over #36374",
     "substantive": true,
     "verdict": "Concept ACK",
     "id": "r:5638016616",
     "url": "https://github.com/bitcoin/bitcoin/pull/36637#pullrequestreview-5638016616",
     "at": "2026-10-24",
     "association": "CONTRIBUTOR",
     "evidence": "read",
     "areas": []
    },
    {
     "reviewer": "vasild",
     "reason": "verified against the Tor control spec documentation",
     "substantive": true,
     "verdict": "ACK",
     "id": "r:5638420552",
     "url": "https://github.com/bitcoin/bitcoin/pull/36637#pullrequestreview-5638420552",
     "at": "2026-10-24",
     "association": "MEMBER",
     "evidence": "read",
     "areas": []
    },
    {
     "reviewer": "winterrdog",
     "reason": "successfully built and tested on Windows 10 / MSVC 19.51.36257 / x86_64",
     "substantive": true,
     "verdict": "Tested ACK",
     "id": "r:5665548329",
     "url": "https://github.com/bitcoin/bitcoin/pull/36637#pullrequestreview-5665548329",
     "at": "2026-10-27",
     "association": "CONTRIBUTOR",
     "evidence": "tested",
     "areas": []
    }
   ],
   "participants": [
    {
     "login": "vasild",
     "stance": "support",
     "note": "ACK referencing Tor spec; suggested nit on test helper default argument",
     "association": "MEMBER",
     "comments": 2,
     "first": "2026-10-24",
     "last": "2026-10-24"
    },
    {
     "login": "winterrdog",
     "stance": "support",
     "note": "Tested ACK; Concept ACK; suggested verifying password in test mock",
     "association": "CONTRIBUTOR",
     "comments": 3,
     "first": "2026-10-24",
     "last": "2026-10-27"
    },
    {
     "login": "maflcko",
     "stance": "neutral",
     "note": "suggested updating or removing the password-authentication example comment",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-26",
     "last": "2026-10-26"
    }
   ],
   "derivation": "substantive support, no open objection (winterrdog, vasild, winterrdog)",
   "model_state": null,
   "corrections": [],
   "notes": "Recorded winterrdog's Tested ACK on Windows 10/MSVC (r:5665548329). Open suggestions from maflcko and winterrdog remain awaiting author response."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "p2p",
    "member": true,
    "evidence": "Changes src/torcontrol.cpp to hex-encode Tor control passwords, falling squarely within P2P's Tor integration scope.",
    "band": "P3",
    "reason_tag": "bug fix",
    "score": 0.35,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 1,
     "user_value": 1
    },
    "rationale": "Fixes authentication failures for Tor control passwords containing backslashes. As noted in the PR description, sending passwords as quoted strings caused Tor to misinterpret backslash escapes or reject them as unterminated, which hex-encoding resolves per the Tor specification."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-29T01:22:06+00:00",
  "code": "2026-10-29T01:26:12+00:00",
  "judgments": 1
 }
}