{
 "number": 36002,
 "input_hash": "945e4820b72908a6",
 "model": "openrouter/google/gemini-3.8-flash",
 "batch": false,
 "created": "2026-09-17T21:45:58+00:00",
 "provider": "Google",
 "stop_reason": "end_turn",
 "usage": {
  "input_tokens": 34294,
  "cache_creation_input_tokens": 0,
  "cache_read_input_tokens": 0,
  "output_tokens": 6708
 },
 "cost_usd": 0.050875500000000004,
 "error": null,
 "result": {
  "display": {
   "goal": [
    "Allow running the transaction index on pruned nodes.",
    "Enable looking up transactions or finding their containing block hashes so missing blocks can be fetched on demand."
   ],
   "reviewability": [
    "Ready to review.",
    "Recent feedback from arejula27 on interface details and error structure is open for discussion."
   ],
   "agreement": [
    "Broad concept support for lifting the incompatibility between pruning and txindex (l0rinc, ajtowns, mzumsande, arejula27).",
    "Suggestions by ajtowns and mzumsande to support starting the index on an already pruned node were incorporated by the author.",
    "arejula27 suggested unifying pruning flags in BaseIndex and returning structured data for missing block hashes (arejula27)."
   ],
   "categories": [
    {
     "name": "indexes",
     "why": [
      "P2 because it removes the long-standing mutual exclusion between -prune and -txindex.",
      "Pruned node operators can now maintain a txindex and resolve transaction queries to specific blocks."
     ]
    },
    {
     "name": "rpc",
     "why": [
      "P3 because it updates getrawtransaction, gettxoutproof, and REST /tx to return informative pruned block references.",
      "Exposes index start height in getindexinfo without breaking standard workflows."
     ]
    }
   ]
  },
  "summary": "This pull request removes the restriction preventing -txindex from running alongside -prune. It leverages the block-hash indexing introduced in #35531 so lookups for pruned transactions return the block hashes where the transactions reside, allowing users to fetch those blocks via getblockfrompeer. It also permits starting a partial transaction index on an already-pruned node and exposes the index starting height in getindexinfo.",
  "problem": "Historically, users who needed -txindex were forced to run full archival nodes because txindex stored physical block file offsets and could not tolerate pruned block files. Users with limited disk space who only wanted an index of recent blocks or needed to look up which historical block contained a transaction could not use pruning.",
  "discussion": {
   "open_concerns": [
    "arejula27 suggested combining BaseIndex::AllowPrune() and BaseIndex::AllowPartialHistory() into a single enum to formalize their dependency.",
    "arejula27 asked whether candidate pruned block hashes should be returned as structured RPC data rather than embedded in an error string."
   ],
   "resolved_concerns": [
    "ajtowns and mzumsande asked about enabling txindex on an already pruned node; author updated the PR to support partial indexing starting from the earliest available block."
   ],
   "author_status": "Active; incorporated suggestions for partial index support and recently rebased."
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "The code is clean, CI is passing, and changes addressing earlier reviewer suggestions have been pushed."
  },
  "agreement": {
   "participants": [
    {
     "login": "l0rinc",
     "stance": "support",
     "note": "Expressed a strong Concept ACK."
    },
    {
     "login": "ajtowns",
     "stance": "support",
     "note": "Concept ACK; discussed disk growth and the behavior on already-pruned nodes."
    },
    {
     "login": "mzumsande",
     "stance": "support",
     "note": "Supported the concept and asked whether a partial index enabled on already-pruned nodes would be feasible."
    },
    {
     "login": "arejula27",
     "stance": "support",
     "note": "Concept ACK; suggested code structuring improvements for BaseIndex and discussed structured RPC output."
    }
   ],
   "objections": [],
   "support": [
    {
     "reviewer": "l0rinc",
     "reason": "Big concept ACK on allowing txindex in pruned mode.",
     "substantive": true
    },
    {
     "reviewer": "ajtowns",
     "reason": "Concept ACK, noted it makes sense for nodes wanting local block-explorer setups with bounded disk.",
     "substantive": true
    },
    {
     "reviewer": "arejula27",
     "reason": "Concept ACK, excited about being able to fetch missing blocks on demand via getblockfrompeer.",
     "substantive": true
    }
   ],
   "state": "Strong",
   "summary": "Strong concept consensus across multiple reviewers; author already integrated initial feedback on partial indexing.",
   "reason": "Four contributors and maintainers voiced strong concept support. The open suggestions from arejula27 concern interface polish rather than blocking objections.",
   "evidence": [
    "l0rinc: 'Big concept ACK'",
    "ajtowns: 'Concept ACK, looks okay to me at first glance.'",
    "arejula27: 'Concept ACK. I'm excited about this PR and I love the idea and the approach.'"
   ],
   "model_state": "Strong",
   "derivation": "substantive support, no open objection (l0rinc, ajtowns, arejula27)",
   "corrections": [],
   "thread_read": {
    "state": "Strong",
    "derived": "Strong",
    "objections": [],
    "support": [
     {
      "reviewer": "l0rinc",
      "reason": "Big concept ACK",
      "substantive": false
     },
     {
      "reviewer": "ajtowns",
      "reason": "Makes sense for nodes wanting to run a local block-explorer type setup while pruned",
      "substantive": true
     },
     {
      "reviewer": "arejula27",
      "reason": "Loves the idea and approach to access txs on pruned nodes via block virtual references",
      "substantive": true
     }
    ],
    "participants": [
     {
      "login": "l0rinc",
      "stance": "support",
      "note": "Concept ACK"
     },
     {
      "login": "ajtowns",
      "stance": "support",
      "note": "Concept ACK; discussed disk growth and suggested a pruned txindex follow-up"
     },
     {
      "login": "mzumsande",
      "stance": "question",
      "note": "Asked whether a partial index cleaning up old entries would be more helpful"
     },
     {
      "login": "arejula27",
      "stance": "support",
      "note": "Concept ACK; asked about flags design in BaseIndex and RPC response format"
     }
    ],
    "corrections": [],
    "summary": "Strong: Concept ACKs from l0rinc, ajtowns, and arejula27 with no objections raised",
    "usage": {
     "input_tokens": 4996,
     "cache_creation_input_tokens": 0,
     "cache_read_input_tokens": 0,
     "output_tokens": 2878
    }
   },
   "first_read": {
    "state": "Strong",
    "model_state": "Strong",
    "objections": [],
    "support": [
     {
      "reviewer": "l0rinc",
      "reason": "Big concept ACK on allowing txindex in pruned mode.",
      "substantive": true
     },
     {
      "reviewer": "ajtowns",
      "reason": "Concept ACK, noted it makes sense for nodes wanting local block-explorer setups with bounded disk.",
      "substantive": true
     },
     {
      "reviewer": "arejula27",
      "reason": "Concept ACK, excited about being able to fetch missing blocks on demand via getblockfrompeer.",
      "substantive": true
     }
    ]
   }
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "indexes",
    "member": true,
    "evidence": "Modifies BaseIndex and TxIndex to allow running under block pruning and starting from a non-genesis height.",
    "band": "P2",
    "reason_tag": "new feature",
    "score": 0.7,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 2,
     "leverage": 1
    },
    "rationale": "Lifts a major long-standing restriction where running -prune alongside -txindex was disallowed. This enables resource-constrained node operators to run a transaction index and pinpoint missing historical blocks on demand."
   },
   {
    "name": "rpc",
    "member": true,
    "evidence": "Modifies getrawtransaction, gettxoutproof, REST /tx, and getindexinfo to handle pruned block responses and report first_block_height.",
    "band": "P3",
    "reason_tag": "new feature",
    "score": 0.35,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 1,
     "leverage": 0
    },
    "rationale": "Adapts RPC and REST responses to provide context and candidate block hashes when transaction lookups fail due to pruning, and adds first_block_height to getindexinfo."
   },
   {
    "name": "tests",
    "member": false,
    "evidence": "Functional test updates exclusively cover the new txindex pruning and RPC behavior.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "Test changes follow directly from index and RPC modifications and do not touch testing framework infrastructure."
   },
   {
    "name": "utils",
    "member": false,
    "evidence": "Edits in src/init.cpp adjust initialization checks and parameter documentation specifically for txindex and prune options.",
    "band": "Unranked",
    "reason_tag": "",
    "score": 0.0,
    "factors": {
     "security_stability": 0,
     "bug_severity": 0,
     "performance": 0,
     "user_value": 0,
     "leverage": 0
    },
    "rationale": "Init changes only wire index settings and do not alter general utility libraries."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": [],
  "card": "This PR enables running Bitcoin Core's transaction index (txindex) on pruned nodes, removing a longstanding mutual exclusion between -txindex and -prune. Because txindex entries record containing block hashes rather than file offsets, lookups for pruned transactions can identify the missing block hash, allowing external callers to fetch the block via getblockfrompeer and retry. It also adds support for building a partial txindex on a node that was already pruned prior to index startup. There is strong concept agreement from multiple reviewers, with current review focusing on code structure in BaseIndex and RPC response formatting."
 },
 "raw_text": null,
 "prompt_hash": "c1bd47c5",
 "second_read_cost_usd": 0.0145395
}