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-deployer: Most implementation addresses not set in state.json when standard release tag used #12434

Conversation

blmalone
Copy link
Contributor

@blmalone blmalone commented Oct 11, 2024

When users run op-deployer, it's likely that they're going to be using a standard release version e.g. op-contracts/v*. This means that most executions of op-deployer will only be executing DeployOPChain.s.sol under the hood. When DeployOPChain.s.sol is executed, the implementationsDeployment property in state.json isn't set properly. This is because these addresses normally only get set in DeployImplementations.s.sol, which is skipped in this case. This PR adds these addresses to state.json when only the DeployOPChain.s.sol pipeline is executed.

Note: there is a TODO left in the code:

TODO: Need to initialize 'mipsSingletonAddress' and 'preimageOracleSingletonAddress'

This will be left for a later PR.

Related issue: https://github.com/ethereum-optimism/platforms-team/issues/347

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @blmalone and the rest of your teammates on Graphite Graphite

@blmalone blmalone marked this pull request as ready for review October 15, 2024 20:20
Copy link
Contributor

@mds1 mds1 left a comment

Choose a reason for hiding this comment

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

In general LGTM! Main comment is that we should add a test for this fix. Would like either @mslipper or @bitwiseguy to review before merging, so intentionally did not approve

@blmalone blmalone force-pushed the 10-11-op-deployer_most_implementation_addresses_not_set_in_state.json_when_standard_release_tag_used branch from d0f7258 to b543da6 Compare October 16, 2024 18:54
op-chain-ops/deployer/pipeline/opchain.go Outdated Show resolved Hide resolved
op-chain-ops/deployer/pipeline/opchain.go Outdated Show resolved Hide resolved
@blmalone blmalone force-pushed the 10-11-op-deployer_most_implementation_addresses_not_set_in_state.json_when_standard_release_tag_used branch from 477970c to 90e9b58 Compare October 16, 2024 22:06
@mslipper mslipper added this pull request to the merge queue Oct 16, 2024
Merged via the queue into develop with commit da6625f Oct 16, 2024
49 checks passed
@mslipper mslipper deleted the 10-11-op-deployer_most_implementation_addresses_not_set_in_state.json_when_standard_release_tag_used branch October 16, 2024 22:28
Comment on lines +97 to +98
currentBlock, _ := env.L1Client.BlockNumber(ctx)
block, _ := env.L1Client.BlockByNumber(ctx, big.NewInt(int64(currentBlock)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to check the error returned from these two calls, or is there a reason it's safe to ignore them here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good spot, I'll make a follow up pr to fix this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should create some semgrep rules to catch these - I will look into that.

samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
… standard release tag used (ethereum-optimism#12434)

* op-deployer: Most implementation addresses not set in state.json when standard release tag used

* Update op-chain-ops/deployer/pipeline/opchain.go

Co-authored-by: Matt Solomon <matt@mattsolomon.dev>

* fix: parallel execution of commands.

* fix: tests added

* fix: vscode revert

* use channel approach

---------

Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
Co-authored-by: Matthew Slipper <me@matthewslipper.com>
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.

3 participants