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

Add integration test for apply #11910

Merged
merged 2 commits into from
Sep 16, 2024
Merged

Add integration test for apply #11910

merged 2 commits into from
Sep 16, 2024

Conversation

mslipper
Copy link
Collaborator

@mslipper mslipper commented Sep 13, 2024

Adds an integration test for OP Deployer's apply method. This test uses Kurtosis to spin up an in-memory L1, deploy the contracts using OP Deployer, then asserts that there is code at all reported addresses.

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.

@mslipper mslipper force-pushed the feat/op-deployer-2 branch 3 times, most recently from 0b866e6 to 972f52b Compare September 13, 2024 22:42
@mslipper mslipper changed the title Add kurtosis test for apply Add integration test for apply Sep 13, 2024
@mslipper mslipper marked this pull request as ready for review September 13, 2024 22:43
@mslipper mslipper requested review from a team as code owners September 13, 2024 22:43
@mslipper mslipper force-pushed the feat/op-deployer-2 branch 2 times, most recently from 178129f to 044c8b3 Compare September 16, 2024 03:18
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
Copy link
Contributor

@protolambda protolambda left a comment

Choose a reason for hiding this comment

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

LGTM, but I'd like to separate op-deployer out from op-chain-ops testing, because of the Kurtosis dependency.

.circleci/config.yml Outdated Show resolved Hide resolved
.circleci/config.yml Show resolved Hide resolved
@mslipper mslipper force-pushed the feat/op-deployer-2 branch 2 times, most recently from 79c8175 to fc17d90 Compare September 16, 2024 17:39
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
@protolambda
Copy link
Contributor

protolambda commented Sep 16, 2024

You may have to rebase on develop for CI to work. The scripts subset of the artifacts in contracts-bedrock was not getting built and persisted in the workspace for follow-up CI work to utilize. (This applied to op-e2e at a time). And op-chain-ops previously didn't have access to script artifacts at all, so you may have to replicate some config steps of op-e2e to get the workspace data you need for tests to run.

Adds an integration test for OP Deployer's `apply` method. This test uses Kurtosis to spin up an in-memory L1, deploy the contracts using OP Deployer, then asserts that there is code at all reported addresses.
@mslipper mslipper force-pushed the feat/op-deployer-2 branch 2 times, most recently from d5de6cd to 046ea40 Compare September 16, 2024 18:03
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
@mslipper mslipper added this pull request to the merge queue Sep 16, 2024
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
Merged via the queue into develop with commit db10999 Sep 16, 2024
64 checks passed
@mslipper mslipper deleted the feat/op-deployer-2 branch September 16, 2024 19:12
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
mslipper added a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
github-merge-queue bot pushed a commit that referenced this pull request Sep 16, 2024
This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on #11910.
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* Add integration test for apply

Adds an integration test for OP Deployer's `apply` method. This test uses Kurtosis to spin up an in-memory L1, deploy the contracts using OP Deployer, then asserts that there is code at all reported addresses.

* Review updates
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
…m#11922)

This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on ethereum-optimism#11910.
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