From 60c3dfd24b9e9f5c415efebb8691ec24bf188705 Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:33:53 +0000 Subject: [PATCH] feat: parse warp route artifacts with token-specific key names (#3420) ### Description Looks like all warp route artifacts until now used to have keys named `router`. The new artifacts (for USDC and USDT, inevm <> EVM) have their keys named according to the token type (e.g. `HypERC20`, `HypERC20Collateral` etc). This adds a script to parse such files, and updates agent images to deploy with these warp route app_context labels. ### Drive-by changes ### Related issues - Fixes https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/3415 - Fixes https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/3397 ### Backward compatibility ### Testing What kind of testing have these changes undergone? Manual on RC, by disabling the whitelist and applying the same `metricAppContexts` as for the hyperlane context: ``` hyperlane_submitter_queue_length{agent="relayer",app_context="injective_inevm_inj",hyperlane_baselib_version="0.1.0",queue_name="confirm_queue",remote="injective"} 9 hyperlane_submitter_queue_length{agent="relayer",app_context="injective_inevm_inj",hyperlane_baselib_version="0.1.0",queue_name="prepare_queue",remote="injective"} 0 hyperlane_submitter_queue_length{agent="relayer",app_context="inevm_ethereum_usdc",hyperlane_baselib_version="0.1.0",queue_name="confirm_queue",remote="inevm"} 7 hyperlane_submitter_queue_length{agent="relayer",app_context="inevm_ethereum_usdc",hyperlane_baselib_version="0.1.0",queue_name="prepare_queue",remote="inevm"} 1 hyperlane_submitter_queue_length{agent="relayer",app_context="inevm_ethereum_usdt",hyperlane_baselib_version="0.1.0",queue_name="confirm_queue",remote="inevm"} 10 hyperlane_submitter_queue_length{agent="relayer",app_context="inevm_ethereum_usdt",hyperlane_baselib_version="0.1.0",queue_name="prepare_queue",remote="inevm"} 0 ``` --- .../config/environments/mainnet3/agent.ts | 28 +++++++++++++------ .../mainnet3/warp/inevm-USDC-addresses.json | 6 ++-- .../mainnet3/warp/inevm-USDT-addresses.json | 6 ++-- .../config/environments/testnet4/agent.ts | 10 +++---- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/agent.ts b/typescript/infra/config/environments/mainnet3/agent.ts index 3d83b0a9416..3a3ff3df69a 100644 --- a/typescript/infra/config/environments/mainnet3/agent.ts +++ b/typescript/infra/config/environments/mainnet3/agent.ts @@ -22,7 +22,9 @@ import { environment, supportedChainNames } from './chains'; import { helloWorld } from './helloworld'; import { validatorChainConfig } from './validators'; import arbitrumTIAAddresses from './warp/arbitrum-TIA-addresses.json'; -import injectiveInevmAddresses from './warp/injective-inevm-addresses.json'; +import inevmEthereumUsdcAddresses from './warp/inevm-USDC-addresses.json'; +import inevmEthereumUsdtAddresses from './warp/inevm-USDT-addresses.json'; +import injectiveInevmInjAddresses from './warp/injective-inevm-addresses.json'; import mantaTIAAddresses from './warp/manta-TIA-addresses.json'; const releaseCandidateHelloworldMatchingList = routerMatchingList( @@ -131,14 +133,14 @@ const hyperlane: RootAgentConfig = { docker: { repo, // Includes Cosmos block-by-block indexing. - tag: 'c2bf423-20240308-164604', + tag: 'ae0990a-20240313-215426', }, gasPaymentEnforcement: [ // Temporary measure to ensure all inEVM warp route messages are delivered - // we saw some issues with IGP indexing. { type: GasPaymentEnforcementPolicyType.None, - matchingList: routerMatchingList(injectiveInevmAddresses), + matchingList: routerMatchingList(injectiveInevmInjAddresses), }, ...gasPaymentEnforcement, ], @@ -151,14 +153,22 @@ const hyperlane: RootAgentConfig = { }, { name: 'injective_inevm_inj', - matchingList: routerMatchingList(injectiveInevmAddresses), + matchingList: routerMatchingList(injectiveInevmInjAddresses), + }, + { + name: 'inevm_ethereum_usdc', + matchingList: routerMatchingList(inevmEthereumUsdcAddresses), + }, + { + name: 'inevm_ethereum_usdt', + matchingList: routerMatchingList(inevmEthereumUsdtAddresses), }, ], }, validators: { docker: { repo, - tag: '9736164-20240307-131918', + tag: 'ae0990a-20240313-215426', }, rpcConsensusType: RpcConsensusType.Quorum, chains: validatorChainConfig(Contexts.Hyperlane), @@ -167,7 +177,7 @@ const hyperlane: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '54aeb64-20240206-163119', + tag: 'ae0990a-20240313-215426', }, }, }; @@ -181,7 +191,7 @@ const releaseCandidate: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '9736164-20240307-131918', + tag: 'ae0990a-20240313-215426', }, whitelist: releaseCandidateHelloworldMatchingList, gasPaymentEnforcement, @@ -193,7 +203,7 @@ const releaseCandidate: RootAgentConfig = { validators: { docker: { repo, - tag: '9736164-20240307-131918', + tag: 'ae0990a-20240313-215426', }, rpcConsensusType: RpcConsensusType.Quorum, chains: validatorChainConfig(Contexts.ReleaseCandidate), @@ -218,7 +228,7 @@ const neutron: RootAgentConfig = { docker: { repo, // Includes Cosmos block-by-block indexing. - tag: '9736164-20240307-131918', + tag: 'ae0990a-20240313-215426', }, gasPaymentEnforcement: [ { diff --git a/typescript/infra/config/environments/mainnet3/warp/inevm-USDC-addresses.json b/typescript/infra/config/environments/mainnet3/warp/inevm-USDC-addresses.json index 2e38c664a02..4d74051842c 100644 --- a/typescript/infra/config/environments/mainnet3/warp/inevm-USDC-addresses.json +++ b/typescript/infra/config/environments/mainnet3/warp/inevm-USDC-addresses.json @@ -1,8 +1,10 @@ { "inevm": { - "HypERC20": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147" + "router": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147", + "type": "HypERC20" }, "ethereum": { - "HypERC20Collateral": "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f" + "router": "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f", + "type": "HypERC20Collateral" } } diff --git a/typescript/infra/config/environments/mainnet3/warp/inevm-USDT-addresses.json b/typescript/infra/config/environments/mainnet3/warp/inevm-USDT-addresses.json index b9e1b65223f..65628862a07 100644 --- a/typescript/infra/config/environments/mainnet3/warp/inevm-USDT-addresses.json +++ b/typescript/infra/config/environments/mainnet3/warp/inevm-USDT-addresses.json @@ -1,8 +1,10 @@ { "inevm": { - "HypERC20": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5" + "router": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5", + "type": "HypERC20" }, "ethereum": { - "HypERC20Collateral": "0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19" + "router": "0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19", + "type": "HypERC20Collateral" } } diff --git a/typescript/infra/config/environments/testnet4/agent.ts b/typescript/infra/config/environments/testnet4/agent.ts index cd4529fb143..fe02fac1a16 100644 --- a/typescript/infra/config/environments/testnet4/agent.ts +++ b/typescript/infra/config/environments/testnet4/agent.ts @@ -98,7 +98,7 @@ const hyperlane: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '7d1f975-20240312-113101', + tag: 'ae0990a-20240313-215426', }, blacklist: [ ...releaseCandidateHelloworldMatchingList, @@ -127,7 +127,7 @@ const hyperlane: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '7d1f975-20240312-113101', + tag: 'ae0990a-20240313-215426', }, chains: validatorChainConfig(Contexts.Hyperlane), }, @@ -135,7 +135,7 @@ const hyperlane: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '7d1f975-20240312-113101', + tag: 'ae0990a-20240313-215426', }, }, }; @@ -149,7 +149,7 @@ const releaseCandidate: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '7d1f975-20240312-113101', + tag: 'ae0990a-20240313-215426', }, whitelist: [...releaseCandidateHelloworldMatchingList], gasPaymentEnforcement, @@ -159,7 +159,7 @@ const releaseCandidate: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '7d1f975-20240312-113101', + tag: 'ae0990a-20240313-215426', }, chains: validatorChainConfig(Contexts.ReleaseCandidate), },