{
 "number": 36305,
 "input_hash": "71c78b526f49ddcf",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-28T01:22:30+00:00",
 "result": {
  "summary": "Sets SO_EXCLUSIVEADDRUSE instead of SO_REUSEADDR on P2P listen sockets on Windows, preventing other local sockets from binding to the same port. Fails socket binding if setting the exclusive address option fails, and adds functional tests covering both binding conflict orderings.",
  "problem": "On Windows, SO_REUSEADDR semantics allow another process running under the same user account to bind to an in-use port if it also sets SO_REUSEADDR. This permits a local process to intercept incoming P2P connections intended for bitcoind.",
  "card": "Sets SO_EXCLUSIVEADDRUSE instead of SO_REUSEADDR on P2P listen sockets on Windows and adds functional tests for port exclusivity. On Windows, default SO_REUSEADDR semantics allow another process under the same user account to bind to an active port and intercept incoming P2P connections. This extends socket exclusivity protections previously merged for RPC listeners in PR #36169.",
  "evidence": [
   "PR description cites Microsoft Winsock documentation: on Windows, SO_REUSEADDR permits a second socket to bind a port already in use by another process under the same user account unless SO_EXCLUSIVEADDRUSE is set.",
   "Follows merged PR #36169, which applied the same SO_EXCLUSIVEADDRUSE fix to the RPC/HTTP listener on Windows."
  ],
  "scope_notes": "",
  "changed_since_previous": "Added a functional test checking the reverse ordering: verifying that bitcoind fails during startup if another process is already bound to its P2P listen port.",
  "thread": {
   "last_event_at": "2026-10-27T18:54:34Z",
   "events": 12,
   "head_sha": "db31a3ad1f75538d07707d373adbfbe90ba8e328",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-27",
    "id": "c:6446436450",
    "on": "reviewer",
    "url": "https://github.com/bitcoin/bitcoin/pull/36305#issuecomment-6446436450",
    "what": "hebasto to verify the commit swap"
   }
  ],
  "risk": {
   "level": "medium",
   "touches": [
    "p2p"
   ],
   "why": "If SO_EXCLUSIVEADDRUSE fails or behaves unexpectedly on certain Windows configurations, bitcoind will fail to bind the P2P socket and refuse to start."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-27",
   "open_concerns": [],
   "resolved_concerns": [
    "hodlinator: treat failure when setting SO_EXCLUSIVEADDRUSE as a fatal error, matching httpserver.cpp (accepted by hodlinator 2026-10-26)",
    "hodlinator: add a test for when the socket is bound before bitcoind runs (accepted by hodlinator 2026-10-26)"
   ]
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (hodlinator)",
   "reason": "hebasto suggested swapping commit order to keep Windows tests passing per-commit, which the author implemented and hodlinator re-ACKed; commit ordering preferences are not tracked as claims. jpk68 updated their bare ACK to the latest commit hash.",
   "evidence": [
    "jpk68: ACK",
    "hodlinator: Concept ACK",
    "hodlinator: ACK \u2014 Ran functional test on Windows. Thanks for taking my suggestions!",
    "hebasto: Concept ACK",
    "hodlinator: ACK \u2014 agrees it is more correct to swap the commit order"
   ],
   "objections": [
    {
     "reviewer": "hodlinator",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "safety",
     "harm": "",
     "request": "treat failure when setting SO_EXCLUSIVEADDRUSE as a fatal error, matching httpserver.cpp",
     "question": "",
     "text": "treat failure when setting SO_EXCLUSIVEADDRUSE as a fatal error, matching httpserver.cpp",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "author implemented the error handling and reviewer accepted",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "rc:4371079797"
     ],
     "evidence": "2026-10-23: 'Not sure why setting the option would fail, but I think we should treat it as a fatal error, same as in httpserver.cpp.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36305#discussion_r4358954387",
     "id": "rc:4358954387",
     "at": "2026-10-23",
     "status_at": "2026-10-26",
     "status_by": "hodlinator",
     "resolution_evidence": "2026-10-26: hodlinator: 'Thanks for taking my suggestions!'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "hodlinator",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "approach",
     "harm": "",
     "request": "add a test for when the socket is bound before bitcoind runs",
     "question": "",
     "text": "add a test for when the socket is bound before bitcoind runs",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "author added the test and reviewer accepted",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "rc:4371080995"
     ],
     "evidence": "2026-10-23: 'Could also add a test for when the socket is bound before bitcoind:'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36305#discussion_r4358977350",
     "id": "rc:4358977350",
     "at": "2026-10-23",
     "status_at": "2026-10-26",
     "status_by": "hodlinator",
     "resolution_evidence": "2026-10-26: hodlinator: 'Thanks for taking my suggestions!'",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "jpk68",
     "reason": "",
     "substantive": false,
     "verdict": "ACK",
     "id": "c:6281543300",
     "url": "https://github.com/bitcoin/bitcoin/pull/36305#issuecomment-6281543300",
     "at": "2026-10-20",
     "association": "CONTRIBUTOR",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "hodlinator",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "r:5627501696",
     "url": "https://github.com/bitcoin/bitcoin/pull/36305#pullrequestreview-5627501696",
     "at": "2026-10-23",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "hodlinator",
     "reason": "Ran functional test on Windows. Thanks for taking my suggestions!",
     "substantive": true,
     "verdict": "ACK",
     "id": "r:5650576646",
     "url": "https://github.com/bitcoin/bitcoin/pull/36305#pullrequestreview-5650576646",
     "at": "2026-10-26",
     "association": "MEMBER",
     "evidence": "tested",
     "areas": []
    },
    {
     "reviewer": "hebasto",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "r:5652305051",
     "url": "https://github.com/bitcoin/bitcoin/pull/36305#pullrequestreview-5652305051",
     "at": "2026-10-26",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "hodlinator",
     "reason": "agrees it is more correct to swap the commit order",
     "substantive": false,
     "verdict": "ACK",
     "id": "r:5672657235",
     "url": "https://github.com/bitcoin/bitcoin/pull/36305#pullrequestreview-5672657235",
     "at": "2026-10-27",
     "association": "MEMBER",
     "evidence": "read",
     "areas": []
    }
   ],
   "participants": [
    {
     "login": "jpk68",
     "stance": "support",
     "note": "ACKed the latest commit",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-20",
     "last": "2026-10-20"
    },
    {
     "login": "hodlinator",
     "stance": "support",
     "note": "tested ACK, suggested fatal error handling and test case, re-ACKed after commit swap",
     "association": "MEMBER",
     "comments": 5,
     "first": "2026-10-23",
     "last": "2026-10-27"
    },
    {
     "login": "hebasto",
     "stance": "support",
     "note": "Concept ACK; suggested swapping commit order to avoid test failure on Windows",
     "association": "MEMBER",
     "comments": 2,
     "first": "2026-10-26",
     "last": "2026-10-27"
    }
   ],
   "derivation": "substantive support, no open objection (hodlinator)",
   "model_state": null,
   "corrections": [],
   "notes": "hebasto suggested swapping commit order to keep Windows tests passing per-commit, which the author implemented and hodlinator re-ACKed; commit ordering preferences are not tracked as claims. jpk68 updated their bare ACK to the latest commit hash."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "build",
    "member": false,
    "evidence": "Touches only socket logic in src/net.cpp and functional tests; does not modify the build system, toolchains, CI, or platform build configuration.",
    "band": "Unranked",
    "reason_tag": "platform fix",
    "score": 0.0,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 2,
     "user_value": 0
    },
    "rationale": "Non-member."
   },
   {
    "name": "p2p",
    "member": true,
    "evidence": "Labeled P2P and modifies listener socket options in src/net.cpp.",
    "band": "P2",
    "reason_tag": "platform fix",
    "score": 0.55,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 2,
     "user_value": 0
    },
    "rationale": "Prevents local processes on Windows from hijacking or intercepting incoming P2P connections. Under Windows SO_REUSEADDR semantics, another process running under the same user could otherwise bind the same port without an error."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-28T01:22:30+00:00",
  "code": "2026-10-27T01:30:31+00:00",
  "judgments": 2
 }
}