Skip to content

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

Merged
mslipper merged 6 commits intodevelopfrom
10-11-op-deployer_most_implementation_addresses_not_set_in_state.json_when_standard_release_tag_used
Oct 16, 2024
Merged

op-deployer: Most implementation addresses not set in state.json when standard release tag used#12434
mslipper merged 6 commits intodevelopfrom
10-11-op-deployer_most_implementation_addresses_not_set_in_state.json_when_standard_release_tag_used

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
@blmalone blmalone requested review from mds1 and mslipper 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
@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
@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