{
 "number": 36503,
 "input_hash": "0f88c24a506d9911",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-13T01:22:05+00:00",
 "result": {
  "summary": "Replaces the manual block-availability check in `dumptxoutset` with `GetPruneHeight`. This ensures that pruned nodes running on an assumeutxo snapshot reject rollback requests with an RPC error when required block or undo data is missing at or below the tip, rather than hitting an assertion failure.",
  "problem": "When a pruned node loads an assumeutxo snapshot, the active tip may lack block data or undo data. Calling `dumptxoutset` with a `rollback` parameter on such a node causes an assertion failure that crashes the daemon.",
  "card": "Prevents a node crash when calling dumptxoutset with rollback on a pruned node that loaded an assumeutxo snapshot. In that state, the active tip can lack block or undo data, causing the rollback routine to hit an assertion failure and terminate bitcoind. The PR replaces the existing prune check with GetPruneHeight so the RPC returns an error instead of crashing. Functional tests are added to verify error handling across different snapshot tip states.",
  "evidence": [
   "PR description: 'Loading a UTXO snapshot on a pruned node can leave the active tip without block or undo data. Attempting a rollback with dumptxoutset then triggers an assertion and terminates the node.'",
   "Commit bef6e5abaa adds functional tests in feature_assumeutxo.py confirming the node crashed on rollback attempts without tip block or undo data before being restarted."
  ],
  "scope_notes": "",
  "changed_since_previous": "None; the implementation and scope match the earlier version.",
  "thread": {
   "last_event_at": "2026-10-12T15:07:23Z",
   "events": 1,
   "head_sha": "3cb70c28f5e97bd42f45b4a917e21fbd1452f4a3",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-12",
    "id": "r:5492606225",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36503#pullrequestreview-5492606225",
    "what": "author reply to musaHaruna's questions and suggestions on boundary checks and non-pruned nodes"
   },
   {
    "at": "2026-10-12",
    "id": "r:5492606225",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36503#pullrequestreview-5492606225",
    "what": "author reply to musaHaruna's questions and suggestion regarding non-pruned nodes and boundary comparison"
   }
  ],
  "risk": {
   "level": "low",
   "touches": [
    "rpc_api"
   ],
   "why": "A flaw in the prune height check could reject legitimate dumptxoutset rollback requests or allow an invalid rollback to proceed to an assertion failure."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-12",
   "open_concerns": [
    "musaHaruna: Extend the early block/undo data availability check to non-pruned nodes to avoid copying the UTXO set before failing rollback",
    "musaHaruna: Generalize the error message to state required block or undo data is unavailable rather than pruned",
    "musaHaruna: Compare the missing-data boundary against target height using > instead of >= to avoid rejecting valid rollbacks to the target height"
   ],
   "resolved_concerns": []
  },
  "reviewability": {
   "state": "Paused",
   "label": "Waiting on author",
   "reason": "Open objections from musaHaruna with no author reply for 20 days; review would repeat what has been asked."
  },
  "agreement": {
   "state": "Strong",
   "summary": "Strong: substantive support, no open objection (musaHaruna)",
   "reason": "Initial record. musaHaruna gave a Concept ACK along with suggestions and questions regarding boundary condition strictness and extending checks to non-pruned nodes. / Initial record for PR 36503. musaHaruna gave a Concept ACK with detailed questions and suggestions regarding scope and boundary logic.",
   "evidence": [
    "musaHaruna (suggestion, scope, must be answered, open): Extend the early block/undo data availability check to non-pruned nodes to avoid copying the UTXO set before failing rollback",
    "musaHaruna (suggestion, interface, must be answered, open): Generalize the error message to state required block or undo data is unavailable rather than pruned",
    "musaHaruna (suggestion, correctness, must be answered, open): Compare the missing-data boundary against target height using > instead of >= to avoid rejecting valid rollbacks to the target height",
    "musaHaruna: Concept ACK \u2014 The fix looks straightforward and contained: `GetPruneHeight` handles missing data at the tip before calling `GetFirstBlock`, allowing the RPC to return an error instead of hitting the assertion."
   ],
   "objections": [
    {
     "reviewer": "musaHaruna",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "scope",
     "harm": "",
     "request": "Extend the early block/undo data availability check to non-pruned nodes to avoid copying the UTXO set before failing rollback",
     "question": "",
     "text": "Extend the early block/undo data availability check to non-pruned nodes to avoid copying the UTXO set before failing rollback",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-12: 'Should the early availability check also cover non-pruned nodes? They can load a snapshot without having the historical block or undo data.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36503#pullrequestreview-5492606225",
     "id": "r:5492606225",
     "at": "2026-10-12",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "musaHaruna",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "interface",
     "harm": "",
     "request": "Generalize the error message to state required block or undo data is unavailable rather than pruned",
     "question": "",
     "text": "Generalize the error message to state required block or undo data is unavailable rather than pruned",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-12: 'Would a more general error message describe these cases better? Specifically, changing: Could not roll back to requested height since necessary block data is already pruned. to: Could not roll back to requested height because required block or undo data is unavailable.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36503#pullrequestreview-5492606225",
     "id": "r:5492606225#2",
     "at": "2026-10-12",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "musaHaruna",
     "association": "CONTRIBUTOR",
     "type": "suggestion",
     "kind": "correctness",
     "harm": "",
     "request": "Compare the missing-data boundary against target height using > instead of >= to avoid rejecting valid rollbacks to the target height",
     "question": "",
     "text": "Compare the missing-data boundary against target height using > instead of >= to avoid rejecting valid rollbacks to the target height",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-12: 'Could the boundary eventually compare the highest missing-data height against the target using `>` instead of `>=`? The loop in `CreateRolledBackUTXOSnapshot` uses: `while (block_index->nHeight > target->nHeight)`'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36503#pullrequestreview-5492606225",
     "id": "r:5492606225#3",
     "at": "2026-10-12",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [
    {
     "reviewer": "musaHaruna",
     "reason": "The fix looks straightforward and contained: `GetPruneHeight` handles missing data at the tip before calling `GetFirstBlock`, allowing the RPC to return an error instead of hitting the assertion.",
     "substantive": true,
     "verdict": "Concept ACK",
     "id": "r:5492606225",
     "url": "https://github.com/bitcoin/bitcoin/pull/36503#pullrequestreview-5492606225",
     "at": "2026-10-12",
     "association": "CONTRIBUTOR",
     "evidence": "both",
     "areas": [
      "CreateRolledBackUTXOSnapshot",
      "GetFirstBlock",
      "GetPruneHeight"
     ]
    }
   ],
   "participants": [
    {
     "login": "musaHaruna",
     "stance": "support",
     "note": "Concept ACK; asked about extending the early check to non-pruned nodes, updating the error message, and using > instead of >= for the target height check",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-12",
     "last": "2026-10-12"
    }
   ],
   "derivation": "substantive support, no open objection (musaHaruna)",
   "model_state": null,
   "corrections": [],
   "notes": "Initial record. musaHaruna gave a Concept ACK along with suggestions and questions regarding boundary condition strictness and extending checks to non-pruned nodes. / Initial record for PR 36503. musaHaruna gave a Concept ACK with detailed questions and suggestions regarding scope and boundary logic."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "rpc",
    "member": true,
    "evidence": "Matches RPC/REST/ZMQ label and modifies RPC implementation in src/rpc/blockchain.cpp",
    "band": "P2",
    "reason_tag": "bug fix",
    "score": 0.65,
    "factors": {
     "bug_severity": 2,
     "leverage": 0,
     "performance": 0,
     "security_stability": 2,
     "user_value": 1
    },
    "rationale": "Fixes an assertion failure that crashes the daemon when invoking `dumptxoutset` with rollback on a pruned assumeutxo node. Returning a standard RPC error instead of terminating the process prevents a severe reliability failure during snapshot rollback."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-13T01:22:05+00:00",
  "code": "2026-10-13T01:25:43+00:00",
  "judgments": 1
 }
}