AssumeUTXO rollback can abort a pruned node when historical data is unavailable #37069

issue l0rinc opened this issue on December 2, 2026
  1. l0rinc commented at 8:19 PM on December 2, 2026: contributor

    After loadtxoutset, the active snapshot tip has no block or undo data to roll back. On a pruned node, a dumptxoutset rollback below that tip hits the GetFirstBlock() assertion while checking the prune boundary and terminates the node instead of returning an RPC error. Unpruned nodes return "Failed to read block" instead.

    <details> <summary>Reproducer</summary>

    On master the node aborts with Assertion failed: ((last_block->nStatus & status_mask) == status_mask), function GetFirstBlock, so the RPC call loses its connection.

    diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py
    index fa9466f2d8..b439763ad6 100755
    --- a/test/functional/feature_assumeutxo.py
    +++ b/test/functional/feature_assumeutxo.py
    @@ -527,6 +527,7 @@ class AssumeutxoTest(BitcoinTestFramework):
             loaded = n1.loadtxoutset(dump_output['path'])
             assert_equal(loaded['coins_loaded'], SNAPSHOT_BASE_HEIGHT)
             assert_equal(loaded['base_height'], SNAPSHOT_BASE_HEIGHT)
    +        n1.dumptxoutset('rollback.dat', rollback=SNAPSHOT_BASE_HEIGHT - 1)
     
             self.log.info("Confirm that local services remain unchanged")
             # Since n1 is a pruned node, the 'NETWORK' service flag must always be unset.
    

    </details>

    The direct fix would be to check the exact disconnect range on both pruned and unpruned snapshot chainstates (as #36503 proposed), but given that this missing-history state disappears with snapshot loading, I'm proposing to remove AssumeUTXO entirely in #36598 instead.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-12-03 02:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me