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

interop: interopgen v2 using OPSM #11702

Merged
merged 5 commits into from
Sep 13, 2024
Merged

interop: interopgen v2 using OPSM #11702

merged 5 commits into from
Sep 13, 2024

Conversation

protolambda
Copy link
Contributor

@protolambda protolambda commented Aug 31, 2024

Description

Changes:

  • Minor changes to deploy-config, such that it can be used for L2Genesis.s.sol
  • Split the SetPreinstalls part out of L2 genesis, so we can apply the preinstalls also to the L1 dev genesis.
  • Fix SystemConfigInterop.sol to not try to initialize twice.
  • Fix SystemConfigImpl address label
  • Introduce interopgen/deployers package: reusable functions, to apply an input to a script host, and get a deployment output. Split into OPSM implementations deployment, superchain deployment, L2 chain deployment to L1, creation of L2 genesis, and preinstalls.
  • Introduce Go config and deployment structs.
  • Introduce interop recipe code that turns a simplified config into a full config composition for a L1 and multiple L2s.

Tests

Introduce new op-e2e test that:

  • Creates a recipe for an interop setup, with two L2 chains
  • Turns the recipe into a built config
  • Turns the config into a set of outputs and deployment data.

This setup can then be used in interop e2e tests, devnet, etc.

Metadata

Fix #11493

@protolambda protolambda requested a review from mds1 August 31, 2024 00:33
@protolambda protolambda force-pushed the interopgen2 branch 5 times, most recently from 349c1c0 to c26f7c1 Compare September 6, 2024 19:37
Base automatically changed from opsm/deploy-op-chain to develop September 10, 2024 17:33
@protolambda protolambda force-pushed the interopgen2 branch 2 times, most recently from 0a3828f to 0f67553 Compare September 11, 2024 03:36
@tynes
Copy link
Contributor

tynes commented Sep 12, 2024

Wondering if some of this should be deduplicated with op-deployer, cc @mslipper

@protolambda protolambda requested a review from a team as a code owner September 12, 2024 21:15
Copy link
Contributor

@axelKingsley axelKingsley left a comment

Choose a reason for hiding this comment

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

Some naming suggestions, but no blocking comments. I use this branch already in interop-e2e so I am familiar with the fact that it works.

op-chain-ops/interopgen/deploy.go Outdated Show resolved Hide resolved
op-chain-ops/interopgen/deploy.go Outdated Show resolved Hide resolved
op-chain-ops/interopgen/deploy.go Outdated Show resolved Hide resolved
op-chain-ops/interopgen/deploy.go Outdated Show resolved Hide resolved
op-chain-ops/interopgen/deployers/opchain.go Show resolved Hide resolved
op-chain-ops/interopgen/recipe.go Show resolved Hide resolved
op-chain-ops/interopgen/recipe.go Outdated Show resolved Hide resolved
Copy link
Contributor

semgrep-app bot commented Sep 13, 2024

Semgrep found 6 sol-style-return-arg-fmt findings:

Named return arguments to functions must be appended with an underscore (_)

Ignore this finding from sol-style-return-arg-fmt.

Copy link
Contributor

@tynes tynes left a comment

Choose a reason for hiding this comment

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

Generally looks good to me, just wondering thoughts on the future of this package, will we try to deduplicate things and how do we move towards a world where its more single source of truth/generic so that we don't need to couple L1 contract additions to modifying Go code

@protolambda
Copy link
Contributor Author

Merging this, to unblock op-e2e interop work. Still open to changing a bunch of things, like config approach (separate API layer or not), and more polish. For now though, devnet has priority.

@protolambda protolambda added this pull request to the merge queue Sep 13, 2024
Merged via the queue into develop with commit 3056348 Sep 13, 2024
59 checks passed
@protolambda protolambda deleted the interopgen2 branch September 13, 2024 20:17
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.

op-chain-ops: generate L1 and L2 genesis by running forge script in Go
4 participants