{
 "number": 29843,
 "input_hash": "890b1dd578b1f5e3",
 "model": "openrouter/google/gemini-3.8-flash",
 "batch": false,
 "created": "2026-09-17T21:18:07+00:00",
 "provider": "Google",
 "stop_reason": "end_turn",
 "usage": {
  "input_tokens": 62762,
  "cache_creation_input_tokens": 0,
  "cache_read_input_tokens": 0,
  "output_tokens": 8902
 },
 "cost_usd": 0.080454,
 "error": null,
 "result": {
  "display": {
   "goal": [
    "Allow transactions with non-mandatory script verify flag violations into testnet mempools with -acceptnonstdtxn=1.",
    "Help developers test proposed soft forks and non-standard scripts without needing custom client forks."
   ],
   "reviewability": [
    "Ready for review.",
    "CI is green and recent review feedback from sedited is open for optional follow-up."
   ],
   "agreement": [
    "Widespread concept support for soft-fork testing utility (benthecarman, glozow, fjahr, 1440000bytes, ismaelsadeeq, sedited).",
    "Approach ACK on pragmatic caller-specified error handling (sedited).",
    "Minor open question whether compile-time wrapper in GetBlockScriptFlags is overly complex compared to a unit test (sedited)."
   ],
   "categories": [
    {
     "name": "mempool",
     "why": [
      "P3 because it relaxes mempool policy on testnets to permit non-standard script execution.",
      "Valuable for testing soft fork proposals like OP_CAT or APO, but deferrable and restricted to test networks."
     ]
    },
    {
     "name": "validation",
     "why": [
      "P3 because it clarifies CheckInputScripts caller contexts and enforces invariants between block and policy script flags.",
      "Retires potential ambiguity between block and mempool validation failure paths."
     ]
    }
   ]
  },
  "summary": "This pull request modifies the `-acceptnonstdtxn=1` option on test networks so that it skips non-mandatory script checks, allowing transactions that use opcodes such as OP_SUCCESS or OP_NOPx into the mempool. It distinguishes between block and mempool script checks in `CheckInputScripts` via an explicit enum and introduces compile-time and runtime checks ensuring consensus block script flags remain a subset of policy flags.",
  "problem": "On test networks, developers and testers experimenting with future soft-fork features (such as OP_CAT or SIGHASH_APO) cannot get transactions into a standard Bitcoin Core mempool without maintaining custom forks like bitcoin-inquisition, because the node rejects non-mandatory script verify flags even when -acceptnonstdtxn=1 is specified.",
  "discussion": {
   "open_concerns": [
    "sedited questioned whether the StandardScriptVerifyFlags consteval wrapper in GetBlockScriptFlags adds unnecessary complexity and could be replaced with a unit test."
   ],
   "resolved_concerns": [
    "luke-jr argued that altering -acceptnonstdtxn beyond its historical Knots behavior should require a new option value, but reviewers agreed existing testnet-only behavior does not require Knots compatibility.",
    "ismaelsadeeq proposed refactoring CheckInputScripts to return raw errors rather than passing caller context; ajtowns and sedited preferred an explicit enum parameter, which was implemented.",
    "instagibbs explored reporting block-level errors without caller enum differentiation, but agreed with ajtowns that tip-dependent differences justify explicit context."
   ],
   "author_status": "Active; last pushed updates in July 2026 addressing review comments, with one recent suggestion from sedited in September 2026 pending response."
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "The PR has passing CI, clean mergeability, and the open feedback from sedited is a minor design question rather than a blocking rework."
  },
  "agreement": {
   "participants": [
    {
     "login": "1440000bytes",
     "stance": "support",
     "note": "Concept ACK"
    },
    {
     "login": "benthecarman",
     "stance": "support",
     "note": "Concept ACK noting utility for testing soft forks on testnets"
    },
    {
     "login": "luke-jr",
     "stance": "objection",
     "note": "Objected that this goes beyond expected -acceptnonstdtxn behavior from Knots and suggested =2"
    },
    {
     "login": "glozow",
     "stance": "support",
     "note": "Concept ACK"
    },
    {
     "login": "instagibbs",
     "stance": "support",
     "note": "Reviewed validation logic, questioned scope/approach alternatives, found author rationale persuasive"
    },
    {
     "login": "twosatsmaxi",
     "stance": "neutral",
     "note": "Stated following"
    },
    {
     "login": "fjahr",
     "stance": "support",
     "note": "Concept ACK"
    },
    {
     "login": "sedited",
     "stance": "support",
     "note": "Approach ACK; suggested enum for caller type; later questioned compile-time wrapper type in GetBlockScriptFlags"
    },
    {
     "login": "ismaelsadeeq",
     "stance": "support",
     "note": "Concept ACK; suggested returning errors from CheckInputScripts instead of passing caller context, later yielded to consensus"
    }
   ],
   "objections": [
    {
     "reviewer": "luke-jr",
     "kind": "interface",
     "harm": "Deviates from the semantics of -acceptnonstdtxn established in Knots",
     "blocking": false,
     "author_replied": false,
     "fix_pushed": false,
     "status": "open",
     "evidence": "2024-04-21: 'Seems like this goes beyond the expected behaviour. Maybe make it =2 at least?'",
     "resolution_evidence": "2024-04-22: instagibbs noted 'Since these are test-network-only changes, are we required to preserve current behavior?' and discussion moved on.",
     "sources": [
      "dossier",
      "thread"
     ],
     "status_merged_from": "thread"
    },
    {
     "reviewer": "ismaelsadeeq",
     "kind": "approach",
     "harm": "CheckInputScripts becomes brittle by knowing caller context rather than just returning verification errors",
     "blocking": false,
     "author_replied": true,
     "fix_pushed": true,
     "status": "resolved",
     "evidence": "2026-03-29: 'I think the second commit adds some brittleness to the CheckInputScripts function; it now needs to know whether we are in block validation or individual transaction validation.'",
     "resolution_evidence": "2026-04-04: ismaelsadeeq noted 'I\u2019m curious to hear other reviewers\\' thoughts, though, not rigid on this at all' and sedited proposed the enum solution adopted in July 2026.",
     "sources": [
      "dossier",
      "thread"
     ]
    },
    {
     "reviewer": "sedited",
     "kind": "approach",
     "harm": "Adds an intrusive compile-time type wrapper StandardScriptVerifyFlags inside GetBlockScriptFlags instead of testing in unit tests",
     "blocking": false,
     "author_replied": false,
     "fix_pushed": false,
     "status": "open",
     "evidence": "2026-09-17: 'It still seems confusing to me to introduce this type change here in a function that has nothing to do with standardness. Is this check really required in the first place? Maybe the invariant \"GetBlockScriptFlags returns a subset of STANDARD_SCRIPT_VERIFY_FLAGS\" can just be checked in a unit test instead?'",
     "resolution_evidence": "",
     "sources": [
      "dossier"
     ]
    }
   ],
   "support": [
    {
     "reviewer": "benthecarman",
     "reason": "Helpful for testing soft forks on test networks",
     "substantive": true
    },
    {
     "reviewer": "sedited",
     "reason": "Pragmatic solution for caller differentiation and script check verification",
     "substantive": true
    },
    {
     "reviewer": "ismaelsadeeq",
     "reason": "Clarifies consensus vs standardness script verification distinctions",
     "substantive": true
    },
    {
     "reviewer": "glozow",
     "reason": "Concept ACK for test network soft-fork testing enablement",
     "substantive": false
    },
    {
     "reviewer": "fjahr",
     "reason": "Concept ACK",
     "substantive": false
    },
    {
     "reviewer": "1440000bytes",
     "reason": "Concept ACK",
     "substantive": false
    },
    {
     "reviewer": "instagibbs",
     "reason": "logic looks correct",
     "substantive": true
    }
   ],
   "state": "Mild",
   "summary": "Strong concept and approach support; minor open question from sedited regarding compile-time check placement.",
   "reason": "Multiple maintainers and contributors support enabling non-standard script acceptance for test networks, and earlier design disagreements over CheckInputScripts refactoring have converged.",
   "evidence": [
    "benthecarman: 'Concept ACK this would be nice for testing soft forks on test networks'",
    "sedited: 'Approach ACK. Read through the discussion again, and think this is the pragmatic solution.'"
   ],
   "model_state": "Strong",
   "derivation": "nonblocking objection open (luke-jr, sedited)",
   "corrections": [],
   "thread_read": {
    "state": "Mild",
    "derived": "Mild",
    "objections": [
     {
      "reviewer": "luke-jr",
      "kind": "interface",
      "harm": "Violates expected behavior of -acceptnonstdtxn, which originated in Knots where it is available on mainnet and not expected to enable upgradeable opcodes",
      "blocking": false,
      "author_replied": false,
      "fix_pushed": false,
      "status": "open",
      "evidence": "2024-04-21: \"Seems like this goes beyond the expected behaviour. Maybe make it `=2` at least?\"",
      "resolution_evidence": ""
     },
     {
      "reviewer": "ismaelsadeeq",
      "kind": "approach",
      "harm": "CheckInputScripts setting validation state adds brittleness and causes consensus input script failures in non-block paths to report TX_NOT_STANDARD instead of TX_CONSENSUS",
      "blocking": false,
      "author_replied": true,
      "fix_pushed": false,
      "status": "resolved",
      "evidence": "2026-03-29: \"I think the second commit adds some brittleness to the CheckInputScripts function; it now needs to know whether we are in block validation or individual transaction validation.\"",
      "resolution_evidence": "2026-04-04: \"I\u2019m curious to hear other reviewers' thoughts, though, not rigid on this at all. Just bringing up ideas here.\""
     }
    ],
    "support": [
     {
      "reviewer": "benthecarman",
      "reason": "would be nice for testing soft forks on test networks",
      "substantive": true
     },
     {
      "reviewer": "1440000bytes",
      "reason": "Concept ACK",
      "substantive": false
     },
     {
      "reviewer": "glozow",
      "reason": "concept ACK fwiw",
      "substantive": false
     },
     {
      "reviewer": "fjahr",
      "reason": "Concept ACK",
      "substantive": false
     },
     {
      "reviewer": "ismaelsadeeq",
      "reason": "Concept ACK for the advantages stated",
      "substantive": true
     },
     {
      "reviewer": "sedited",
      "reason": "Approach ACK, thinks this is the pragmatic solution",
      "substantive": true
     },
     {
      "reviewer": "instagibbs",
      "reason": "logic looks correct",
      "substantive": true
     }
    ],
    "participants": [
     {
      "login": "1440000bytes",
      "stance": "support",
      "note": "Concept ACK"
     },
     {
      "login": "benthecarman",
      "stance": "support",
      "note": "Concept ACK for testing soft forks on test networks"
     },
     {
      "login": "luke-jr",
      "stance": "objection",
      "note": "argued -acceptnonstdtxn should not enable upgradeable opcodes, suggested -acceptnonstdtxn=2"
     },
     {
      "login": "glozow",
      "stance": "support",
      "note": "Concept ACK"
     },
     {
      "login": "instagibbs",
      "stance": "support",
      "note": "reviewed logic, said logic looks correct with suggestions"
     },
     {
      "login": "twosatsmaxi",
      "stance": "neutral",
      "note": "following"
     },
     {
      "login": "fjahr",
      "stance": "support",
      "note": "Concept ACK"
     },
     {
      "login": "sedited",
      "stance": "support",
      "note": "Approach ACK, suggested enum for CheckType and later asked about runtime check location"
     },
     {
      "login": "ismaelsadeeq",
      "stance": "support",
      "note": "Concept ACK, raised design suggestions around CheckInputScripts error reporting and conceded"
     }
    ],
    "corrections": [],
    "summary": "Mild: luke-jr objects to expanding -acceptnonstdtxn behavior instead of adding a new option value (=2); unaddressed by author.",
    "usage": {
     "input_tokens": 21503,
     "cache_creation_input_tokens": 0,
     "cache_read_input_tokens": 0,
     "output_tokens": 4191
    }
   },
   "first_read": {
    "state": "Mild",
    "model_state": "Strong",
    "objections": [
     {
      "reviewer": "luke-jr",
      "kind": "interface",
      "harm": "Deviates from the semantics of -acceptnonstdtxn established in Knots",
      "blocking": false,
      "author_replied": true,
      "fix_pushed": false,
      "status": "resolved",
      "evidence": "2024-04-21: 'Seems like this goes beyond the expected behaviour. Maybe make it =2 at least?'",
      "resolution_evidence": "2024-04-22: instagibbs noted 'Since these are test-network-only changes, are we required to preserve current behavior?' and discussion moved on."
     },
     {
      "reviewer": "ismaelsadeeq",
      "kind": "approach",
      "harm": "CheckInputScripts becomes brittle by knowing caller context rather than just returning verification errors",
      "blocking": false,
      "author_replied": true,
      "fix_pushed": true,
      "status": "resolved",
      "evidence": "2026-03-29: 'I think the second commit adds some brittleness to the CheckInputScripts function; it now needs to know whether we are in block validation or individual transaction validation.'",
      "resolution_evidence": "2026-04-04: ismaelsadeeq noted 'I\u2019m curious to hear other reviewers\\' thoughts, though, not rigid on this at all' and sedited proposed the enum solution adopted in July 2026."
     },
     {
      "reviewer": "sedited",
      "kind": "approach",
      "harm": "Adds an intrusive compile-time type wrapper StandardScriptVerifyFlags inside GetBlockScriptFlags instead of testing in unit tests",
      "blocking": false,
      "author_replied": false,
      "fix_pushed": false,
      "status": "open",
      "evidence": "2026-09-17: 'It still seems confusing to me to introduce this type change here in a function that has nothing to do with standardness. Is this check really required in the first place? Maybe the invariant \"GetBlockScriptFlags returns a subset of STANDARD_SCRIPT_VERIFY_FLAGS\" can just be checked in a unit test instead?'",
      "resolution_evidence": ""
     }
    ],
    "support": [
     {
      "reviewer": "benthecarman",
      "reason": "Helpful for testing soft forks on test networks",
      "substantive": true
     },
     {
      "reviewer": "sedited",
      "reason": "Pragmatic solution for caller differentiation and script check verification",
      "substantive": true
     },
     {
      "reviewer": "ismaelsadeeq",
      "reason": "Clarifies consensus vs standardness script verification distinctions",
      "substantive": true
     },
     {
      "reviewer": "glozow",
      "reason": "Concept ACK for test network soft-fork testing enablement",
      "substantive": false
     },
     {
      "reviewer": "fjahr",
      "reason": "Concept ACK",
      "substantive": false
     },
     {
      "reviewer": "1440000bytes",
      "reason": "Concept ACK",
      "substantive": false
     }
    ]
   }
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "mempool",
    "member": true,
    "evidence": "Changes mempool acceptance policy under -acceptnonstdtxn to skip non-mandatory script verification flags.",
    "band": "P3",
    "reason_tag": "new feature",
    "score": 0.35,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 2,
     "leverage": 1
    },
    "rationale": "P3 because it adds a useful developer-facing feature for testing non-standard and proposed soft-fork scripts in the mempool without maintaining off-tree patches. It is restricted to test networks and does not fix an active bug or consensus vulnerability on mainnet."
   },
   {
    "name": "validation",
    "member": true,
    "evidence": "Refactors CheckInputScripts in src/validation.cpp to take an explicit CheckInputScriptsFor enum and adds GetAllConsensusScriptFlags to ChainstateManager.",
    "band": "P3",
    "reason_tag": "cleanup",
    "score": 0.3,
    "factors": {
     "security_stability": 1,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 1
    },
    "rationale": "P3 because it clarifies and hardens the distinction between block consensus script errors and mempool policy script errors in CheckInputScripts, while asserting that consensus flags remain a strict subset of standard script verify flags."
   },
   {
    "name": "p2p",
    "member": false,
    "evidence": "Functional test updates in test/functional/p2p_invalid_tx.py and test/functional/p2p_segwit.py purely adjust test expectations for the modified mempool policy.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "Not a p2p PR; changes to p2p test scripts are secondary adjustments accommodating the mempool policy changes."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": [],
  "card": "PR #29843 updates -acceptnonstdtxn=1 so that it permits non-mandatory script verify flag failures (such as OP_SUCCESS or OP_NOPx) into the mempool on test networks. This facilitates testing upcoming soft-fork proposals like OP_CAT without requiring custom client builds like inquisition. It also clarifies error categorization in CheckInputScripts by explicitly passing whether validation is for a block or mempool entry. Reviewers broadly support the concept, and the PR is ready for review with only a minor open question from sedited regarding a compile-time flag wrapper."
 },
 "raw_text": null,
 "prompt_hash": "c1bd47c5",
 "second_read_cost_usd": 0.0318435
}