{
 "number": 36567,
 "input_hash": "d628b2b302085de8",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-20T01:17:16+00:00",
 "result": {
  "summary": "Clears Taproot key and script signatures along with MuSig2 pubnonces and partial signatures in PartiallySignedTransaction::AddInput. This matches the existing behavior that drops legacy partial signatures and witnesses when an input is added to a transaction.",
  "problem": "Adding an input alters the transaction and invalidates any existing signatures. PartiallySignedTransaction::AddInput cleared legacy signatures but kept Taproot and MuSig2 signature fields, causing operations like joinpsbts to output PSBTs carrying stale, invalid signatures for the previous transaction.",
  "card": "Clears Taproot and MuSig2 signatures and nonces inside PartiallySignedTransaction::AddInput when adding an input to a PSBT. Modifying a transaction's inputs invalidates existing signatures, but while legacy signatures were previously cleared, Taproot and MuSig2 signatures remained, causing joinpsbts to output PSBTs carrying invalid signatures from the prior transaction. The functional test confirms that joinpsbts with signed Taproot inputs retained stale signatures and failed wallet signing on master, but succeeds with this fix.",
  "evidence": [
   "Functional test addition in test/functional/rpc_psbt.py demonstrates that joining two PSBTs with signed Taproot inputs previously retained invalid taproot_key_path_sig fields and failed to process cleanly in the wallet, but succeeds with this change (author description and diff)."
  ],
  "scope_notes": "",
  "changed_since_previous": "Now includes the diff and functional test; the code and approach match the previous description.",
  "thread": {
   "last_event_at": "2026-10-19T10:44:15Z",
   "events": 3,
   "head_sha": "b40ac85ff5df1f3a32912a990bddfffed3a64cb7",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": null,
    "id": "",
    "on": "nothing",
    "url": null,
    "what": "no pending items or author responses awaited"
   }
  ],
  "risk": {
   "level": "low",
   "touches": [
    "rpc_api",
    "wallet"
   ],
   "why": "Inadvertent dropping of Taproot or MuSig2 fields when adding inputs could require signers to re-sign, but existing code already drops legacy signatures here because modifying the input set invalidates them."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-19",
   "open_concerns": [],
   "resolved_concerns": []
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (fametrano)",
   "reason": "Added Yudis-bit to participants. Yudis-bit's Tested ACK is excluded from support entries because the account has no project history and provided no rationale.",
   "evidence": [
    "fametrano: Concept ACK \u2014 With this PR, the v0 branch of `AddInput` clears every field that `PSBTInput::HasSignatures` checks, plus the MuSig2 public nonces, matching btclib-wallet behavior",
    "jpk68: ACK"
   ],
   "objections": [],
   "support": [
    {
     "reviewer": "fametrano",
     "reason": "With this PR, the v0 branch of `AddInput` clears every field that `PSBTInput::HasSignatures` checks, plus the MuSig2 public nonces, matching btclib-wallet behavior",
     "substantive": true,
     "verdict": "Concept ACK",
     "id": "c:6256309295",
     "url": "https://github.com/bitcoin/bitcoin/pull/36567#issuecomment-6256309295",
     "at": "2026-10-18",
     "association": "CONTRIBUTOR",
     "evidence": "both",
     "areas": [
      "AddInput",
      "PSBTInput::HasSignatures"
     ]
    },
    {
     "reviewer": "jpk68",
     "reason": "",
     "substantive": false,
     "verdict": "ACK",
     "id": "c:6256748323",
     "url": "https://github.com/bitcoin/bitcoin/pull/36567#issuecomment-6256748323",
     "at": "2026-10-18",
     "association": "CONTRIBUTOR",
     "evidence": "none",
     "areas": []
    }
   ],
   "participants": [
    {
     "login": "fametrano",
     "stance": "support",
     "note": "Concept ACK; notes AddInput now clears all signature fields checked by HasSignatures plus MuSig2 nonces, matching btclib-wallet behavior, and verified test scenario",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-18",
     "last": "2026-10-18"
    },
    {
     "login": "jpk68",
     "stance": "support",
     "note": "ACK b40ac85",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-18",
     "last": "2026-10-18"
    },
    {
     "login": "Yudis-bit",
     "stance": "support",
     "note": "Tested ACK on Windows without rationale; account has no prior project history",
     "association": "NONE",
     "comments": 1,
     "first": "2026-10-19",
     "last": "2026-10-19"
    }
   ],
   "derivation": "substantive support, no open objection (fametrano)",
   "model_state": null,
   "corrections": [],
   "notes": "Added Yudis-bit to participants. Yudis-bit's Tested ACK is excluded from support entries because the account has no project history and provided no rationale."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "rpc",
    "member": true,
    "evidence": "Changes PSBT manipulation behavior exposed via RPC (such as `joinpsbts`) in `src/psbt.cpp` and tested in `test/functional/rpc_psbt.py`, meeting the borderline criteria of a PSBT change affecting RPC without wallet code.",
    "band": "P3",
    "reason_tag": "bug fix",
    "score": 0.4,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 1
    },
    "rationale": "Corrects `PartiallySignedTransaction::AddInput` to clear stale Taproot and MuSig2 signatures when joining or adding inputs, fixing invalid signature retention in operations like `joinpsbts`."
   },
   {
    "name": "wallet",
    "member": false,
    "evidence": "Although the wallet category covers PSBT handling, the category explicitly notes that a PSBT change affecting RPC/utility usage without wallet code is rpc, not wallet.",
    "band": "Unranked",
    "reason_tag": "bug fix",
    "score": 0.0,
    "factors": {
     "bug_severity": 1,
     "leverage": 0,
     "performance": 0,
     "security_stability": 0,
     "user_value": 1
    },
    "rationale": "Non-member per category boundary guidance that PSBT changes affecting RPC without wallet code belong to RPC rather than wallet."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-20T01:17:16+00:00",
  "code": "2026-10-20T01:18:50+00:00",
  "judgments": 2
 }
}