From fbce40f891ba5d7a77b4285ae6e41cb6c8510240 Mon Sep 17 00:00:00 2001 From: Trevor Porter Date: Mon, 4 Nov 2024 14:39:21 +0000 Subject: [PATCH] fix: warp route checker (#4810) ### Description - Updates the .registryrc, which we will need to update when we add new warp route configs to infra, otherwise we'll get ``` Checking warp route WBTC/eclipsemainnet-ethereum... Error checking warp route USDT/eclipsemainnet-ethereum-solanamainnet: Error: Warp route config for USDT/eclipsemainnet-ethereum-solanamainnet not found in registry Error checking warp route WBTC/eclipsemainnet-ethereum: Error: Warp route config for WBTC/eclipsemainnet-ethereum not found in registry Failed to check warp routes: USDT/eclipsemainnet-ethereum-solanamainnet, WBTC/eclipsemainnet-ethereum ``` - Uses the `Always` imagePullPolicy (https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) to ensure we always use latest main - A consequence of removing Lumia addresses from the registry in https://github.com/hyperlane-xyz/hyperlane-registry/pull/348 is that this broke checking of the Lumia warp route. I manually specify the required addresses here now. - Also needed to explicitly specify the proxyAdmin ownership Definitely some opportunities for improvement with the warp route deploy flow ### Drive-by changes ### Related issues ### Backward compatibility ### Testing --- .registryrc | 2 +- .../getEthereumBscLumiaLUMIAWarpConfig.ts | 20 ++++++++++++++++++- .../check-warp-deploy/templates/cron-job.yaml | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.registryrc b/.registryrc index e1877ed1f..612062b3f 100644 --- a/.registryrc +++ b/.registryrc @@ -1 +1 @@ -302be4817c063629cec70c0b02322b250df71122 +14836804e543a64cd3747cd6bbea6e245b6353b1 diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.ts index d063f9a8f..3ce50742a 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.ts @@ -9,20 +9,38 @@ import { objMap } from '@hyperlane-xyz/utils'; // Lumia Team const owner = '0x8bBA07Ddc72455b55530C17e6f6223EF6E156863'; +const ownerConfig = { + owner, + // The proxyAdmins are warp-route specific + ownerOverrides: { + proxyAdmin: owner, + }, +}; + export const getEthereumBscLUMIAWarpConfig = async ( routerConfig: ChainMap, ): Promise> => { const ethereum = { type: TokenType.collateral, token: '0xD9343a049D5DBd89CD19DC6BcA8c48fB3a0a42a7', + ownerOverrides: { + proxyAdmin: owner, + }, }; const bsc = { type: TokenType.synthetic, + ownerOverrides: { + proxyAdmin: owner, + }, }; const lumia = { type: TokenType.native, + // As this has been removed from the registry in https://github.com/hyperlane-xyz/hyperlane-registry/pull/348, + // we must specify this explicitly. + mailbox: '0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7', + proxyAdmin: '0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D', }; const configMap = { @@ -34,7 +52,7 @@ export const getEthereumBscLUMIAWarpConfig = async ( const merged = objMap(configMap, (chain, config) => ({ ...routerConfig[chain], ...config, - owner, + ...ownerConfig, })); return merged as ChainMap; diff --git a/typescript/infra/helm/check-warp-deploy/templates/cron-job.yaml b/typescript/infra/helm/check-warp-deploy/templates/cron-job.yaml index e33b1021e..06339a6b7 100644 --- a/typescript/infra/helm/check-warp-deploy/templates/cron-job.yaml +++ b/typescript/infra/helm/check-warp-deploy/templates/cron-job.yaml @@ -17,7 +17,7 @@ spec: containers: - name: check-warp-deploy image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: IfNotPresent + imagePullPolicy: Always command: - ./node_modules/.bin/tsx - ./typescript/infra/scripts/check/check-warp-deploy.ts