{
 "number": 36577,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36577",
 "title": "psbt: accept taproot ALL sigs with sighash unset",
 "author": "fametrano",
 "author_association": "FIRST_TIME_CONTRIBUTOR",
 "created_at": "2026-10-19T20:49:04Z",
 "updated_at": "2026-10-30T17:04:24Z",
 "description_hash": "d602962af50292be",
 "age_days": 13,
 "draft": false,
 "labels": [
  "PSBT"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "1291d0e3895791bc700d4901c66d77dcbb42ed69",
 "head_ref": "psbt-taproot-sighash-absent",
 "head_repo": "fametrano/bitcoin",
 "head_history": [],
 "additions": 87,
 "deletions": 2,
 "changed_files": 2,
 "commit_count": 1,
 "size_bucket": "S",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "ack": [
     {
      "login": "Yudis-bit",
      "url": "https://github.com/bitcoin/bitcoin/pull/36577#issuecomment-6286973879"
     }
    ],
    "approach_ack": [
     {
      "login": "Husteem",
      "url": "https://github.com/bitcoin/bitcoin/pull/36577#issuecomment-6346377698"
     }
    ]
   },
   "conflicts": []
  }
 },
 "acks_parsed": {
  "Yudis-bit": {
   "kind": "ack",
   "hash": "1291d0e389",
   "t": "2026-10-20T08:38:53Z",
   "stale": false
  },
  "Husteem": {
   "kind": "approach_ack",
   "hash": null,
   "t": "2026-10-22T16:57:12Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 1,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 1,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "Husteem",
   "Yudis-bit"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-10-19T20:29:46Z",
  "last_reviewer_activity": "2026-10-22T16:57:12Z",
  "last_reviewer": "Husteem",
  "author_silent_days": 13,
  "waiting_on_author_days": 10,
  "days_since_update": 2
 },
 "refs": {
  "mentioned": [
   36507
  ],
  "depends_on": [],
  "fixes": [
   36507
  ],
  "linked_issues": [
   {
    "number": 36507,
    "type": "issue",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "PSBT: SignPSBTInput rejects valid 65-byte taproot script signatures when PSBT_IN_SIGHASH_TYPE is absent"
   }
  ],
  "references": [
   {
    "number": 36507,
    "type": "issue",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "PSBT: SignPSBTInput rejects valid 65-byte taproot script signatures when PSBT_IN_SIGHASH_TYPE is absent"
   }
  ],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "SignPSBTInput() assumes SIGHASH_DEFAULT for a taproot input when\nneither PSBT_IN_SIGHASH_TYPE nor the caller's sighash_type is set.\nIts check of existing signatures then rejected every 65-byte\ntaproot signature, so a PSBT holding a valid SIGHASH_ALL signature\ncould be neither finalized nor signed further.\n\nWhen neither the field nor the parameter is set, the default is only\nassumed, so also accept a 65-byte signature ending in SIGHASH_ALL.\nNONE, SINGLE and ANYONECANPAY variants are still rejected, as are\nall mismatches when the field or the parameter is set.\n\nFixes #36507.\n\n\ud83e\udd16 Generated with [Claude Code](https://claude.com/claude-code)",
 "commits": [
  {
   "sha": "1291d0e3895791bc700d4901c66d77dcbb42ed69",
   "date": "2026-10-19T20:29:46Z",
   "message": "psbt: accept taproot ALL sigs with sighash unset\n\nSignPSBTInput() assumes SIGHASH_DEFAULT for a taproot input when\nneither PSBT_IN_SIGHASH_TYPE nor the caller's sighash_type is set.\nIts check of existing signatures then rejected every 65-byte\ntaproot signature, so a PSBT holding a valid SIGHASH_ALL signature\ncould be neither finalized nor signed further.\n\nWhen neither the field nor the parameter is set, the default is only\nassumed, so also accept a 65-byte signature ending in SIGHASH_ALL.\nNONE, SINGLE and ANYONECANPAY variants are still rejected, as are\nall mismatches when the field or the parameter is set.\n\nFixes #36507."
  }
 ],
 "timeline": [
  {
   "t": "2026-10-20T08:38:53Z",
   "kind": "comment",
   "who": "Yudis-bit",
   "assoc": "NONE",
   "text": "Tested ACK 1291d0e389 on Windows.",
   "id": "c:6286973879",
   "url": "https://github.com/bitcoin/bitcoin/pull/36577#issuecomment-6286973879",
   "hash": "9886fc656233383a",
   "edited": null
  },
  {
   "t": "2026-10-22T16:57:12Z",
   "kind": "comment",
   "who": "Husteem",
   "assoc": "NONE",
   "text": "Approach ACK / tACK [1291d0e](https://github.com/bitcoin/bitcoin/pull/36577/commits/1291d0e3895791bc700d4901c66d77dcbb42ed69)\n\nGood fix for the referenced issue.\nWhen `sighash_type` is unset, accepting 65-byte Taproot signatures ending in `SIGHASH_ALL` is safe because it commits to the identical BIP-341 digest as `SIGHASH_DEFAULT`.\nPreserving rejection for other variants keeps Core's safety checks intact.\n\nTested on Ubuntu 24.04:\n- `psbt_tests` passed (including both new absent-field tests).\n- `rpc_psbt.py` passed cleanly too.",
   "id": "c:6346377698",
   "url": "https://github.com/bitcoin/bitcoin/pull/36577#issuecomment-6346377698",
   "hash": "025eb6523014b789",
   "edited": "2026-10-22T16:58:00Z"
  }
 ],
 "labels_log": [
  {
   "t": "2026-10-19T20:49:08Z",
   "action": "labeled",
   "label": "PSBT",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 1888,
 "text_tokens_estimate": 472,
 "changed_paths": [
  "src/psbt.cpp",
  "src/test/psbt_tests.cpp"
 ],
 "files": [
  {
   "path": "src/psbt.cpp",
   "add": 8,
   "del": 2
  },
  {
   "path": "src/test/psbt_tests.cpp",
   "add": 79,
   "del": 0
  }
 ],
 "test_lines": 79,
 "git": {
  "head": "1291d0e3895791bc700d4901c66d77dcbb42ed69",
  "head_matches_backup": true,
  "base": "d0d1e49c8c1e5582056e8a843229507871f8d1b8",
  "patch_id": "71cc31e31140b6b5",
  "commits": [
   {
    "sha": "1291d0e389",
    "subject": "psbt: accept taproot ALL sigs with sighash unset",
    "files": 2,
    "add": 87,
    "del": 2
   }
  ],
  "patch_truncated": false
 },
 "patch_id": "71cc31e31140b6b5",
 "input_hash": "a2fefdf71650221f",
 "extracted_at": "2026-11-02T01:09:49+00:00"
}