conflux-rust icon indicating copy to clipboard operation
conflux-rust copied to clipboard

Pivot chain reorg during catching up will violate the confirmed state assumption for archive nodes.

Open peilun-conflux opened this issue 3 years ago • 1 comments

Archive nodes will execute blocks normally in the phase CatchUpSyncBlock, and states (snapshots and MPTs) before a confirmed height will be deleted. However, the confirmation probability is inaccurate during catching up because only a part of blocks are received, and violating this assumption is possible. This will result in a panic like thread 'Consensus Worker' panicked at 'forked_at 5803248 should > boundary_lower_bound, boundary StateAvailabilityBoundary { synced_state_height: 0, lower_bound: 5806001, upper_bound: 5810510, optimistic_executed_height: Some(5810511) }', core/src/consensus/consensus_inner/consensus_new_block_handler.rs where fork_at is before the state lower_bound.

peilun-conflux avatar Mar 12 '21 02:03 peilun-conflux

Since we have assumed that the checkpoint will not be reverted during catching-up, always keeping the states from the checkpoint to the tip should be enough?

peilun-conflux avatar Mar 17 '21 09:03 peilun-conflux