rolling-shutter
rolling-shutter copied to clipboard
Validate L1BlockNumber and Timestamp during batch execution
We should verify that L1BlockNumber and Timestamp of BatchTx "make sense" in the state transition function. Batches with invalid values should be rejected. The restriction should be lifted if no batch has been submitted for a long time.
This prevents the collator from picking values which are favorable to them, in particular because the block number is used to identify the collator address, keyper set, and eon key. Without any checks, the sequencer that's being replaced at block number 100 could for instance continue indefinitely submitting batches with block number 99.
Valid l1 block numbers and timestamps
- are greater or equal to the corresponding values on l1
- are greater or equal to the values from the previous batch
- are smaller than the corresponding l1 values plus an offset
The offset should be a constant and will likely be on the order of hours. Note that larger values give the sequencer more power to cheat and resist dismissal, but values that are too small require the sequencer to submit batches on L1 more often than necessary. Also, if the values are too small an honest sequencer who's node crashed or who is censored on L1 will be unable to submit their batch.
We are now ready to tackle this in Arbitrum.
We should implement this in the mock sequencer. To do this, the mock sequencer needs to connect to a chain representing L1.
outdated