op-geth icon indicating copy to clipboard operation
op-geth copied to clipboard

core,params: Don't rewind chain on pre-genesis time changes

Open sebastianst opened this issue 4 months ago • 0 comments

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

sebastianst avatar Feb 28 '24 18:02 sebastianst