shutter-network / rolling-shutter

Rolling Shutter is an MEV protection system to be plugged into rollups.
https://twitter.com/project_shutter/
26 stars 7 forks source link

feat: consider reorgs in chainsync #439

Closed ezdac closed 3 months ago

ezdac commented 3 months ago

The chainsync did not handle the possibility of decreasing latest-head numbers on the unsafe head stream (reorgs). Now, it indicates a reorg by first only calling the unsafe-head handler with the parent block of the newly re-orged latest head. This way a client can recognise a reorg, roll back all relevant state, and then still handle the events of the new latest head.

Additionally, the syncing mechanism for specific sync-start blocks was fixed.