Page MenuHomePhabricator

Update CheckBlockIndex invariants for chains based on an assumeutxo snapshot
ClosedPublic

Authored by PiRK on Dec 31 2024, 10:50.

Details

Summary

Update CheckBlockIndex invariants for chains based on an assumeutxo snapshot

https://github.com/bitcoin/bitcoin/pull/27746/commits/272fbc370c4e133d31d9f1d34e327cc265c5fad2

test: Clear block index flags when testing snapshots

When simulating a snapshot, remove the HAVE_DATA status for blocks below the
snapshot height, to simulate never having downloaded them at all. This makes
tests more realistic (and more closely match what will happen when using
assumeutxo).

https://github.com/bitcoin/bitcoin/pull/27746/commits/3cfc75366e6596942cbc84f354f42dfd7fc5c073

This is a partial backport of core#27746

This change allows us to remove the hack introduced in D14653 and D15815 to temporarily disable CheckBlockIndex while resetting a chain.

Depends on D17433

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Dec 31 2024, 10:50
PiRK planned changes to this revision.Dec 31 2024, 15:15

I have a test failing in a later commit due to an assertion in validation.cpp on line 6093 (Assertion pindex->nStatus.isOnParkedChain() || setBlockIndexCandidates.count(pindex)' failed..) I need to check if I missed something here, or if the issue is introduced later.

PiRK edited the summary of this revision. (Show Details)

rebase, remove now useless hack to skip checkblockindex from D14653

This revision is now accepted and ready to land.Wed, Jan 15, 21:32