core-rs-albatross icon indicating copy to clipboard operation
core-rs-albatross copied to clipboard

History root doesn't match real history root

Open viquezclaudio opened this issue 10 months ago • 1 comments

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

log4.log

viquezclaudio avatar Apr 04 '24 14:04 viquezclaudio

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()

viquezclaudio avatar Apr 10 '24 17:04 viquezclaudio