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: standard l2 genesis #97

Merged
merged 20 commits into from
Nov 6, 2024
Merged

feat: standard l2 genesis #97

merged 20 commits into from
Nov 6, 2024

Conversation

tynes
Copy link
Contributor

@tynes tynes commented Oct 1, 2024

Description

Add design doc for standard L2 genesis

Tracking ticket: ethereum-optimism/optimism#12302

@tynes
Copy link
Contributor Author

tynes commented Oct 7, 2024

I am adding more information, thank you for the review so far

Co-authored-by: Matt Solomon <[email protected]>
@tynes
Copy link
Contributor Author

tynes commented Oct 17, 2024

Here is a link to the audit plan for this feature: https://www.notion.so/oplabs/Isthmus-Smart-Contract-Audit-113f153ee16280448ebbd1b628c26ff2?pvs=4

@tynes
Copy link
Contributor Author

tynes commented Oct 22, 2024

Noticed something here: https://github.com/ethereum-optimism/optimism/blob/dcdf2b7693192f5bca0353bf22729f26c6240ea9/op-node/rollup/types.go#L43

The op-node starts deriving on the L1 block after what is in its config. This means we need SystemConfig.startBlock() - 1 rather than the start block itself. Two options on how to handle this:

  • Have the genesis generation script fill in start block - 1 into the rollup config
  • Make the starting L1 block be optional in the rollup config and use the startBlock() value as the starting point if its not present

I lean towards the second, it removes config overhead

@ajsutton
Copy link
Contributor

I think the second is doable so long as op-node can load it from the latest L1 block reliably. Otherwise it doesn't know which block the system config first existed in. In most cases (probably not all) op-node walks along L1 from the start block forwards loading data from the block its up to so it has a consistent view. This would need to be a case where it always goes to the latest value. The start block has to be immutable so that seems reasonable to me.

@maurelian
Copy link
Contributor

Tracking the startblock config topic here: ethereum-optimism/optimism#12579

@tynes
Copy link
Contributor Author

tynes commented Nov 6, 2024

@maurelian Can I get an approval on this so we can merge?

@maurelian maurelian merged commit 4a4e6a4 into main Nov 6, 2024
@maurelian maurelian deleted the feat/s-l2-g branch November 6, 2024 16:06
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 this pull request may close these issues.

5 participants