core-rs-albatross
core-rs-albatross copied to clipboard
History root doesn't match real history root
This was observed when a full node was trying to synchronize to the testnet. It happens after a second validity window synchronization process is started and the existing and some existing history is removed
This problem is caused by a node that connects and has a newer macro head than the one we have, and we are currently syncing to the tip of the chain and sufficiently close for live sync but state sync is not completed yet.
This scenario should have moved the peer to live sync instead of pushing the macro block, but since our accounts is not complete, then we are doing macro sync with this peer.
I.e.: the following condition needs to be revisited:
if peer_head_upper_bound.saturating_sub(our_head) <= self.full_sync_threshold
&& blockchain.accounts_complete()