op-geth
op-geth copied to clipboard
core,params: Don't rewind chain on pre-genesis time changes
Description
- Fixes an underflow bug when calculating the timestamp to rewind a chain to.
- Ignores chain rewinds if the timestamp changes are pre-genesis.
Tests
Will test on a devnet.
Additional context
We had a chain rewind on our internal sepolia-devnet-0
on Jan 29 because the Canyon activation time changed from 0
to 1698436800
(Fri Oct 27 20:00:00 UTC 2023
) when we set Base's Canyon activation time as the canonical time in the superchain-registry but didn't overwrite it to 0 again.
This change allows us to overwrite the Canyon activation time on sepolia-devnet-0
back to 0
without causing another chain rewind.
We might want to upstream (parts of) this.
Metadata
- Fixes https://github.com/ethereum-optimism/client-pod/issues/624