Skip to content

Commit

Permalink
feat: parse warp route artifacts with token-specific key names (#3420)
Browse files Browse the repository at this point in the history
### 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

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

- Fixes #3415
- Fixes #3397

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### 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
```
  • Loading branch information
daniel-savu authored and yorhodes committed Mar 22, 2024
1 parent 290233d commit 60c3dfd
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 18 deletions.
28 changes: 19 additions & 9 deletions typescript/infra/config/environments/mainnet3/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
],
Expand All @@ -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),
Expand All @@ -167,7 +177,7 @@ const hyperlane: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '54aeb64-20240206-163119',
tag: 'ae0990a-20240313-215426',
},
},
};
Expand All @@ -181,7 +191,7 @@ const releaseCandidate: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '9736164-20240307-131918',
tag: 'ae0990a-20240313-215426',
},
whitelist: releaseCandidateHelloworldMatchingList,
gasPaymentEnforcement,
Expand All @@ -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),
Expand All @@ -218,7 +228,7 @@ const neutron: RootAgentConfig = {
docker: {
repo,
// Includes Cosmos block-by-block indexing.
tag: '9736164-20240307-131918',
tag: 'ae0990a-20240313-215426',
},
gasPaymentEnforcement: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"inevm": {
"HypERC20": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147"
"router": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147",
"type": "HypERC20"
},
"ethereum": {
"HypERC20Collateral": "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f"
"router": "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f",
"type": "HypERC20Collateral"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"inevm": {
"HypERC20": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5"
"router": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5",
"type": "HypERC20"
},
"ethereum": {
"HypERC20Collateral": "0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19"
"router": "0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19",
"type": "HypERC20Collateral"
}
}
10 changes: 5 additions & 5 deletions typescript/infra/config/environments/testnet4/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const hyperlane: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '7d1f975-20240312-113101',
tag: 'ae0990a-20240313-215426',
},
blacklist: [
...releaseCandidateHelloworldMatchingList,
Expand Down Expand Up @@ -127,15 +127,15 @@ const hyperlane: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '7d1f975-20240312-113101',
tag: 'ae0990a-20240313-215426',
},
chains: validatorChainConfig(Contexts.Hyperlane),
},
scraper: {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '7d1f975-20240312-113101',
tag: 'ae0990a-20240313-215426',
},
},
};
Expand All @@ -149,7 +149,7 @@ const releaseCandidate: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '7d1f975-20240312-113101',
tag: 'ae0990a-20240313-215426',
},
whitelist: [...releaseCandidateHelloworldMatchingList],
gasPaymentEnforcement,
Expand All @@ -159,7 +159,7 @@ const releaseCandidate: RootAgentConfig = {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '7d1f975-20240312-113101',
tag: 'ae0990a-20240313-215426',
},
chains: validatorChainConfig(Contexts.ReleaseCandidate),
},
Expand Down

0 comments on commit 60c3dfd

Please sign in to comment.