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

op-node: flexible L2 genesis generation #8102

Merged
merged 3 commits into from
Nov 9, 2023
Merged

Conversation

tynes
Copy link
Contributor

@tynes tynes commented Nov 8, 2023

Description

Allow for the op-node L2 genesis generation to use either
hardhat artifacts or the .deploy L1Deployments JSON file
that is created by the solidity deployment script. While adding
extra logic, this makes genesis generation much easier to be
consumed by the solidity scripts. It also sets up the ability
to deprecate the need for maintaining hardhat deploy style
artifacts. This will allow us to remove a lot of solidity code
and remove the need to call sync() to generate the artifacts.
The artifacts make less sense now, especially since it is planned
to have one set of implementation contracts for the entire superchain.
There isn't as much of a need to keep around artifacts for many
contracts separated by network when they are shared between
different L2s.

Allow for the `op-node` L2 genesis generation to use either
hardhat artifacts or the `.deploy` L1Deployments JSON file
that is created by the solidity deployment script. While adding
extra logic, this makes genesis generation much easier to be
consumed by the solidity scripts. It also sets up the ability
to deprecate the need for maintaining hardhat deploy style
artifacts. This will allow us to remove a lot of solidity code
and remove the need to call `sync()` to generate the artifacts.
The artifacts make less sense now, especially since it is planned
to have one set of implementation contracts for the entire superchain.
There isn't as much of a need to keep around artifacts for many
contracts separated by network when they are shared between
different L2s.
@tynes tynes requested a review from a team as a code owner November 8, 2023 16:12
@tynes tynes requested a review from protolambda November 8, 2023 16:12
@ghost
Copy link

ghost commented Nov 8, 2023

@tynes This should be really helpful but it would be great if we have some documents about using it.

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #8102 (fb0d08f) into develop (122f041) will decrease coverage by 6.40%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #8102      +/-   ##
===========================================
- Coverage    45.48%   39.08%   -6.40%     
===========================================
  Files          171       95      -76     
  Lines         7214     3006    -4208     
  Branches      1150      624     -526     
===========================================
- Hits          3281     1175    -2106     
+ Misses        3810     1754    -2056     
+ Partials       123       77      -46     
Flag Coverage Δ
cannon-go-tests ?
chain-mon-tests ?
common-ts-tests ?
contracts-bedrock-tests 39.08% <ø> (+0.03%) ⬆️
contracts-ts-tests ?
core-utils-tests ?
sdk-next-tests ?
sdk-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 79 files with indirect coverage changes

@tynes
Copy link
Contributor Author

tynes commented Nov 8, 2023

@tynes This should be really helpful but it would be great if we have some documents about using it.

@kaliubuntu0206 I added a description to the source code, we have docs here

Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for removing the legacy options here? Otherwise LGTM

@tynes
Copy link
Contributor Author

tynes commented Nov 9, 2023

What's the reason for removing the legacy options here? Otherwise LGTM

We don't have any legacy artifacts at this point left in the monorepo and all new chains should be deployed with the solidity scripts instead of the hardhat deploy scripts. The solidity scripts create modern artifacts

@tynes tynes merged commit e8f0b35 into develop Nov 9, 2023
61 checks passed
@tynes tynes deleted the feat/op-node-genesis branch November 9, 2023 07:07
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.

2 participants