-
Notifications
You must be signed in to change notification settings - Fork 453
feat: multichain deployments #1474
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
Conversation
|
We should only merge the Zeus upgrade script into the release branch |
| function computeCrosschainUpgradeableProxyAddress( | ||
| address implementation, | ||
| address admin, | ||
| bytes11 salt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: add deterministic salt per contract name. Discussed using FFI offline
|
|
||
| bytes11 constant EMPTY_CONTRACT_SALT = bytes11(uint88(0xffffffffffffffffffffff)); | ||
|
|
||
| library CrosschainDeployLib { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this to script/releases
**Motivation:** *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* **Modifications:** *Describe the modifications you've done.* **Result:** *After your change, what will change.*
**Motivation:** *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* **Modifications:** *Describe the modifications you've done.* **Result:** *After your change, what will change.*
**Motivation:** *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* **Modifications:** *Describe the modifications you've done.* **Result:** *After your change, what will change.*
**Motivation:** *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* **Modifications:** *Describe the modifications you've done.* **Result:** *After your change, what will change.*
**Motivation:** *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* **Modifications:** *Describe the modifications you've done.* **Result:** *After your change, what will change.*
**Motivation:** *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* **Modifications:** *Describe the modifications you've done.* **Result:** *After your change, what will change.*
**Motivation:** We need deploy scripts for multichain **Modifications:** Adds a `crossChainDeployLib` from: #1474. This library uses `createX` for deterministic deployments. In order to keep the same address on all `destinationChains`, we deploy contracts from the same multisig on each chain. Add `testnet-base-sepolia` to CI for deploy scripts. Adds a `deploy_globalRootConfirmerSet` script. This script initiates a global root confirmer set (ie. generator) and updates the `network.toml` file used in the deploy scripts. It is only intended to be used on `preprod` and `testnet`. To distinguish between a source and destination chain we add a `SOURCE_CHAIN: bool` and `DESTINATION_CHAIN: bool` to the Zeus Config. We skip parts of the deploy if a chain is not a source or destination. Deploys the contracts in 5 steps 1. `deploySourceChain.s.sol`: Deploys `KeyRegistrar`, `ReleaseManager`, `CrossChainRegistry`. 2. `deployDestinationChainProxies.s.sol`: Deploys _empty_ proxy contracts for `OperatorTableUpdater`, `BN254CertificateVerifier`, `ECDSACertificateVerifier`. _Note: in order to have deterministic proxies, we need to ensure the `initCode` is the same. Thus, the implementation is the same `emptyContract` and the proxyAdmin is initially the `multichainDeployerMultisig`_. 3. `deployDestinationChainImpls`: Deploys implementations using EOA 4. `instantiateDestinationChainProxies`: Upgrades the proxies to the actual implementations. Transfer proxy admin to the actual `proxyAdmin` 5. `configureCrossChainRegistry`: Updates the `crossChainRegistry` on the `SOURCE_CHAIN` to whitelist proper chainIds **Result:** Deploy scripts --------- Co-authored-by: clandestine.eth <[email protected]>
**Motivation:** We need deploy scripts for multichain **Modifications:** Adds a `crossChainDeployLib` from: #1474. This library uses `createX` for deterministic deployments. In order to keep the same address on all `destinationChains`, we deploy contracts from the same multisig on each chain. Add `testnet-base-sepolia` to CI for deploy scripts. Adds a `deploy_globalRootConfirmerSet` script. This script initiates a global root confirmer set (ie. generator) and updates the `network.toml` file used in the deploy scripts. It is only intended to be used on `preprod` and `testnet`. To distinguish between a source and destination chain we add a `SOURCE_CHAIN: bool` and `DESTINATION_CHAIN: bool` to the Zeus Config. We skip parts of the deploy if a chain is not a source or destination. Deploys the contracts in 5 steps 1. `deploySourceChain.s.sol`: Deploys `KeyRegistrar`, `ReleaseManager`, `CrossChainRegistry`. 2. `deployDestinationChainProxies.s.sol`: Deploys _empty_ proxy contracts for `OperatorTableUpdater`, `BN254CertificateVerifier`, `ECDSACertificateVerifier`. _Note: in order to have deterministic proxies, we need to ensure the `initCode` is the same. Thus, the implementation is the same `emptyContract` and the proxyAdmin is initially the `multichainDeployerMultisig`_. 3. `deployDestinationChainImpls`: Deploys implementations using EOA 4. `instantiateDestinationChainProxies`: Upgrades the proxies to the actual implementations. Transfer proxy admin to the actual `proxyAdmin` 5. `configureCrossChainRegistry`: Updates the `crossChainRegistry` on the `SOURCE_CHAIN` to whitelist proper chainIds **Result:** Deploy scripts --------- Co-authored-by: clandestine.eth <[email protected]>
**Motivation:** We need deploy scripts for multichain **Modifications:** Adds a `crossChainDeployLib` from: #1474. This library uses `createX` for deterministic deployments. In order to keep the same address on all `destinationChains`, we deploy contracts from the same multisig on each chain. Add `testnet-base-sepolia` to CI for deploy scripts. Adds a `deploy_globalRootConfirmerSet` script. This script initiates a global root confirmer set (ie. generator) and updates the `network.toml` file used in the deploy scripts. It is only intended to be used on `preprod` and `testnet`. To distinguish between a source and destination chain we add a `SOURCE_CHAIN: bool` and `DESTINATION_CHAIN: bool` to the Zeus Config. We skip parts of the deploy if a chain is not a source or destination. Deploys the contracts in 5 steps 1. `deploySourceChain.s.sol`: Deploys `KeyRegistrar`, `ReleaseManager`, `CrossChainRegistry`. 2. `deployDestinationChainProxies.s.sol`: Deploys _empty_ proxy contracts for `OperatorTableUpdater`, `BN254CertificateVerifier`, `ECDSACertificateVerifier`. _Note: in order to have deterministic proxies, we need to ensure the `initCode` is the same. Thus, the implementation is the same `emptyContract` and the proxyAdmin is initially the `multichainDeployerMultisig`_. 3. `deployDestinationChainImpls`: Deploys implementations using EOA 4. `instantiateDestinationChainProxies`: Upgrades the proxies to the actual implementations. Transfer proxy admin to the actual `proxyAdmin` 5. `configureCrossChainRegistry`: Updates the `crossChainRegistry` on the `SOURCE_CHAIN` to whitelist proper chainIds **Result:** Deploy scripts --------- Co-authored-by: clandestine.eth <[email protected]>
**Motivation:** *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* **Modifications:** *Describe the modifications you've done.* **Result:** *After your change, what will change.*
Motivation:
Explain here the context, and why you're making that change. What is the problem you're trying to solve.
Modifications:
Describe the modifications you've done.
Result:
After your change, what will change.