Deploy AggregationISM for rc kathy mainnet (#2541)

### Description

- Deployed AggregationISM to rc mainnet2
- AggregationISM can take in env as a param (moved out of `testnet3/`)
- Set as defaultISM for rc mainnet2 context

### Drive-by changes

- Deployed `MerkleRootMultisigFactory` and `MessageIdMultisigFactory`
for mainnet2
- RoutingISM deployment can run in parallel for each origin.

### Related issues

Fixes #2478 

### Backward compatibility

Backward compatible? Yes

### Testing

Manual, see issue #2560
mattie/infra-drift-fix
Kunal Arora 1 year ago committed by GitHub
parent 16eff8d4d6
commit ed7569d1ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 43
      typescript/infra/config/aggregationIsm.ts
  2. 4
      typescript/infra/config/environments/mainnet2/agent.ts
  3. 108
      typescript/infra/config/environments/mainnet2/ism/verification.json
  4. 3
      typescript/infra/config/environments/testnet3/core.ts
  5. 7
      typescript/infra/config/environments/testnet3/helloworld.ts
  6. 2
      typescript/infra/scripts/deploy.ts
  7. 36
      typescript/sdk/src/consts/environments/mainnet.json
  8. 21
      typescript/sdk/src/ism/HyperlaneIsmFactory.ts

@ -11,13 +11,31 @@ import {
objMap,
} from '@hyperlane-xyz/sdk';
import { Contexts } from '../../contexts';
import { rcMultisigIsmConfigs } from '../../multisigIsm';
import { DeployEnvironment } from '../src/config';
import { chainNames } from './chains';
import { owners } from './owners';
import { Contexts } from './contexts';
import { chainNames as mainnet2Chains } from './environments/mainnet2/chains';
import { owners as mainnet2Owners } from './environments/mainnet2/owners';
import { chainNames as testChains } from './environments/test/chains';
import { owners as testOwners } from './environments/test/owners';
import { chainNames as testnet3Chains } from './environments/testnet3/chains';
import { owners as testnet3Owners } from './environments/testnet3/owners';
import { rcMultisigIsmConfigs } from './multisigIsm';
const chains = {
mainnet2: mainnet2Chains,
testnet3: testnet3Chains,
test: testChains,
};
const owners = {
testnet3: testnet3Owners,
mainnet2: mainnet2Owners,
test: testOwners,
};
export const multisigIsms = (
env: DeployEnvironment,
local: ChainName,
type: MultisigIsmConfig['type'],
context: Contexts,
@ -28,7 +46,7 @@ export const multisigIsms = (
? rcMultisigIsmConfigs
: defaultMultisigIsmConfigs,
(chain, config): config is MultisigIsmConfig =>
chain !== local && chainNames.includes(chain),
chain !== local && chains[env].includes(chain),
),
(_, config) => ({
...config,
@ -38,20 +56,27 @@ export const multisigIsms = (
/// Routing => Multisig ISM type
export const routingIsm = (
environment: DeployEnvironment,
local: ChainName,
type: MultisigIsmConfig['type'],
context: Contexts,
): RoutingIsmConfig => {
const defaultMultisigIsmConfigs = multisigIsms(local, type, context);
const defaultMultisigIsmConfigs = multisigIsms(
environment,
local,
type,
context,
);
return {
type: ModuleType.ROUTING,
domains: defaultMultisigIsmConfigs,
owner: owners[local],
owner: owners[environment][local],
};
};
/// 1/2 Aggregation => Routing => Multisig ISM
export const aggregationIsm = (
environment: DeployEnvironment,
local: ChainName,
context: Contexts,
): AggregationIsmConfig => {
@ -59,8 +84,8 @@ export const aggregationIsm = (
type: ModuleType.AGGREGATION,
modules: [
// ORDERING MATTERS
routingIsm(local, ModuleType.MERKLE_ROOT_MULTISIG, context),
routingIsm(local, ModuleType.MESSAGE_ID_MULTISIG, context),
routingIsm(environment, local, ModuleType.MERKLE_ROOT_MULTISIG, context),
routingIsm(environment, local, ModuleType.MESSAGE_ID_MULTISIG, context),
],
threshold: 1,
};

@ -105,7 +105,7 @@ const releaseCandidate: RootAgentConfig = {
connectionType: AgentConnectionType.HttpFallback,
docker: {
repo,
tag: '2deb9b8-20230602-205342',
tag: 'aa92fe3-20230717-210518',
},
whitelist: releaseCandidateHelloworldMatchingList,
gasPaymentEnforcement,
@ -117,7 +117,7 @@ const releaseCandidate: RootAgentConfig = {
validators: {
docker: {
repo,
tag: '497db63-20230614-174455',
tag: 'aa92fe3-20230717-210518',
},
connectionType: AgentConnectionType.HttpQuorum,
chains: validatorChainConfig(Contexts.ReleaseCandidate),

@ -17,6 +17,18 @@
"address": "0x1fdfD1486b8339638C6b92f8a96D698D8182D2b1",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MerkleRootMultisigIsmFactory",
"address": "0x82140b2ddAd4E4dd7e1D6757Fb5F9485c230B79d",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MessageIdMultisigIsmFactory",
"address": "0x1079056da3EC7D55521F27e1E094015C0d39Cc65",
"constructorArguments": "",
"isProxy": false
}
],
"ethereum": [
@ -37,6 +49,18 @@
"address": "0xBF30B4F328d1F6AC47ecCcF23836F3CbB2422c9f",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MerkleRootMultisigIsmFactory",
"address": "0xd6286a220b80128763bc0181Aa27F471fDC8E532",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MessageIdMultisigIsmFactory",
"address": "0x60305F347C369E31782B3bc42D08dC2c7F218807",
"constructorArguments": "",
"isProxy": false
}
],
"avalanche": [
@ -57,6 +81,18 @@
"address": "0x0FC1A9DFAca9b6Ba11bC470Bf284Da7c107fDfF2",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MerkleRootMultisigIsmFactory",
"address": "0x3A434432E4305C378F7a29fD63653d09ec48a145",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MessageIdMultisigIsmFactory",
"address": "0x6f82eC078317aAbE2ae5200f09d4550987A1bF28",
"constructorArguments": "",
"isProxy": false
}
],
"polygon": [
@ -77,6 +113,18 @@
"address": "0x0B48a744698ba8dFa514742dFEB6728f52fD66f7",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MerkleRootMultisigIsmFactory",
"address": "0x004D9DF774B1968989dCC9F2F389325BA61Ba370",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MessageIdMultisigIsmFactory",
"address": "0x720663C310D3Db506F28a8F65c39Af37BFBe0248",
"constructorArguments": "",
"isProxy": false
}
],
"bsc": [
@ -97,6 +145,18 @@
"address": "0x85392758524EEE2323Bd3029E77aFc9bA9E60216",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MerkleRootMultisigIsmFactory",
"address": "0x43Ee7f7Cd4bB7108144126780a07c22257925060",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MessageIdMultisigIsmFactory",
"address": "0xcf14426dF1D973A656e20c3AcD2B9E18C3C05793",
"constructorArguments": "",
"isProxy": false
}
],
"arbitrum": [
@ -117,6 +177,18 @@
"address": "0xcC2fA09fa13857942fae408EcCEc8De307344e99",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MerkleRootMultisigIsmFactory",
"address": "0xb98CCA546f88B825D1ae132ac0fb52B27cE68b05",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MessageIdMultisigIsmFactory",
"address": "0x9D7B7245C6dAEBD5543080C91523e0702fC27024",
"constructorArguments": "",
"isProxy": false
}
],
"optimism": [
@ -137,6 +209,18 @@
"address": "0x4ef980034E631CC0CFb3b065aB793611f1B6511A",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MerkleRootMultisigIsmFactory",
"address": "0xdDF51d1f0f38ec98F60BAB4FF7edfc7e47C4eA0d",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MessageIdMultisigIsmFactory",
"address": "0x3A7Ff7b700681A2655377cFDc88eE2031cf270E1",
"constructorArguments": "",
"isProxy": false
}
],
"moonbeam": [
@ -157,6 +241,18 @@
"address": "0xB5ec4e94ec47A70C6A38370666F713423816ce4c",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MerkleRootMultisigIsmFactory",
"address": "0xE80C30738DC66dad77657695e345be168D49b062",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MessageIdMultisigIsmFactory",
"address": "0x147F8C69f0FCF571c03093dE4180718FaecbA31E",
"constructorArguments": "",
"isProxy": false
}
],
"gnosis": [
@ -177,6 +273,18 @@
"address": "0xbB22547D1dc681fe925f568f637Ff67aC06c20fc",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MerkleRootMultisigIsmFactory",
"address": "0x784b9D0f4eF9fb8444DfB5d24AB221C9D1A85395",
"constructorArguments": "",
"isProxy": false
},
{
"name": "MessageIdMultisigIsmFactory",
"address": "0xC4275763D7b621eb732847957012F1fb35C90BB8",
"constructorArguments": "",
"isProxy": false
}
]
}

@ -5,13 +5,14 @@ import {
objMap,
} from '@hyperlane-xyz/sdk';
import { aggregationIsm } from '../../aggregationIsm';
import { Contexts } from '../../contexts';
import { aggregationIsm } from './aggregationIsm';
import { owners } from './owners';
export const core: ChainMap<CoreConfig> = objMap(owners, (local, owner) => {
const defaultIsm: AggregationIsmConfig = aggregationIsm(
'testnet3',
local,
Contexts.Hyperlane,
);

@ -6,11 +6,11 @@ import {
objMap,
} from '@hyperlane-xyz/sdk';
import { HelloWorldConfig } from '../../../src/config';
import { DeployEnvironment, HelloWorldConfig } from '../../../src/config';
import { HelloWorldKathyRunMode } from '../../../src/config/helloworld';
import { aggregationIsm } from '../../aggregationIsm';
import { Contexts } from '../../contexts';
import { aggregationIsm } from './aggregationIsm';
import { environment } from './chains';
import hyperlaneAddresses from './helloworld/hyperlane/addresses.json';
import rcAddresses from './helloworld/rc/addresses.json';
@ -60,10 +60,11 @@ export const helloWorld = {
};
export const helloWorldConfig = (
environment: DeployEnvironment,
context: Contexts,
routerConfigMap: ChainMap<RouterConfig>,
): ChainMap<HelloWorldContractsConfig> =>
objMap(routerConfigMap, (chain, routerConfig) => ({
...routerConfig,
interchainSecurityModule: aggregationIsm(chain, context),
interchainSecurityModule: aggregationIsm(environment, chain, context),
}));

@ -121,7 +121,7 @@ async function main() {
deployer = new TestQuerySenderDeployer(multiProvider, igp);
} else if (module === Modules.HELLO_WORLD) {
const routerConfig = await getRouterConfig(environment, multiProvider);
config = helloWorldConfig(context, routerConfig);
config = helloWorldConfig(environment, context, routerConfig);
const ismFactory = HyperlaneIsmFactory.fromEnvironment(
deployEnvToSdkEnv[environment],
multiProvider,

@ -12,7 +12,9 @@
"aggregationIsmFactory": "0xc864fa3B662613cA5051f41e157d0a997f9a5A87",
"routingIsmFactory": "0x1fdfD1486b8339638C6b92f8a96D698D8182D2b1",
"interchainQueryRouter": "0xA837e38C3F7D509DF3a7a0fCf65E3814DB6c2618",
"interchainAccountRouter": "0x9521291A43ebA3aD3FD24d610F4b7F7543C8d761"
"interchainAccountRouter": "0x9521291A43ebA3aD3FD24d610F4b7F7543C8d761",
"merkleRootMultisigIsmFactory": "0x82140b2ddAd4E4dd7e1D6757Fb5F9485c230B79d",
"messageIdMultisigIsmFactory": "0x1079056da3EC7D55521F27e1E094015C0d39Cc65"
},
"ethereum": {
"storageGasOracle": "0xc9a103990A8dB11b4f627bc5CD1D0c2685484Ec5",
@ -27,7 +29,9 @@
"aggregationIsmFactory": "0x30B3Ef3e98B1FF72f03f71f68115E18F203Ec794",
"routingIsmFactory": "0xBF30B4F328d1F6AC47ecCcF23836F3CbB2422c9f",
"interchainQueryRouter": "0x1d9fB4EA1712d0aaF713F7e02Aee0766Bb42bdB0",
"interchainAccountRouter": "0xe0f6eDeb3de10447C1D1CfB787e14e8F2F3a21Fb"
"interchainAccountRouter": "0xe0f6eDeb3de10447C1D1CfB787e14e8F2F3a21Fb",
"merkleRootMultisigIsmFactory": "0xd6286a220b80128763bc0181Aa27F471fDC8E532",
"messageIdMultisigIsmFactory": "0x60305F347C369E31782B3bc42D08dC2c7F218807"
},
"avalanche": {
"storageGasOracle": "0x175821F30AdCAA4bbB72Ce98eF76C2E0De2C3f21",
@ -42,7 +46,9 @@
"aggregationIsmFactory": "0x070d4f61b05eD9e20C9194f29Df073f2110705fc",
"routingIsmFactory": "0x0FC1A9DFAca9b6Ba11bC470Bf284Da7c107fDfF2",
"interchainQueryRouter": "0x93CDC5315833F827A92F593a2aAa61e68A95b51b",
"interchainAccountRouter": "0x7D8bd3e0e6782be26B817FF6f39F26300C457aC0"
"interchainAccountRouter": "0x7D8bd3e0e6782be26B817FF6f39F26300C457aC0",
"merkleRootMultisigIsmFactory": "0x3A434432E4305C378F7a29fD63653d09ec48a145",
"messageIdMultisigIsmFactory": "0x6f82eC078317aAbE2ae5200f09d4550987A1bF28"
},
"polygon": {
"storageGasOracle": "0xA3a24EC5670F1F416AB9fD554FcE2f226AE9D7eB",
@ -57,7 +63,9 @@
"aggregationIsmFactory": "0x10Add66Db9C837000A43F3601aa9c54c6744F4c8",
"routingIsmFactory": "0x0B48a744698ba8dFa514742dFEB6728f52fD66f7",
"interchainQueryRouter": "0x284f71eBF22b7C7bf43aD20c460343D1a2d697c0",
"interchainAccountRouter": "0x08B9d59ad00bb917144B25C957F9c4a1e955709a"
"interchainAccountRouter": "0x08B9d59ad00bb917144B25C957F9c4a1e955709a",
"merkleRootMultisigIsmFactory": "0x004D9DF774B1968989dCC9F2F389325BA61Ba370",
"messageIdMultisigIsmFactory": "0x720663C310D3Db506F28a8F65c39Af37BFBe0248"
},
"bsc": {
"storageGasOracle": "0x91d23D603d60445411C06e6443d81395593B7940",
@ -72,7 +80,9 @@
"aggregationIsmFactory": "0x4084054Fc83af652A1f21EA2FF2a668D796e2514",
"routingIsmFactory": "0x85392758524EEE2323Bd3029E77aFc9bA9E60216",
"interchainQueryRouter": "0xAD20d715A6544be3f132F96e1cEaAfF016e356D7",
"interchainAccountRouter": "0x98593E2EeC26e369C761f6F0A0220ABcd6ea2673"
"interchainAccountRouter": "0x98593E2EeC26e369C761f6F0A0220ABcd6ea2673",
"merkleRootMultisigIsmFactory": "0x43Ee7f7Cd4bB7108144126780a07c22257925060",
"messageIdMultisigIsmFactory": "0xcf14426dF1D973A656e20c3AcD2B9E18C3C05793"
},
"arbitrum": {
"storageGasOracle": "0xD3805207b65d99C075ceA938Fa7c0587026a5DF5",
@ -88,7 +98,9 @@
"routingIsmFactory": "0xcC2fA09fa13857942fae408EcCEc8De307344e99",
"interchainQueryRouter": "0x6fa285743afc565Ee99b6D34FE5F298690BC6412",
"interchainAccountRouter": "0x2dF1d8f3b357422Ceddbeee3fdF159B45AC6F005",
"timelockController": "0xAC98b0cD1B64EA4fe133C6D2EDaf842cE5cF4b01"
"timelockController": "0xAC98b0cD1B64EA4fe133C6D2EDaf842cE5cF4b01",
"merkleRootMultisigIsmFactory": "0xb98CCA546f88B825D1ae132ac0fb52B27cE68b05",
"messageIdMultisigIsmFactory": "0x9D7B7245C6dAEBD5543080C91523e0702fC27024"
},
"optimism": {
"storageGasOracle": "0x27e88AeB8EA4B159d81df06355Ea3d20bEB1de38",
@ -103,7 +115,9 @@
"aggregationIsmFactory": "0xb7d42f065E32eB6fCAac7ef83902c56164328fE2",
"routingIsmFactory": "0x4ef980034E631CC0CFb3b065aB793611f1B6511A",
"interchainQueryRouter": "0x5188731eE98892d1e7d98b869D811624dADf94eb",
"interchainAccountRouter": "0x0e2fEfe9357453Fc587FB11eF7C2CcdF56127f8a"
"interchainAccountRouter": "0x0e2fEfe9357453Fc587FB11eF7C2CcdF56127f8a",
"merkleRootMultisigIsmFactory": "0xdDF51d1f0f38ec98F60BAB4FF7edfc7e47C4eA0d",
"messageIdMultisigIsmFactory": "0x3A7Ff7b700681A2655377cFDc88eE2031cf270E1"
},
"moonbeam": {
"storageGasOracle": "0x448b7ADB0dA36d41AA2AfDc9d63b97541A7b3819",
@ -118,7 +132,9 @@
"aggregationIsmFactory": "0x20E1897CD584C3788A3C24f5e424345a55ADf90C",
"routingIsmFactory": "0xB5ec4e94ec47A70C6A38370666F713423816ce4c",
"interchainQueryRouter": "0xf1CFA9D0d4191441b1D121144f4027e63bbAE591",
"interchainAccountRouter": "0xE50DEa401eD22aBc75559d411b9cfF819c324D3b"
"interchainAccountRouter": "0xE50DEa401eD22aBc75559d411b9cfF819c324D3b",
"merkleRootMultisigIsmFactory": "0xE80C30738DC66dad77657695e345be168D49b062",
"messageIdMultisigIsmFactory": "0x147F8C69f0FCF571c03093dE4180718FaecbA31E"
},
"gnosis": {
"storageGasOracle": "0x5E01d8F34b629E3f92d69546bbc4142A7Adee7e9",
@ -134,6 +150,8 @@
"aggregationIsmFactory": "0xb4fc9B5fD57499Ef6FfF3995728a55F7A618ef86",
"routingIsmFactory": "0xbB22547D1dc681fe925f568f637Ff67aC06c20fc",
"interchainQueryRouter": "0xA376b27212D608324808923Add679A2c9FAFe9Da",
"interchainAccountRouter": "0xe9E3444DDD80c50276c0Fcf316026f6d7fEc2c47"
"interchainAccountRouter": "0xe9E3444DDD80c50276c0Fcf316026f6d7fEc2c47",
"merkleRootMultisigIsmFactory": "0x784b9D0f4eF9fb8444DfB5d24AB221C9D1A85395",
"messageIdMultisigIsmFactory": "0xC4275763D7b621eb732847957012F1fb35C90BB8"
}
}

@ -151,15 +151,29 @@ export class HyperlaneIsmFactory extends HyperlaneApp<IsmFactoryFactories> {
const signer = this.multiProvider.getSigner(chain);
const routingIsmFactory = this.getContracts(chain).routingIsmFactory;
const isms: ChainMap<types.Address> = {};
for (const origin of Object.keys(config.domains)) {
// deploy for all origins in parallel, keep running even if some fail
await Promise.allSettled(
Object.keys(config.domains).map(async (origin) => {
const ism = await this.deploy(chain, config.domains[origin], origin);
isms[origin] = ism.address;
}),
).then((results) => {
results.forEach((result) => {
if (result.status === 'rejected') {
this.logger(`Failed to deploy routing ISM: ${result.reason}`);
}
});
});
const domains = Object.keys(isms).map((chain) =>
this.multiProvider.getDomainId(chain),
);
const submoduleAddresses = Object.values(isms);
const tx = await routingIsmFactory.deploy(domains, submoduleAddresses);
const overrides = this.multiProvider.getTransactionOverrides(chain);
const tx = await routingIsmFactory.deploy(
domains,
submoduleAddresses,
overrides,
);
const receipt = await this.multiProvider.handleTx(chain, tx);
// TODO: Break this out into a generalized function
const dispatchLogs = receipt.logs
@ -182,7 +196,7 @@ export class HyperlaneIsmFactory extends HyperlaneApp<IsmFactoryFactories> {
this.logger(`Transferring ownership of routing ISM to ${config.owner}`);
await this.multiProvider.handleTx(
chain,
await routingIsm.transferOwnership(config.owner),
await routingIsm.transferOwnership(config.owner, overrides),
);
const address = dispatchLogs[0].args['module'];
return IRoutingIsm__factory.connect(address, signer);
@ -223,7 +237,6 @@ export class HyperlaneIsmFactory extends HyperlaneApp<IsmFactoryFactories> {
this.logger(
`Deploying new ${threshold} of ${values.length} address set to ${chain}`,
);
const overrides = this.multiProvider.getTransactionOverrides(chain);
const hash = await factory.deploy(sorted, threshold, overrides);
await this.multiProvider.handleTx(chain, hash);

Loading…
Cancel
Save