You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AssumeUTXO restart can treat an unlinked snapshot block as a chain candidate #37070
During background sync, the snapshot block can be stored before one of its ancestors and remain in m_blocks_unlinked only in memory. After restart, its hardcoded chain transaction count makes it a background-chain candidate, and FindMostWorkChain() aborts when it reaches the unlinked parent.
Reproducer
diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py
index fa9466f2d8..6564171fb4 100755
--- a/test/functional/feature_assumeutxo.py+++ b/test/functional/feature_assumeutxo.py@@ -677,6 +677,13 @@ class AssumeutxoTest(BitcoinTestFramework):
snapshot_block = n0.getblock(snapshot_hash, 0)
n1.submitblock(snapshot_block)
+ self.log.info("Restart while some of the snapshot block's ancestors are missing")+ self.restart_node(1, extra_args=self.extra_args[1], wait_for_full_init=False)+ n1.getblock(snapshot_hash)+ normal, snapshot = n1.getchainstates()['chainstates']+ assert_equal(normal['blocks'], START_HEIGHT)+ assert_equal(snapshot['blocks'], PAUSE_HEIGHT)+
self.connect_nodes(0, 1)
self.log.info(f"Ensuring snapshot chain syncs to tip. ({FINAL_HEIGHT})")
The direct fix would be to restore the snapshot block's unlinked state and keep it out of the background candidate set until its parent links (as #36702 proposes, while remaining compatible with #36149), but given that this candidate exception exists only for AssumeUTXO, I'm proposing to remove AssumeUTXO entirely in #36598 instead.
Activity