{
 "number": 36452,
 "input_hash": "1fa1807d1f078439",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-10-29T01:23:14+00:00",
 "result": {
  "summary": "Stops chain verification in CVerifyDB::VerifyDB early when deep verification checks encounter missing block undo data on pruned nodes or AssumeUTXO snapshot chainstates. Missing undo data is treated as unavailable history rather than a database corruption failure, returning an incomplete verification status. This allows nodes to restart cleanly and run verifychain even if pruned blocks have been refetched without undo records.",
  "problem": "Refetching a pruned block via getblockfrompeer restores the block body but not its undo data. When startup checks or the verifychain RPC run at check level 3 or higher, the node attempts to disconnect blocks to verify UTXO manipulation, encounters missing undo records, falsely reports database corruption, and aborts startup.",
  "card": "Stops chain verification from falsely reporting database corruption when startup checks or verifychain encounter missing undo data on refetched pruned blocks or AssumeUTXO snapshot chainstates. Using getblockfrompeer downloads a pruned block body without undo data, causing verification at level 3 or 4 to treat missing undo records as database corruption and prevent the node from starting. The fix treats missing undo data as unavailable history, returning incomplete verification status rather than aborting. This bug was found during review of pruned txindex (#36002) and unblocks pending pruneassumevalid changes.",
  "evidence": [
   "PR description: 'getblockfrompeer restores a pruned block\\'s body without recreating its undo record. If startup verification reaches that block at level >2, it attempts to disconnect it and reports database corruption, preventing the node from restarting.'",
   "PR description notes it arose during pruned txindex review (#36002) and is required for pending pruneassumevalid work."
  ],
  "scope_notes": "",
  "changed_since_previous": "The previous description was generated without a patch; this version confirms the implementation in CVerifyDB::VerifyDB and the addition of functional regression tests for AssumeUTXO snapshots and getblockfrompeer.",
  "thread": {
   "last_event_at": "2026-10-28T08:41:23Z",
   "events": 3,
   "head_sha": "e262a1fbf7d41e1467981db4aa37f0642cbedbdc",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": "2026-10-28",
    "id": "c:6464524112",
    "on": "author",
    "url": "https://github.com/bitcoin/bitcoin/pull/36452#issuecomment-6464524112",
    "what": "answer cyb3ralbert's questions about AssumeUTXO scope and interaction with #35307"
   }
  ],
  "risk": {
   "level": "medium",
   "touches": [
    "validation"
   ],
   "why": "A mistake in CVerifyDB could prematurely stop verification of actually corrupted chainstates during node startup or verifychain calls."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-28",
   "open_concerns": [
    "cyb3ralbert: Is the AssumeUTXO part of this PR meant to make startup verification stop erroring on a snapshot base block missing undo data, leaving the subsequent startup abort to #35307?",
    "cyb3ralbert: Which verifychain() return value is intended at the snapshot base once both this PR and #35307 land, since the ordering of their checks determines the result?"
   ],
   "resolved_concerns": [
    "andrewtoth: Can this bug realistically be triggered with default checkblocks=6? (answered by l0rinc 2026-10-08)"
   ]
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Crickets",
   "summary": "Crickets: no substantive comment either way",
   "reason": "cyb3ralbert tested extensively on Linux aarch64 and asked two questions about AssumeUTXO startup scope and the conflict/interaction with #35307 regarding verifychain()'s return value.",
   "evidence": [
    "cyb3ralbert (question, scope, must be answered, open): Is the AssumeUTXO part of this PR meant to make startup verification stop erroring on a snapshot base block missing undo data, leaving the subsequent startup abort to #35307?",
    "cyb3ralbert (question, interface, must be answered, open): Which verifychain() return value is intended at the snapshot base once both this PR and #35307 land, since the ordering of their checks determines the result?"
   ],
   "objections": [
    {
     "reviewer": "andrewtoth",
     "association": "MEMBER",
     "type": "question",
     "kind": "correctness",
     "harm": "",
     "request": "",
     "question": "Can this bug realistically be triggered with default checkblocks=6?",
     "text": "Can this bug realistically be triggered with default checkblocks=6?",
     "clears_with": "answer",
     "blocking": false,
     "status": "answered",
     "status_note": "author confirmed for ordinary pruning, but explained it can trigger under AssumeUTXO with default checks",
     "cleared": true,
     "author_replied": true,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [
      "c:6054086823"
     ],
     "evidence": "2026-10-07: 'IIUC this bug can't realistically be triggered with default `checkblocks=6` config.'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36452#issuecomment-6043968094",
     "id": "c:6043968094",
     "at": "2026-10-07",
     "status_at": "2026-10-08",
     "status_by": "l0rinc",
     "resolution_evidence": "2026-10-08: l0rinc: 'that\u2019s right for ordinary pruning, but this can also happen with default checks under AssumeUTXO'",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "cyb3ralbert",
     "association": "CONTRIBUTOR",
     "type": "question",
     "kind": "scope",
     "harm": "",
     "request": "",
     "question": "Is the AssumeUTXO part of this PR meant to make startup verification stop erroring on a snapshot base block missing undo data, leaving the subsequent startup abort to #35307?",
     "text": "Is the AssumeUTXO part of this PR meant to make startup verification stop erroring on a snapshot base block missing undo data, leaving the subsequent startup abort to #35307?",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-28: 'Is the AssumeUTXO part of this PR meant to make startup verification stop erroring on such a node, with the restart itself left to #35307?'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36452#issuecomment-6464524112",
     "id": "c:6464524112",
     "at": "2026-10-28",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    },
    {
     "reviewer": "cyb3ralbert",
     "association": "CONTRIBUTOR",
     "type": "question",
     "kind": "interface",
     "harm": "",
     "request": "",
     "question": "Which verifychain() return value is intended at the snapshot base once both this PR and #35307 land, since the ordering of their checks determines the result?",
     "text": "Which verifychain() return value is intended at the snapshot base once both this PR and #35307 land, since the ordering of their checks determines the result?",
     "clears_with": "answer",
     "blocking": false,
     "status": "open",
     "status_note": "",
     "cleared": false,
     "author_replied": false,
     "others_replied": false,
     "fix_pushed": false,
     "replies": [],
     "evidence": "2026-10-28: 'Which value is intended once both land?'",
     "url": "https://github.com/bitcoin/bitcoin/pull/36452#issuecomment-6464524112",
     "id": "c:6464524112#2",
     "at": "2026-10-28",
     "status_at": null,
     "status_by": null,
     "resolution_evidence": "",
     "pin": null,
     "from_schema": 2
    }
   ],
   "support": [],
   "participants": [
    {
     "login": "andrewtoth",
     "stance": "question",
     "note": "asked whether the bug can realistically trigger under default checkblocks",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-07",
     "last": "2026-10-07"
    },
    {
     "login": "cyb3ralbert",
     "stance": "question",
     "note": "tested on aarch64; asked about AssumeUTXO scope and interaction with #35307",
     "association": "CONTRIBUTOR",
     "comments": 1,
     "first": "2026-10-28",
     "last": "2026-10-28"
    }
   ],
   "derivation": "no substantive comment either way",
   "model_state": null,
   "corrections": [],
   "notes": "cyb3ralbert tested extensively on Linux aarch64 and asked two questions about AssumeUTXO startup scope and the conflict/interaction with #35307 regarding verifychain()'s return value."
  },
  "dependencies": {
   "depends_on": [],
   "enables": [
    "pruneassumevalid",
    "pruned txindex (#36002)"
   ]
  },
  "categories": [
   {
    "name": "mempool",
    "member": false,
    "evidence": "Touches validation verification logic (CVerifyDB) in src/validation.cpp without affecting mempool data structures or policy.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 2,
     "leverage": 1,
     "performance": 0,
     "security_stability": 2,
     "user_value": 1
    },
    "rationale": "Not a member."
   },
   {
    "name": "rpc",
    "member": false,
    "evidence": "Only touches rpc_getblockfrompeer.py as a functional test; no RPC framework or interface code is modified.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 2,
     "leverage": 1,
     "performance": 0,
     "security_stability": 2,
     "user_value": 1
    },
    "rationale": "Not a member."
   },
   {
    "name": "validation",
    "member": true,
    "evidence": "Labeled 'Validation' and alters chainstate verification logic in src/validation.cpp (CVerifyDB::VerifyDB).",
    "band": "P2",
    "reason_tag": "bug fix",
    "score": 0.65,
    "factors": {
     "bug_severity": 2,
     "leverage": 1,
     "performance": 0,
     "security_stability": 2,
     "user_value": 1
    },
    "rationale": "Fixes false database corruption errors and prevented node restarts when startup checks encounter missing block undo data on pruned nodes or AssumeUTXO chainstates. When blocks are refetched without undo data, verification at check level >2 'reports database corruption, preventing the node from restarting', which directly impacts chainstate integrity reporting and node reliability."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-10-29T01:23:14+00:00",
  "code": "2026-10-09T01:22:02+00:00",
  "judgments": 3
 }
}