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

Restarted full nodes may fail to get state.

Open peilun-conflux opened this issue 4 years ago • 2 comments

Assume a full node crashed and restarts, and it now needs to sync a snapshot at height H. When it needs the state at height H, it should use the snapshot at height H directly.

However, if the node already has a snapshot at height H-SNAPSHOT_EPOCH_COUNT, it will take the state at height H as a normal case instead of the synced state, so it will try to use the snapshot at height H-SNAPSHOT_EPOCH_COUNT plus the intermediate delta MPT at height H. And this intermediate delta MPT does not exist, meaning this node will fail to get the state at height H.

peilun-conflux avatar Jun 16 '20 06:06 peilun-conflux

I'll be re-assigned for a proper low priority fix.

yangzhe1990 avatar Jun 29 '20 15:06 yangzhe1990

Checked with @peilun-conflux I think a better fix is to remove all existing snapshots after successful sync, so that the old data don't interfere with the new state.

yangzhe1990 avatar Sep 27 '20 08:09 yangzhe1990