espresso-sequencer
espresso-sequencer copied to clipboard
DRAFT PR: 1470 escape hatch add sliding windows to light client contract
Closes #1470 TODO
- a check for a block number that's too small? e.g before/when the genesis block was/is recorded?
- should there be a calculation from numUpdates since firstupdate to determine if hotshot was live?
This PR:
- delayThreshold variable
- updateDelayThreshold function
- isHotshotLive function
This PR does not:
- WIP
Key places to review:
- isHotshotLive function
How to test this PR:
forge test --match-contract LightClient_delayThresholdTest -vvv --ffi
Things tested
- isHotshotLive functionality
- l1BlocksUpdates is updated when the
newFinalizedStatefunction is successfully called - updateDelayThreshold function