{
 "number": 36466,
 "input_hash": "0d6bc4f840fbe43c",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-25T01:14:33+00:00",
 "result": {
  "summary": "Updates standardness policy in IsWitnessStandard to allow Taproot transactions with annexes, provided the annex is either marker-only (0x50) or unstructured data prefixed with 0x50 0x00. All non-P2A inputs in a transaction must include an annex if any input does, while native P2A inputs are exempt from opting in. Other annex prefixes remain non-standard, and annex weight is bounded only by the standard transaction weight limit.",
  "problem": "BIP 341 Taproot annexes are currently treated as non-standard by mempool policy, preventing nodes from relaying or accepting standard transactions that utilize annexes for arbitrary data or marker-based opt-in.",
  "card": "Relaxes mempool policy to treat Taproot annexes as standard if they consist solely of the 0x50 marker or unstructured data starting with 0x50 0x00. Under current policy, any Taproot transaction with an annex is rejected from standard mempools. To protect multi-party transactions against unilateral witness inflation or pinning, the rule requires all non-P2A inputs in a transaction to include an annex if any input does. The PR revisits the concept from closed PR 27926 and Libre Relay without citing new external user requirements.",
  "evidence": [
   "PR description: 'Builds on #27926 and Libre Relay' and 'This opt-in rule protects transactions that do not opt in. It does not prevent annex inflation by opted-in participants.'",
   "Commit aa85bd97d1: 'Permit marker-only annexes and annexes whose first byte after the 0x50 marker is 0x00, reserving other prefixes for future semantics.'"
  ],
  "scope_notes": "",
  "changed_since_previous": "Now provides the full patch including the P2A input exemption logic in IsWitnessStandard, unit tests in transaction_tests.cpp, and functional test coverage in feature_taproot.py.",
  "thread": {
   "last_event_at": "2026-10-24T22:07:00Z",
   "events": 13,
   "head_sha": "b4179ad2fb6154a4e93f46389cca00b6926fbd2f",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-22",
    "id": "c:6332088999",
    "on": "reviewer",
    "url": "https://github.com/bitcoin/bitcoin/pull/36466#issuecomment-6332088999",
    "what": "sipa to evaluate author's response on motivation and purpose"
   }
  ],
  "risk": {
   "level": "medium",
   "touches": [
    "mempool_policy"
   ],
   "why": "Mistakes in standardness checks could permit standard relay of transactions exposed to pinning or witness inflation attacks, or lead to inconsistent relay policy across the network."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-24",
   "open_concerns": [],
   "resolved_concerns": [
    "petertodd: spends of P2A outputs cannot contain an annex and must be excluded from the annex rule (fixed by RobinLinus 2026-10-08)",
    "petertodd: re-add the 'witness stuffing detected' comment to explain the line's purpose (fixed by RobinLinus 2026-10-08)",
    "petertodd: move the comment about P2A inputs and the annex to this location (fixed by RobinLinus 2026-10-08)",
    "petertodd: why the fragment skipping further checks if scriptWitness is empty is there when it seems unrelated to annexes (answered by RobinLinus 2026-10-08)",
    "petertodd: clarify comment to state annexes must be zero-length or start with unstructured prefix 0x00 (fixed by RobinLinus 2026-10-08)",
    "petertodd: explain in comment why unstructured marker 0x00 is used and reserved for future consensus use (fixed by RobinLinus 2026-10-08)",
    "petertodd: use the term 'transaction pinning attack' in the comment (fixed by RobinLinus 2026-10-08)",
    "sipa: clarify the purpose and value of standardizing annexes before consensus meaning is added or active network use exists (answered by RobinLinus 2026-10-22)"
   ]
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Positive",
   "summary": "Positive: support without stated reasons, no open objection (petertodd, Rob1Ham)",
   "reason": "Added Rob1Ham's ACK to support and participants list.",
   "evidence": [
    "petertodd: ACK",
    "Rob1Ham: ACK"
   ],
   "objections": [
    {
     "reviewer": "petertodd",
     "association": "CONTRIBUTOR",
     "type": "objection",
     "kind": "correctness",
     "harm": "spends of P2A outputs cannot contain an annex and must be excluded from the annex rule",
     "request": "",
     "question": "",
     "text": "spends of P2A outputs cannot contain an annex and must be excluded from the annex rule",
     "clears_with": "change",
     "blocking": true,
     "status": "fixed",
     "status_note": "exempted native P2A inputs in bb6ccd0",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6058269299"
     ],
     "evidence": "2026-10-08: 'We should exclude spends of P2A outputs here, as they can't contain an annex.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#issuecomment-6057525720",
     "id": "c:6057525720",
     "at": "2026-10-08",
     "status_at": "2026-10-08",
     "status_by": "RobinLinus",
     "resolution_evidence": "2026-10-08: RobinLinus: 'fixed in bb6ccd0. Native P2A inputs are exempt; their witnesses must remain empty.'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "petertodd",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "re-add the 'witness stuffing detected' comment to explain the line's purpose",
     "question": "",
     "text": "re-add the 'witness stuffing detected' comment to explain the line's purpose",
     "clears_with": "answer",
     "blocking": false,
     "status": "fixed",
     "status_note": "addressed in b4179ad",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6066221892"
     ],
     "evidence": "2026-10-08: 'You should re-add the \"witness stuffing detected\" comment here to explain what this line is doing.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#discussion_r4218079081",
     "id": "rc:4218079081",
     "at": "2026-10-08",
     "status_at": "2026-10-08",
     "status_by": "RobinLinus",
     "resolution_evidence": "2026-10-08: RobinLinus: 'addressed in b4179ad'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "petertodd",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "move the comment about P2A inputs and the annex to this location",
     "question": "",
     "text": "move the comment about P2A inputs and the annex to this location",
     "clears_with": "answer",
     "blocking": false,
     "status": "fixed",
     "status_note": "addressed in b4179ad",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6066221892"
     ],
     "evidence": "2026-10-08: '...and the comment about P2A inputs and the annex probably makes more sense here.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#discussion_r4218085007",
     "id": "rc:4218085007",
     "at": "2026-10-08",
     "status_at": "2026-10-08",
     "status_by": "RobinLinus",
     "resolution_evidence": "2026-10-08: RobinLinus: 'addressed in b4179ad'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "petertodd",
     "association": "CONTRIBUTOR",
     "type": "question",
     "kind": "correctness",
     "harm": "",
     "request": "",
     "question": "why the fragment skipping further checks if scriptWitness is empty is there when it seems unrelated to annexes",
     "text": "why the fragment skipping further checks if scriptWitness is empty is there when it seems unrelated to annexes",
     "clears_with": "answer",
     "blocking": false,
     "status": "answered",
     "status_note": "author explained empty-witness check moved below P2A handling in b4179ad",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [
      "c:6066221892"
     ],
     "evidence": "2026-10-08: 'I'm confused by this fragment. It doesn't look like it's related to the annex stuff at all.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#discussion_r4218105149",
     "id": "rc:4218105149",
     "at": "2026-10-08",
     "status_at": "2026-10-08",
     "status_by": "RobinLinus",
     "resolution_evidence": "2026-10-08: RobinLinus: 'The empty-witness check moved below P2A handling so anchors are counted before the early `continue`.'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "petertodd",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "clarify comment to state annexes must be zero-length or start with unstructured prefix 0x00",
     "question": "",
     "text": "clarify comment to state annexes must be zero-length or start with unstructured prefix 0x00",
     "clears_with": "answer",
     "blocking": false,
     "status": "fixed",
     "status_note": "addressed in b4179ad",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6066221892"
     ],
     "evidence": "2026-10-08: 'It'd be more clear to say that \"Annexes must be zero-length, or start with the unstructured data prefix, 0x00\"'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#discussion_r4218113901",
     "id": "rc:4218113901",
     "at": "2026-10-08",
     "status_at": "2026-10-08",
     "status_by": "RobinLinus",
     "resolution_evidence": "2026-10-08: RobinLinus: 'addressed in b4179ad'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "petertodd",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "explain in comment why unstructured marker 0x00 is used and reserved for future consensus use",
     "question": "",
     "text": "explain in comment why unstructured marker 0x00 is used and reserved for future consensus use",
     "clears_with": "answer",
     "blocking": false,
     "status": "fixed",
     "status_note": "addressed in b4179ad",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6066221892"
     ],
     "evidence": "2026-10-08: 'We should explain why the unstructured marker is being used here: 0x00 is reserved, so that future consensus-related usage of the annex can use a different prefix'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#discussion_r4218142203",
     "id": "rc:4218142203",
     "at": "2026-10-08",
     "status_at": "2026-10-08",
     "status_by": "RobinLinus",
     "resolution_evidence": "2026-10-08: RobinLinus: 'addressed in b4179ad'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "petertodd",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "use the term 'transaction pinning attack' in the comment",
     "question": "",
     "text": "use the term 'transaction pinning attack' in the comment",
     "clears_with": "answer",
     "blocking": false,
     "status": "fixed",
     "status_note": "addressed in b4179ad",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6066221892"
     ],
     "evidence": "2026-10-08: 'You should use the term \"transaction pinning attack\" here, so people have something to google.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#discussion_r4218158417",
     "id": "rc:4218158417",
     "at": "2026-10-08",
     "status_at": "2026-10-08",
     "status_by": "RobinLinus",
     "resolution_evidence": "2026-10-08: RobinLinus: 'addressed in b4179ad'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "sipa",
     "association": "MEMBER",
     "type": "suggestion",
     "kind": "usefulness",
     "harm": "",
     "request": "clarify the purpose and value of standardizing annexes before consensus meaning is added or active network use exists",
     "question": "",
     "text": "clarify the purpose and value of standardizing annexes before consensus meaning is added or active network use exists",
     "clears_with": "answer",
     "blocking": false,
     "status": "answered",
     "status_note": "author explained motivation for data availability for metaprotocols and P2P relay",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [
      "c:6332088999"
     ],
     "evidence": "2026-10-20: 'What is the purpose of this? I was imagining that annex standardness would be added at the same time consensus-relevant meaning would be given to annexes.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#issuecomment-6288789786",
     "id": "c:6288789786",
     "at": "2026-10-20",
     "status_at": "2026-10-22",
     "status_by": "RobinLinus",
     "resolution_evidence": "2026-10-22: RobinLinus: 'The motivation is data availability for metaprotocols, including a range of shielded protocols'",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "petertodd",
     "reason": "",
     "substantive": false,
     "verdict": "ACK",
     "id": "c:6129681032",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#issuecomment-6129681032",
     "at": "2026-10-12",
     "association": "CONTRIBUTOR",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "Rob1Ham",
     "reason": "",
     "substantive": false,
     "verdict": "ACK",
     "id": "c:6390126363",
     "url": "https://github.com/bitcoin/bitcoin/pull/36466#issuecomment-6390126363",
     "at": "2026-10-24",
     "association": "CONTRIBUTOR",
     "evidence": "none",
     "areas": []
    }
   ],
   "participants": [
    {
     "login": "petertodd",
     "stance": "support",
     "note": "utACK b4179ad after earlier objection on P2A input handling and comments were addressed",
     "association": "CONTRIBUTOR",
     "comments": 8,
     "first": "2026-10-08",
     "last": "2026-10-12"
    },
    {
     "login": "sipa",
     "stance": "question",
     "note": "questioned the purpose of standardizing annexes without consensus meaning or active network use",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-20",
     "last": "2026-10-20"
    },
    {
     "login": "Rob1Ham",
     "stance": "support",
     "note": "ACK with no rationale",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-24",
     "last": "2026-10-24"
    }
   ],
   "derivation": "support without stated reasons, no open objection (petertodd, Rob1Ham)",
   "model_state": null,
   "corrections": [],
   "notes": "Added Rob1Ham's ACK to support and participants list."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "mempool",
    "member": true,
    "evidence": "Carries the 'TX fees and policy' label and modifies standardness rules in 'src/policy/policy.cpp' and 'src/policy/policy.h'.",
    "band": "P2",
    "reason_tag": "new feature",
    "score": 0.62,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 0,
     "security_stability": 1,
     "user_value": 2
    },
    "rationale": "Permitting marker-only and unstructured Taproot annexes expands standard transaction relay policy for BIP 341 annex use cases. Policy expansions with protocol implications warrant deliberate review attention regarding DoS and third-party malleation risks."
   },
   {
    "name": "validation",
    "member": false,
    "evidence": "Touches 1 line in 'src/script/interpreter.cpp', but does not alter consensus validity or block validation rules, only standardness relay policy.",
    "band": "Unranked",
    "reason_tag": "new feature",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 0,
     "security_stability": 1,
     "user_value": 2
    },
    "rationale": "Annexes are already consensus-valid under BIP 341; modifying standardness policy belongs to mempool rather than validation."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-25T01:14:33+00:00",
  "code": "2026-10-10T01:25:37+00:00",
  "judgments": 2
 }
}