HomePhabricator

validation: don't consider background IBD blocks as deep reorgs

Description

validation: don't consider background IBD blocks as deep reorgs

Summary:
The parking code should ignore the blocks that are below the snapshot height when background sync is in progress. As the snapshot height will typically be at least multiple thousands of blocks below the current chain tip, this seems like a good enough heuristic that these blocks cannot be used to cause a deep reorg.

This solves spurious 'Park block %s as it would cause a deep reorg' that I see for every background block while testing assumeutxo.

Test Plan:
Check that no expected/tested behavior is broken by this change.
ninja all check-all

Run a full background ibd on my assumeutxo dev branch

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17877

Details

Provenance
PiRKAuthored on Tue, Apr 1, 08:46
PiRKPushed on Wed, Apr 2, 19:50
Reviewer
Restricted Project
Differential Revision
D17877: validation: don't consider background IBD blocks as deep reorgs
Parents
rABCe7c479c48955: assumeutxo: Remove BLOCK_ASSUMED_VALID flag
Branches
Unknown
Tags
Unknown