{
 "number": 36629,
 "input_hash": "644ade2497eee46f",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-11-01T01:16:00+00:00",
 "result": {
  "summary": "Adds an optional transaction output script index (`txoscriptindex`) that indexes script pubkeys by a five-byte SipHash prefix of their SHA256 hash followed by an order-preserving `OrderedVarInt` block height. Introduces a `getscripthistory` RPC allowing queries for transaction outputs and spending transactions by script hash, address, or ranged descriptor across a block height window. Also exposes transaction offsets in `txospenderindex` and refactors transaction JSON rendering into shared RPC helpers.",
  "problem": "Bitcoin Core cannot query historical transactions by address or script without importing them into a wallet, forcing operators of external tools and Electrum servers to run and sync resource-intensive third-party indexing stacks.",
  "card": "Adds an optional `txoscriptindex` and a `getscripthistory` RPC to query output and spending transactions by address, script hash, or ranged descriptor. Bitcoin Core currently cannot query script history without wallet keys or descriptors, forcing node operators running external wallets or Electrum servers to maintain third-party indexers. Script and address indexing has been proposed and closed in at least five previous pull requests since 2013. The author states the index syncs in a few hours, requires ~52 GB of disk space, and works with block pruning.",
  "evidence": [
   "Address indexing has been repeatedly attempted in closed PRs #2802, #3652, #6835, #10370, and #14053 dating back to 2013.",
   "Author reports that the new index 'can be synced in a few hours and the current disk usage is ~52 GB' and functions on pruned nodes, though these benchmarks have not yet been corroborated by independent reviewers."
  ],
  "scope_notes": "Spans a new index implementation with a custom lexicographically order-preserving VarInt serializer (`OrderedVarIntFormatter`), modifications to `txospenderindex` to export transaction offsets, refactored raw transaction JSON documentation and formatting helpers, and extensive functional test suites.",
  "changed_since_previous": "Exposes transaction byte offsets from block headers in `txospenderindex`, extracts shared transaction documentation into `RawTransactionDoc`, and adds test coverage verifying that script history queries are disabled during assumeutxo background validation.",
  "thread": {
   "last_event_at": "2026-10-29T18:10:27Z",
   "events": 13,
   "head_sha": "1fc5b618e3693c824124dd4ee4c3c95e100e645d",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-29",
    "id": "r:5702703273",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5702703273",
    "what": "response to observations regarding mempool conflict error and missing release notes file"
   }
  ],
  "risk": {
   "level": "medium",
   "touches": [
    "rpc_api",
    "other"
   ],
   "why": "Flaws in index key encoding, LevelDB range seeks, or RPC byte-budget enforcement could cause incorrect transaction history results, LevelDB corruption, or excessive disk I/O DoS on the node."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-29",
   "open_concerns": [
    "ViniciusCestarii: State in getscripthistory help that pruned_blocks can be fetched with getblockfrompeer and can contain false positives.",
    "kravens: Allow asof queries during initial index sync by skipping BlockUntilSyncedToCurrentChain() when asof is provided.",
    "kravens: Throw an RPC_INVALID_PARAMETER error when include_mempool=true is explicitly set together with asof.",
    "kravens: Did doc/release-notes-36629.md miss the push?"
   ],
   "resolved_concerns": [
    "kravens: The lookup budget does not count block and undo reads, allowing queries that fit in the 50 MiB budget to read far more disk than intended. (accepted by kravens 2026-10-29)",
    "kravens: Use BigEndianFormatter<3> instead of introducing OrderedVarInt. (accepted by kravens 2026-10-29)",
    "kravens: Sort extra spenders by (height, tx_offset) using CDiskTxPos from txospenderindex instead of reading full blocks. (accepted by kravens 2026-10-29)",
    "kravens: Have Find take the whole set of script hashes to avoid duplicate transaction reads and simplify post-processing. (accepted by kravens 2026-10-29)",
    "kravens: Unify index-layer and RPC-layer budget enforcement and error reporting into a single type. (accepted by kravens 2026-10-29)",
    "kravens: Move getscripthistory RPC handler into its own file (src/rpc/scripthistory.cpp) with one function per step. (accepted by kravens 2026-10-29)",
    "kravens: Declaring TxToJSON in rawtransaction_util.h violates library boundaries because the header belongs to bitcoin_common while TxToJSON takes a Chainstate and is defined in bitcoin_node. (accepted by kravens 2026-10-29)",
    "romanz: Avoid SHA256 hashing for script indexing since Electrum 1.7.x protocol now uses scriptPubKey-based queries directly. (answered by andrewtoth 2026-10-29)"
   ]
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (kravens, kravens)",
   "reason": "Author pushed an update with a new index layout, budget-enforced undo reads, and header fixes; kravens verified the fixes and gave a Tested ACK while dropping remaining earlier suggestions and adding non-blocking observations.",
   "evidence": [
    "ViniciusCestarii (suggestion, interface, must be answered, open): State in getscripthistory help that pruned_blocks can be fetched with getblockfrompeer and can contain false positives.",
    "kravens (suggestion, approach, must be answered, open): Allow asof queries during initial index sync by skipping BlockUntilSyncedToCurrentChain() when asof is provided.",
    "kravens (suggestion, interface, must be answered, open): Throw an RPC_INVALID_PARAMETER error when include_mempool=true is explicitly set together with asof.",
    "kravens (question, maintenance, must be answered, open): Did doc/release-notes-36629.md miss the push?",
    "sedited: Concept ACK",
    "l0rinc: Concept ACK",
    "w0xlt: Concept ACK",
    "kravens: Concept ACK \u2014 Built and ran unit/functional tests and manual regtest testing covering address, Electrum scripthash, ranged wpkh() descriptor, verbosities, and spender linking with expected results",
    "romanz: Concept ACK",
    "ViniciusCestarii: Concept ACK",
    "xyzconstant: Concept ACK",
    "kravens: Tested ACK \u2014 Built and ran unit and functional test suites; verified compact index layout, 6-byte prefix, and asof paging semantics under reorgs"
   ],
   "objections": [
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "objection",
     "kind": "safety",
     "harm": "The lookup budget does not count block and undo reads, allowing queries that fit in the 50 MiB budget to read far more disk than intended.",
     "request": "",
     "question": "",
     "text": "The lookup budget does not count block and undo reads, allowing queries that fit in the 50 MiB budget to read far more disk than intended.",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "author bounded reads to budget; reviewer confirmed fixed",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6499492095"
     ],
     "evidence": "2026-10-23: 'The lookup budget does not count block and undo reads. At verbosity 2, tx_to_json reads the full block and its undo data for every block that holds a non-coinbase match'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5635280324",
     "id": "r:5635280324",
     "at": "2026-10-23",
     "status_at": "2026-10-29",
     "status_by": "kravens",
     "resolution_evidence": "2026-10-29: kravens: 'From my earlier comments, 1 (block and undo reads outside the budget), 3 (spender ordering without a block read) and 7 (TxToJSON header) are fixed'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "approach",
     "harm": "",
     "request": "Use BigEndianFormatter<3> instead of introducing OrderedVarInt.",
     "question": "",
     "text": "Use BigEndianFormatter<3> instead of introducing OrderedVarInt.",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "reviewer dropped the suggestion",
     "cleared": true,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-23: 'OrderedVarInt could be BigEndianFormatter<3>. Big-endian already sorts by height, and the same key already uses it for the tx offset.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5635280324",
     "id": "r:5635280324#2",
     "at": "2026-10-23",
     "status_at": "2026-10-29",
     "status_by": "kravens",
     "resolution_evidence": "2026-10-29: kravens: '2, 4, 5 and 6 were suggestions; no objection to leaving them.'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "approach",
     "harm": "",
     "request": "Sort extra spenders by (height, tx_offset) using CDiskTxPos from txospenderindex instead of reading full blocks.",
     "question": "",
     "text": "Sort extra spenders by (height, tx_offset) using CDiskTxPos from txospenderindex instead of reading full blocks.",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "tx_offset exposed and step-10 block read removed; confirmed by reviewer",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6499492095"
     ],
     "evidence": "2026-10-23: 'Ordering spenders doesn't need a block read. txospenderindex keys already store a CDiskTxPos, and its nTxOffset grows with the transaction's position in the block.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5635280324",
     "id": "r:5635280324#3",
     "at": "2026-10-23",
     "status_at": "2026-10-29",
     "status_by": "kravens",
     "resolution_evidence": "2026-10-29: kravens: 'From my earlier comments, 1 (block and undo reads outside the budget), 3 (spender ordering without a block read) and 7 (TxToJSON header) are fixed'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "approach",
     "harm": "",
     "request": "Have Find take the whole set of script hashes to avoid duplicate transaction reads and simplify post-processing.",
     "question": "",
     "text": "Have Find take the whole set of script hashes to avoid duplicate transaction reads and simplify post-processing.",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "reviewer dropped the suggestion",
     "cleared": true,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-23: 'Find could take the whole set of script hashes. Today the RPC calls Find once per hash and merges results by (height, tx_offset).'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5635280324",
     "id": "r:5635280324#4",
     "at": "2026-10-23",
     "status_at": "2026-10-29",
     "status_by": "kravens",
     "resolution_evidence": "2026-10-29: kravens: '2, 4, 5 and 6 were suggestions; no objection to leaving them.'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "interface",
     "harm": "",
     "request": "Unify index-layer and RPC-layer budget enforcement and error reporting into a single type.",
     "question": "",
     "text": "Unify index-layer and RPC-layer budget enforcement and error reporting into a single type.",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "reviewer dropped the suggestion",
     "cleared": true,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-23: 'One budget, one error. Index lookups charge a uint64_t& and fail with \"Script history index lookup limit exceeded\u2026\". Extra transaction bodies throw a std::runtime_error'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5635280324",
     "id": "r:5635280324#5",
     "at": "2026-10-23",
     "status_at": "2026-10-29",
     "status_by": "kravens",
     "resolution_evidence": "2026-10-29: kravens: '2, 4, 5 and 6 were suggestions; no objection to leaving them.'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "maintenance",
     "harm": "",
     "request": "Move getscripthistory RPC handler into its own file (src/rpc/scripthistory.cpp) with one function per step.",
     "question": "",
     "text": "Move getscripthistory RPC handler into its own file (src/rpc/scripthistory.cpp) with one function per step.",
     "clears_with": "answer",
     "blocking": false,
     "status": "accepted",
     "status_note": "reviewer dropped the suggestion",
     "cleared": true,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-23: 'Could the RPC go in its own file? blockchain.cpp grows by ~530 lines to 4,238. The handler is one ~400-line lambda that opens with a 12-step index comment.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5635280324",
     "id": "r:5635280324#6",
     "at": "2026-10-23",
     "status_at": "2026-10-29",
     "status_by": "kravens",
     "resolution_evidence": "2026-10-29: kravens: '2, 4, 5 and 6 were suggestions; no objection to leaving them.'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "objection",
     "kind": "interface",
     "harm": "Declaring TxToJSON in rawtransaction_util.h violates library boundaries because the header belongs to bitcoin_common while TxToJSON takes a Chainstate and is defined in bitcoin_node.",
     "request": "",
     "question": "",
     "text": "Declaring TxToJSON in rawtransaction_util.h violates library boundaries because the header belongs to bitcoin_common while TxToJSON takes a Chainstate and is defined in bitcoin_node.",
     "clears_with": "change",
     "blocking": true,
     "status": "accepted",
     "status_note": "author moved TxToJSON to rpc/rawtransaction.h; reviewer confirmed fixed",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": true,
     "replies": [
      "c:6499492095"
     ],
     "evidence": "2026-10-23: 'TxToJSON is now declared in rawtransaction_util.h. That header belongs to bitcoin_common, which the wallet also links. TxToJSON takes a Chainstate and is still defined in rawtransaction.cpp in bitcoin'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5635280324",
     "id": "r:5635280324#7",
     "at": "2026-10-23",
     "status_at": "2026-10-29",
     "status_by": "kravens",
     "resolution_evidence": "2026-10-29: kravens: 'From my earlier comments, 1 (block and undo reads outside the budget), 3 (spender ordering without a block read) and 7 (TxToJSON header) are fixed'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "romanz",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "approach",
     "harm": "",
     "request": "Avoid SHA256 hashing for script indexing since Electrum 1.7.x protocol now uses scriptPubKey-based queries directly.",
     "question": "",
     "text": "Avoid SHA256 hashing for script indexing since Electrum 1.7.x protocol now uses scriptPubKey-based queries directly.",
     "clears_with": "answer",
     "blocking": false,
     "status": "answered",
     "status_note": "author replied keeping it for backwards compatibility",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [
      "rc:4413653606"
     ],
     "evidence": "2026-10-26: 'Electrum 1.7.x protocol is now using scriptPubKey-based subscription and queries, so maybe it would simpler to avoid SHA256 here?'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#discussion_r4375204072",
     "id": "rc:4375204072",
     "at": "2026-10-26",
     "status_at": "2026-10-29",
     "status_by": "andrewtoth",
     "resolution_evidence": "2026-10-29: andrewtoth: 'I'm not sure it will make it much simpler. I think it's worth it to keep this for backwards compatibility.'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "ViniciusCestarii",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "interface",
     "harm": "",
     "request": "State in getscripthistory help that pruned_blocks can be fetched with getblockfrompeer and can contain false positives.",
     "question": "",
     "text": "State in getscripthistory help that pruned_blocks can be fetched with getblockfrompeer and can contain false positives.",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-26: 'getscripthistory help could say pruned_blocks blocks can be fetched with getblockfrompeer and then retry. It also could also state that pruned_blocks can contain false positives'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#discussion_r4381546376",
     "id": "rc:4381546376",
     "at": "2026-10-26",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "approach",
     "harm": "",
     "request": "Allow asof queries during initial index sync by skipping BlockUntilSyncedToCurrentChain() when asof is provided.",
     "question": "",
     "text": "Allow asof queries during initial index sync by skipping BlockUntilSyncedToCurrentChain() when asof is provided.",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-29: 'Skipping the two BlockUntilSyncedToCurrentChain() calls when asof is given would let a server start paging old history while the index catches up. Fine as a follow-up.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5702703273",
     "id": "r:5702703273",
     "at": "2026-10-29",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "interface",
     "harm": "",
     "request": "Throw an RPC_INVALID_PARAMETER error when include_mempool=true is explicitly set together with asof.",
     "question": "",
     "text": "Throw an RPC_INVALID_PARAMETER error when include_mempool=true is explicitly set together with asof.",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-29: 'Explicit include_mempool=true together with asof is silently ignored (rpc/blockchain.cpp:3890). The help text says so, but an RPC_INVALID_PARAMETER would make the conflict visible to a caller who set both on purpose.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5702703273",
     "id": "r:5702703273#2",
     "at": "2026-10-29",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "kravens",
     "association": "CONTRIBUTOR",
     "type": "question",
     "kind": "maintenance",
     "harm": "",
     "request": "",
     "question": "Did doc/release-notes-36629.md miss the push?",
     "text": "Did doc/release-notes-36629.md miss the push?",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-29: 'Release notes. The summary mentions release notes, but the branch only touches doc/files.md. Did a doc/release-notes-36629.md miss the push?'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5702703273",
     "id": "r:5702703273#3",
     "at": "2026-10-29",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "sedited",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "c:6372429119",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#issuecomment-6372429119",
     "at": "2026-10-23",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "l0rinc",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "c:6372628097",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#issuecomment-6372628097",
     "at": "2026-10-23",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "w0xlt",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "c:6373603191",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#issuecomment-6373603191",
     "at": "2026-10-23",
     "association": "CONTRIBUTOR",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "kravens",
     "reason": "Built and ran unit/functional tests and manual regtest testing covering address, Electrum scripthash, ranged wpkh() descriptor, verbosities, and spender linking with expected results",
     "substantive": true,
     "verdict": "Concept ACK",
     "id": "r:5635280324",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5635280324",
     "at": "2026-10-23",
     "association": "CONTRIBUTOR",
     "evidence": "both",
     "areas": []
    },
    {
     "reviewer": "romanz",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "r:5649167214",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5649167214",
     "at": "2026-10-26",
     "association": "CONTRIBUTOR",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "ViniciusCestarii",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "r:5657759713",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5657759713",
     "at": "2026-10-26",
     "association": "CONTRIBUTOR",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "xyzconstant",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "c:6502969751",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#issuecomment-6502969751",
     "at": "2026-10-29",
     "association": "CONTRIBUTOR",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "kravens",
     "reason": "Built and ran unit and functional test suites; verified compact index layout, 6-byte prefix, and asof paging semantics under reorgs",
     "substantive": true,
     "verdict": "Tested ACK",
     "id": "r:5702703273",
     "url": "https://github.com/bitcoin/bitcoin/pull/36629#pullrequestreview-5702703273",
     "at": "2026-10-29",
     "association": "CONTRIBUTOR",
     "evidence": "both",
     "areas": [
      "src/index/txoscriptindex",
      "rpc/blockchain.cpp"
     ]
    }
   ],
   "participants": [
    {
     "login": "kravens",
     "stance": "objection",
     "note": "Tested ACK on latest push; earlier objections on unbudgeted reads and header boundaries accepted as fixed",
     "association": "CONTRIBUTOR",
     "comments": 2,
     "first": "2026-10-23",
     "last": "2026-10-29"
    },
    {
     "login": "l0rinc",
     "stance": "support",
     "note": "Concept ACK",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-23",
     "last": "2026-10-23"
    },
    {
     "login": "sedited",
     "stance": "support",
     "note": "Concept ACK",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-23",
     "last": "2026-10-23"
    },
    {
     "login": "w0xlt",
     "stance": "support",
     "note": "Strong Concept ACK",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-23",
     "last": "2026-10-23"
    },
    {
     "login": "ViniciusCestarii",
     "stance": "support",
     "note": "Concept ACK; suggested doc clarifications on pruned_blocks in RPC help",
     "association": "CONTRIBUTOR",
     "comments": 3,
     "first": "2026-10-26",
     "last": "2026-10-26"
    },
    {
     "login": "romanz",
     "stance": "support",
     "note": "Concept ACK; suggested avoiding SHA256 (author answered)",
     "association": "CONTRIBUTOR",
     "comments": 2,
     "first": "2026-10-26",
     "last": "2026-10-26"
    },
    {
     "login": "xyzconstant",
     "stance": "support",
     "note": "Concept ACK",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-29",
     "last": "2026-10-29"
    }
   ],
   "derivation": "substantive support, no open objection (kravens, kravens)",
   "model_state": null,
   "corrections": [],
   "notes": "Author pushed an update with a new index layout, budget-enforced undo reads, and header fixes; kravens verified the fixes and gave a Tested ACK while dropping remaining earlier suggestions and adding non-blocking observations."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "docs",
    "member": false,
    "evidence": "Touches doc/files.md only to document the index database directory introduced by the code changes.",
    "band": "Unranked",
    "reason_tag": "new feature",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 1,
     "security_stability": 0,
     "user_value": 3
    },
    "rationale": "Documentation updates are secondary to the introduction of the new index."
   },
   {
    "name": "indexes",
    "member": true,
    "evidence": "Implements a new optional index in `src/index/txoscriptindex.{h,cpp}` alongside `OrderedVarInt` key formatting and updates to `txospenderindex`.",
    "band": "P2",
    "reason_tag": "new feature",
    "score": 0.68,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 1,
     "security_stability": 0,
     "user_value": 3
    },
    "rationale": "Adds a long-sought script index allowing pruned and full node operators to track script history. Script indexing resolves an architectural gap attempted since 2013 across PRs #2802, #3652, #6835, #10370, and #14053 to serve external indexers and Electrum servers without requiring wallet imports."
   },
   {
    "name": "mempool",
    "member": false,
    "evidence": "Does not touch mempool data structures, eviction, or transaction relay policy.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 1,
     "security_stability": 1,
     "user_value": 3
    },
    "rationale": "Does not modify mempool acceptance or policy rules."
   },
   {
    "name": "p2p",
    "member": false,
    "evidence": "Does not touch peer-to-peer networking, message handling, or transport.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 1,
     "security_stability": 1,
     "user_value": 3
    },
    "rationale": "Does not modify network communication or protocol handling."
   },
   {
    "name": "rpc",
    "member": true,
    "evidence": "Adds the `getscripthistory` RPC method in `src/rpc/blockchain.cpp` and refactors transaction JSON rendering into `src/rpc/rawtransaction_util.cpp`.",
    "band": "P2",
    "reason_tag": "user request",
    "score": 0.62,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 1,
     "security_stability": 0,
     "user_value": 3
    },
    "rationale": "Exposes a public RPC method repeatedly requested by downstream tooling to query historical transactions and spends by script hash or descriptor window. This fills a significant capability gap in Bitcoin Core's programmatic interface that previously forced external consumers to run separate indexing stacks."
   },
   {
    "name": "tests",
    "member": false,
    "evidence": "Test files added (`rpc_getscripthistory.py`, `txoscriptindex_tests.cpp`, `ordered_varint_tests.cpp`) test the new feature rather than test framework infrastructure.",
    "band": "Unranked",
    "reason_tag": "test coverage",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 1,
     "security_stability": 0,
     "user_value": 3
    },
    "rationale": "Test modifications specifically cover the new index and RPC rather than shared testing harness machinery."
   },
   {
    "name": "tools",
    "member": false,
    "evidence": "Keyword match on 'script' is about Bitcoin output scripts, not developer scripts or CLI tools.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 1,
     "security_stability": 1,
     "user_value": 3
    },
    "rationale": "Does not alter offline tools or contrib scripts."
   },
   {
    "name": "utils",
    "member": false,
    "evidence": "Changes to `src/init.cpp` merely hook the index lifecycle into node initialization.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 0,
     "leverage": 1,
     "performance": 1,
     "security_stability": 0,
     "user_value": 3
    },
    "rationale": "Integration with node startup does not modify core utility primitives or shared libraries."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": [
   "rest_of_diff"
  ]
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-11-01T01:16:00+00:00",
  "code": "2026-10-31T01:20:05+00:00",
  "judgments": 8
 }
}