Skip to content

feat: standard l2 genesis#97

Merged
maurelian merged 20 commits intomainfrom
feat/s-l2-g
Nov 6, 2024
Merged

feat: standard l2 genesis#97
maurelian merged 20 commits intomainfrom
feat/s-l2-g

Conversation

@tynes
Copy link
Copy Markdown
Contributor

@tynes tynes commented Oct 1, 2024

Description

Add design doc for standard L2 genesis

Tracking ticket: ethereum-optimism/optimism#12302

Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md Outdated
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md Outdated
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md Outdated
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md Outdated
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md Outdated
@tynes
Copy link
Copy Markdown
Contributor Author

tynes commented Oct 7, 2024

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

Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md Outdated
Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
Comment thread protocol/standard-l2-genesis.md
@tynes
Copy link
Copy Markdown
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

Comment thread protocol/standard-l2-genesis.md Outdated
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md Outdated
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md Outdated
Comment thread protocol/standard-l2-genesis.md Outdated
Comment thread protocol/standard-l2-genesis.md
Comment thread protocol/standard-l2-genesis.md Outdated
Comment thread protocol/standard-l2-genesis.md
@tynes
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@tynes
Copy link
Copy Markdown
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