Skip to content

Conversation

@smartcontracts
Copy link
Contributor

Description
Aaaand another continuation of #475. Moving OVM_DeployerWhitelist over to ovm-solc. We're touching such critical parts of the contracts that I think it's important we review each contract individually.

@changeset-bot
Copy link

changeset-bot bot commented Apr 21, 2021

🦋 Changeset detected

Latest commit: 1ad5fd2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eth-optimism/contracts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@smartcontracts smartcontracts marked this pull request as ready for review April 21, 2021 23:17
@smartcontracts smartcontracts changed the title Port OVM_DeployerWhitelist to use ovm-solc refactor[contracts]: Port OVM_DeployerWhitelist to use ovm-solc Apr 21, 2021
@tynes
Copy link
Contributor

tynes commented Apr 21, 2021

This contract can't have a constructor that sets the owner? We can't forget to call this on L2 post regenesis
Other solutions:

  • take-dump.ts calls initialize() with a configurable value
  • We use the geth config option address-manager-owner and set the storage slot on startup

Copy link
Collaborator

@ben-chain ben-chain left a comment

Choose a reason for hiding this comment

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

LGTM!

const NON_WHITELISTED_DEPLOYER = '0x1234123412341234123412341234123412341234'
const NON_WHITELISTED_DEPLOYER_KEY =
'0x0000000000000000000000001234123412341234123412341234123412341234'
const NON_WHITELISTED_DEPLOYER_KEY = ethers.utils.keccak256(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Assuming that this can't be easily done because it lives in smock right now, but this should really be a call to a utility function. Took me a sec to realize this was here to handle the new solidity storage layout.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, very true!

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.

Please add a changeset and is this safe to merge to master?

@smartcontracts
Copy link
Contributor Author

Added changeset. Only place where this might be backwards incompatible is if we slapped the code on the existing storage layout. And users would have to have their accounts "re-whitelisted". I think we already have to do this for each regenesis though, right?

@tynes
Copy link
Contributor

tynes commented Apr 22, 2021

Still wondering about my questions above in #548 (comment), thanks for adding the changeset. Added regenesis comment here: ethereum-optimism/scripts#12 (comment)

Copy link
Contributor

@maurelian maurelian left a comment

Choose a reason for hiding this comment

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

All good except the one question about allowing arbitrary deployments before initialization.

@tynes
Copy link
Contributor

tynes commented Apr 22, 2021

Will approve pending open issue regarding removal of the initialize()

@smartcontracts
Copy link
Contributor Author

Will approve pending open issue regarding removal of the initialize()

Created #560 to cover this issue.

Copy link
Contributor

@maurelian maurelian left a comment

Choose a reason for hiding this comment

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

LGTM

@smartcontracts smartcontracts merged commit d4ee2d7 into master Apr 22, 2021
@smartcontracts smartcontracts deleted the ovm-solc/deployer-whitelist branch April 22, 2021 18:29
InoMurko referenced this pull request in omgnetwork/optimism May 25, 2021
* Port OVM_DeployerWhitelist to use ovm-solc

* chore[contracts]: Add changeset

* Update packages/contracts/contracts/optimistic-ethereum/OVM/predeploys/OVM_DeployerWhitelist.sol

Co-authored-by: Maurelian <[email protected]>

Co-authored-by: Maurelian <[email protected]>
agusduha pushed a commit that referenced this pull request Sep 25, 2025
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.

5 participants