{
 "number": 36569,
 "input_hash": "91065bfc18b8f739",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-21T01:20:07+00:00",
 "result": {
  "summary": "Updates `analyzepsbt` to mark a PSBT as invalid when total output amount exceeds total input amount once all input amounts are known. Instead of returning a negative fee and suggesting next roles like updater or signer, the RPC now returns an error string and sets the next role to creator.",
  "problem": "When all input amounts are known but outputs exceed inputs, `analyzepsbt` calculates a negative fee and fee rate, advising downstream roles like updater or signer for a transaction that can never be validly mined.",
  "card": "Updates analyzepsbt to report an error when output amounts exceed input amounts on a PSBT with all input values known. Currently, analyzepsbt calculates a negative fee and directs the user to updater or signer for a transaction that can never become valid. It now sets the next role to creator and returns an invalid PSBT error, aligning with existing checks for bad input values or unspendable outputs.",
  "evidence": [
   "PR description: 'A PSBT whose outputs are worth more than its inputs therefore gets a negative fee and a next role of updater, even though no wallet can ever sign it into a valid transaction.'"
  ],
  "scope_notes": "",
  "changed_since_previous": "",
  "thread": {
   "last_event_at": "2026-10-20T13:09:10Z",
   "events": 4,
   "head_sha": "82629330135ba7df7ef5fc061ffadca3288043b1",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-19",
    "id": "c:6265384243",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36569#issuecomment-6265384243",
    "what": "response to suggestion about adding a unit test in psbt_tests"
   }
  ],
  "risk": {
   "level": "low",
   "touches": [
    "rpc_api"
   ],
   "why": "A bug in this check could falsely reject or misreport the next role in analyzepsbt for valid PSBTs, but it only triggers when known outputs strictly exceed known inputs."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-20",
   "open_concerns": [
    "Yudis-bit: Consider adding a unit test in psbt_tests"
   ],
   "resolved_concerns": []
  },
  "reviewability": {
   "state": "Paused",
   "label": "Waiting on author",
   "reason": "Open objection from Yudis-bit with no author reply for 12 days; review would repeat what has been asked."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (Husteem)",
   "reason": "Added Husteem's Tested ACK and winterrdog's query regarding test scope. Yudis-bit's unit test suggestion remains open awaiting author response.",
   "evidence": [
    "Yudis-bit (suggestion, maintenance, must be answered, open): Consider adding a unit test in psbt_tests",
    "Yudis-bit: Tested ACK \u2014 tested on Windows",
    "Husteem: Tested ACK \u2014 guard in AnalyzePSBT is a good fix; verified bug on master and rpc_psbt.py passes"
   ],
   "objections": [
    {
     "reviewer": "Yudis-bit",
     "association": "NONE",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "Consider adding a unit test in psbt_tests",
     "question": "",
     "text": "Consider adding a unit test in psbt_tests",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "no author reply",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-19: 'Would it be worth also adding a unit test in psbt_tests?'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36569#issuecomment-6265384243",
     "id": "c:6265384243",
     "at": "2026-10-19",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "Yudis-bit",
     "reason": "tested on Windows",
     "substantive": false,
     "verdict": "Tested ACK",
     "id": "c:6265384243",
     "url": "https://github.com/bitcoin/bitcoin/pull/36569#issuecomment-6265384243",
     "at": "2026-10-19",
     "association": "NONE",
     "evidence": "tested",
     "areas": []
    },
    {
     "reviewer": "Husteem",
     "reason": "guard in AnalyzePSBT is a good fix; verified bug on master and rpc_psbt.py passes",
     "substantive": true,
     "verdict": "Tested ACK",
     "id": "c:6287850935",
     "url": "https://github.com/bitcoin/bitcoin/pull/36569#issuecomment-6287850935",
     "at": "2026-10-20",
     "association": "NONE",
     "evidence": "both",
     "areas": [
      "AnalyzePSBT",
      "rpc_psbt.py"
     ]
    }
   ],
   "participants": [
    {
     "login": "Yudis-bit",
     "stance": "support",
     "note": "Tested ACK; suggested adding a unit test in psbt_tests",
     "association": "NONE",
     "comments": 1,
     "first": "2026-10-19",
     "last": "2026-10-19"
    },
    {
     "login": "Husteem",
     "stance": "support",
     "note": "Tested ACK; supported adding a unit test but conceded functional tests cover the regression",
     "association": "NONE",
     "comments": 2,
     "first": "2026-10-20",
     "last": "2026-10-20"
    },
    {
     "login": "winterrdog",
     "stance": "neutral",
     "note": "questioned the motive for adding a unit test given existing functional test coverage",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-20",
     "last": "2026-10-20"
    }
   ],
   "derivation": "substantive support, no open objection (Husteem)",
   "model_state": null,
   "corrections": [],
   "notes": "Added Husteem's Tested ACK and winterrdog's query regarding test scope. Yudis-bit's unit test suggestion remains open awaiting author response."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "p2p",
    "member": false,
    "evidence": "Changes analyzepsbt RPC logic; does not touch peer-to-peer networking, protocol messages, or transport.",
    "band": "Unranked",
    "reason_tag": "bug fix",
    "score": 0.0,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 1
    },
    "rationale": "The PR touches only PSBT analysis logic in RPC, with no connection to P2P message relay or peer management."
   },
   {
    "name": "rpc",
    "member": true,
    "evidence": "Modifies `src/node/psbt.cpp` to adjust `analyzepsbt` RPC behavior and error reporting when PSBT outputs exceed inputs.",
    "band": "P3",
    "reason_tag": "bug fix",
    "score": 0.35,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 1
    },
    "rationale": "Fixes `analyzepsbt` calculating a negative fee and advising downstream roles like updater or signer for unspendable transactions. The change prevents confusing output when inputs and outputs are fully known."
   },
   {
    "name": "wallet",
    "member": false,
    "evidence": "Only touches `src/node/psbt.cpp` and functional RPC tests without altering wallet internals or wallet code.",
    "band": "Unranked",
    "reason_tag": "bug fix",
    "score": 0.0,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 1
    },
    "rationale": "The wallet category notes that a PSBT change affecting only RPC without wallet code belongs to RPC, not wallet."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-21T01:20:07+00:00",
  "code": "2026-10-20T01:18:49+00:00",
  "judgments": 3
 }
}