Page MenuHomePhabricator

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

Authored by PiRK on Tue, Apr 1, 08:57.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
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

Event Timeline

PiRK requested review of this revision.Tue, Apr 1, 08:57
Fabien requested changes to this revision.Tue, Apr 1, 09:18
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/validation.cpp
4848 ↗(On Diff #53316)
4851 ↗(On Diff #53316)
This revision now requires changes to proceed.Tue, Apr 1, 09:18
PiRK edited the test plan for this revision. (Show Details)

comment nits, const, update test plan to include a full background validation (test still ongoing)

This revision is now accepted and ready to land.Tue, Apr 1, 14:15