Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Constrain block timestamp on L1 contract #830

Closed
Tracked by #824
LHerskind opened this issue Jun 13, 2023 · 0 comments · Fixed by #948
Closed
Tracked by #824

feat: Constrain block timestamp on L1 contract #830

LHerskind opened this issue Jun 13, 2023 · 0 comments · Fixed by #948
Assignees

Comments

@LHerskind
Copy link
Contributor

The timestamp of the L2 block should be constrained by the L1 contract such that

  • L2 timestamp > time of last block publication
    • To ensure that blocks are not built in a manner that progress time rollup time much slower than actual time.
    • This can be done by storing the lastBlockAt = block.timestamp at every publication, and for the next block ensure that l2 timestamp > lastBlockAt.
  • L2 timestamp <= block.timestamp, should not be possible to push block into the future

I expect that this will mess quite a bit with test as timing now need to be added to the l2 blocks. For tests that are jumping time or expecting certain block times it might need to fetch block times directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant