Description
Consider a network where syncing speeds are very low. A node starts with a head that is closer than 8 epochs to the clock but older than the peers current finalized checkpoint. If the node is assigned to propose before it completes syncing, it will publish a block that builds on top of a block that's older than finality. All nodes in the network will reject it as it attempts to revert finality, heavily penalize the node and ban it. The node will then get isolated and never complete sync, continuing to build on it's fork.
The reason to allow the node to propose in this situation is to prevent against an attack:
- malicious peers connect to a majority of honest nodes
- malicious peers claim to know and advanced finalized checkpoint
- honest nodes switch to syncing state and stop proposing
- chain loses liveness
Think if we can find a better heuristic that balances both concerns. Or add a flag to set the sync tolerance to 0 in smaller networks. In smaller networks you have a combination of no attacks + low syncing speed (because of PeerDAS) + frequent proposals so this bug manifests more frequently.