Skip to content

Add ProxyAdmin owner verification to deploy/genesis scripts#345

Merged
m-chrzan merged 4 commits intopahor/genesisGenerationfrom
m-chrzan/alias-proxy-owner
Mar 7, 2025
Merged

Add ProxyAdmin owner verification to deploy/genesis scripts#345
m-chrzan merged 4 commits intopahor/genesisGenerationfrom
m-chrzan/alias-proxy-owner

Conversation

@m-chrzan
Copy link
Copy Markdown

@m-chrzan m-chrzan commented Mar 4, 2025

This PR adds a config validation step to ensure that the L1/L2 ProxyAdmin owner addresses are set correctly in the deployment config.

There is a new config variable, l2ProxyAdminOwnerVerification, that needs to be explicitly set to one of three values: no-check, aliased, or equal. After the JSON config is read, the finalSystemOwner (which defines the L1 ProxyAdmin owner) and proxyAdminOwner (which defines the L2 ProxyAdmin owner) will be validated according to the verification method specified:

  • no-check: no check is performed
  • aliased: verifies that proxyAdminOwner is the aliased version of finalSystemOwner. This is the method expected to be used for the production deployment, where both systems are owned by the same L1 multisig.
  • equal: verifies that proxyAdminOwner and finalSystemOwner are equal. This can be used for testing environments where both systems are just owned by the same EOA.

This check happens in both the L1 deployment script and the L2 genesis script.

"daBondSize": 1000,
"daResolverRefundPercentage": 50
"daResolverRefundPercentage": 50,
"l2ProxyAdminOwnerVerification": "equal"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What do you think about changing this to something it's easier to understand, like "productionAddresses: true/false". I don't see a case where no-check would be needed.

@martinvol
Copy link
Copy Markdown

Do we want to perform any testing before merging?

@m-chrzan m-chrzan merged commit 694b08e into pahor/genesisGeneration Mar 7, 2025
38 of 45 checks passed
@m-chrzan m-chrzan deleted the m-chrzan/alias-proxy-owner branch March 7, 2025 21:11
pahor167 added a commit that referenced this pull request May 19, 2025
* L2 allocation generation by itself

* Readme added

* update of readme

* AbstractFeeCurrency

* Celo smart contracts

* added deploy of celo contracts to devnet

* working without preInitializeOptimismPortalBalance

* CustomGasToken L1 working

* REVERT LATER - just for testing

* fix of solidity version

* Update interface solidity version

* Pahor/genesis generation working deploy from celo2 (#307)

* working deploy2.s.sol from celo10

* Deployment refactor

* Compilation fix

* removal of deploy_orig

* [Contract Deployment] Split fault proof deployment (#308)

* working deploy2.s.sol from celo10

* Deployment refactor

* Contract Deployment: Split FP initialization

* Minnor format fixes

---------

Co-authored-by: pahor167 <hornak.pavel@gmail.com>

* Celo token permit

* Dual Guardian mechanism (#302)

* working deploy2.s.sol from celo10

* Deployment refactor

* Compilation fix

* removal of deploy_orig

* Setup new contract for Celo-specific guardian role

* Test the actual new contract

* Add getter for global SuperchainConfig

* Make sure global guardian can't directly pause Celo config

* Rename test contracts

* Return combined Superchain and Celo paused status

* Allow pausing of Celo config when Superchain is paused

* Ensure Celo stays paused if Superchain still paused

* Add CeloSuperchainConfig to Specs test

* Exclude CeloSuperchainConfig from Initializable test for now

* Make test view

* Use CeloSuperchainConfig interface

* Check and propagate superchain paused status in one function

* Setup CeloSuperchainConfig in deploy script

* Point OptimismPortal to CeloSuperchainConfig

* Formatting

* Use CeloSuperchainConfig in contracts that used SuperchainConfig

* Fix CrossDomanMessenger test

* Add NatSpecs

* Add unit test NatSpecs

* Add reference comment to deploy script

* Add comments

* Emit event on config update

* Initialize as paused if Superchain paused at init time

* Test Celo and Superchain pauses on OptimismPortal2

* Test Celo and Superchain pauses on OptimismPortal

* Test Celo and Superchain pauses on L1CrossDomainMessenger

* Test Celo and Superchain pauses on L1ERC721Bridge

* Use checkAndPause in L1ERC721Bridge

* Add enum and event to interface

* Use CeloSuperChainConfig in ChainAssertions

* Remove unused script

* Add CeloSuperchainConfig chain assertion

---------

Co-authored-by: pahor167 <hornak.pavel@gmail.com>

* ICeloSuperchainConfig ignored

* Remove debugging function (#313)

* Fix Initializable test (#312)

* Check CeloSuperchainConfig in Initializable test

* Ignore Celo contracts from Initializable test

* Always deal eth to precompiles (#314)

* removal of ethereum-optimism/latitude-1

* lint

* unused import removal

* Snapshots update

* semver lock

* gas tests fixes

* move of semver diff to celo-contracts/v1.8.0

* removal of debug prints

* Test cimg base image for fuzz-golang

* Install parallel

* Update kona-fpp image

* revert of deal EthToPrecompiles

* unit test fix

* CeloSuperchainConfig adjustements (#323)

* Use new namespace in inheriting contract

* Allow unset superchainConfig

* Minor audit fixes (#325)

* interfaces check fix

* lint fixes

* Implement CeloSuperchainConfig standalone, without inheritance (#326)

* Implement CeloSuperchainConfig standalone, without inheritance

* Use CeloSuperchainConfig in DelayedWETH (#329)

* build fix

* Remove usage of stateful pause check (#332)

* Celo readme

* readme fix

* removed virtual tag from paused function (#335)

* Move constants inside contracts (#336)

* Add ProxyAdmin owner verification to deploy/genesis scripts (#345)

* Provide external SuperchainConfig in deploy config (#352)

* Provide an external superchain config and deploy Celo with it

* Add externalSuperchainConfig in go and config template

* Update CeloTokenL1.sol

* Rolled back change by accident

* Fix Celo token (#358)

* Add chain_op_config field to rollup.json (required for testnets)

---------

Co-authored-by: Javier Cortejoso <javier.cortejoso@gmail.com>
Co-authored-by: Martin <marcin.j.chrzanowski@gmail.com>
Co-authored-by: Martin <martin@clabs.co>
Co-authored-by: soloseng <102702451+soloseng@users.noreply.github.com>
Co-authored-by: Martín Volpe <martin.volpe@gmail.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