v2 rc contexts (#1689)

* Config for testnet3

* Config for mainnet2

* Removed newlines from debug print

* Print full hashes for matching list debug

* Deploy and config

* Fixes from PR review

* Fix compiler error

* Deploy gnosis rc
pull/1730/head
Mattie Conover 2 years ago committed by GitHub
parent 19dc142b1e
commit d95d9b29db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      rust/agents/relayer/src/settings/matching_list.rs
  2. 4
      rust/hyperlane-base/src/settings/loader.rs
  3. 42
      typescript/infra/config/environments/mainnet2/agent.ts
  4. 1
      typescript/infra/config/environments/mainnet2/funding.ts
  5. 21
      typescript/infra/config/environments/mainnet2/helloworld.ts
  6. 29
      typescript/infra/config/environments/mainnet2/helloworld/rc/addresses.json
  7. 74
      typescript/infra/config/environments/mainnet2/helloworld/rc/verification.json
  8. 41
      typescript/infra/config/environments/testnet3/agent.ts
  9. 1
      typescript/infra/config/environments/testnet3/funding.ts
  10. 21
      typescript/infra/config/environments/testnet3/helloworld.ts
  11. 26
      typescript/infra/config/environments/testnet3/helloworld/rc/addresses.json
  12. 66
      typescript/infra/config/environments/testnet3/helloworld/rc/verification.json

@ -1,5 +1,5 @@
use std::fmt;
use std::fmt::{Display, Formatter};
use std::fmt::{Debug, Display, Formatter};
use std::marker::PhantomData;
use std::num::ParseIntError;
@ -41,15 +41,15 @@ impl<T: PartialEq> Filter<T> {
}
}
impl<T: Display> Display for Filter<T> {
impl<T: Debug> Display for Filter<T> {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
Self::Wildcard => write!(f, "*"),
Self::Enumerated(l) if l.len() == 1 => write!(f, "{}", l[0]),
Self::Enumerated(l) if l.len() == 1 => write!(f, "{:?}", l[0]),
Self::Enumerated(l) => {
write!(f, "[")?;
for i in l {
write!(f, "{i},")?;
write!(f, "{i:?},")?;
}
write!(f, "]")
}
@ -276,9 +276,10 @@ fn parse_addr<E: Error>(addr_str: &str) -> Result<H256, E> {
#[cfg(test)]
mod test {
use crate::settings::matching_list::MatchInfo;
use hyperlane_core::{H160, H256};
use crate::settings::matching_list::MatchInfo;
use super::{Filter::*, MatchingList};
#[test]

@ -73,12 +73,12 @@ pub(crate) fn load_settings_object<'de, T: Deserialize<'de>, S: AsRef<str>>(
.source(Some(filtered_env)),
)
.build()?;
let formatted_config = format!("{:#?}", config_deserializer);
let formatted_config = format!("{:#?}", config_deserializer).replace('\n', "\\n");
match serde_path_to_error::deserialize(config_deserializer) {
Ok(cfg) => Ok(cfg),
Err(err) => {
println!(
"Error during deseriaization, showing the config for debugging:\n {}",
"Error during deserialization, showing the config for debugging: {}",
formatted_config
);
let ctx = format!("Invalid config at `{}` {:?}", err.path(), err);

@ -1,15 +1,21 @@
import { ALL_KEY_ROLES } from '../../../src/agents/roles';
import { ALL_KEY_ROLES, KEY_ROLE_ENUM } from '../../../src/agents/roles';
import { AgentConfig } from '../../../src/config';
import {
ConnectionType,
GasPaymentEnforcementPolicyType,
} from '../../../src/config/agent';
import { Contexts } from '../../contexts';
import { helloworldMatchingList } from '../../utils';
import { MainnetChains, chainNames, environment } from './chains';
// import { helloWorld } from './helloworld';
import { helloWorld } from './helloworld';
import { validators } from './validators';
const releaseCandidateHelloworldMatchingList = helloworldMatchingList(
helloWorld,
Contexts.ReleaseCandidate,
);
export const hyperlane: AgentConfig<MainnetChains> = {
environment,
namespace: environment,
@ -67,6 +73,7 @@ export const hyperlane: AgentConfig<MainnetChains> = {
relayer: {
default: {
blacklist: [
...releaseCandidateHelloworldMatchingList,
{
originDomain: '137',
recipientAddress: '0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE',
@ -80,6 +87,37 @@ export const hyperlane: AgentConfig<MainnetChains> = {
rolesWithKeys: ALL_KEY_ROLES,
};
export const releaseCandidate: AgentConfig<MainnetChains> = {
environment,
namespace: environment,
runEnv: environment,
context: Contexts.ReleaseCandidate,
docker: {
repo: 'gcr.io/abacus-labs-dev/hyperlane-agent',
tag: 'sha-0477ee1',
},
aws: {
region: 'us-east-1',
},
environmentChainNames: chainNames,
contextChainNames: chainNames,
validatorSets: validators,
gelato: {
enabledChains: [],
},
connectionType: ConnectionType.HttpQuorum,
relayer: {
default: {
whitelist: releaseCandidateHelloworldMatchingList,
gasPaymentEnforcementPolicy: {
type: GasPaymentEnforcementPolicyType.None,
},
},
},
rolesWithKeys: [KEY_ROLE_ENUM.Relayer, KEY_ROLE_ENUM.Kathy],
};
export const agents = {
[Contexts.Hyperlane]: hyperlane,
[Contexts.ReleaseCandidate]: releaseCandidate,
};

@ -21,6 +21,7 @@ export const keyFunderConfig: KeyFunderConfig = {
contextFundingFrom: Contexts.Hyperlane,
contextsAndRolesToFund: {
[Contexts.Hyperlane]: [KEY_ROLE_ENUM.Relayer, KEY_ROLE_ENUM.Kathy],
[Contexts.ReleaseCandidate]: [KEY_ROLE_ENUM.Relayer, KEY_ROLE_ENUM.Kathy],
},
connectionType: ConnectionType.Http,
};

@ -5,6 +5,7 @@ import { Contexts } from '../../contexts';
import { MainnetChains, environment } from './chains';
import hyperlaneAddresses from './helloworld/hyperlane/addresses.json';
import rcAddresses from './helloworld/rc/addresses.json';
export const hyperlane: HelloWorldConfig<MainnetChains> = {
addresses: hyperlaneAddresses,
@ -28,8 +29,28 @@ export const hyperlane: HelloWorldConfig<MainnetChains> = {
},
};
export const releaseCandidate: HelloWorldConfig<MainnetChains> = {
addresses: rcAddresses,
kathy: {
docker: {
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
tag: 'sha-0477ee1',
},
chainsToSkip: [],
runEnv: environment,
namespace: environment,
runConfig: {
mode: HelloWorldKathyRunMode.CycleOnce,
},
messageSendTimeout: 1000 * 60 * 8, // 8 min
messageReceiptTimeout: 1000 * 60 * 20, // 20 min
connectionType: ConnectionType.Http,
},
};
export const helloWorld: Partial<
Record<Contexts, HelloWorldConfig<MainnetChains>>
> = {
[Contexts.Hyperlane]: hyperlane,
[Contexts.ReleaseCandidate]: releaseCandidate,
};

@ -0,0 +1,29 @@
{
"bsc": {
"router": "0x3f4663873A9aC7Ec683a5Bddc0acbC00091c10D0"
},
"avalanche": {
"router": "0xaC5a4925d8aab7B9fb33F0a1722e3b94b6f87dB4"
},
"polygon": {
"router": "0x3Ee06Da5110117c5B9AD41e2F827B774cBb15CC3"
},
"celo": {
"router": "0x8E10405F4D23060b1a75005EFB99d99D537e0A7f"
},
"arbitrum": {
"router": "0xb44a2B834FFdf762051Ee26Eb41531a4A02fA8d0"
},
"optimism": {
"router": "0xe5F7E241F9bb6A644e88f2ca38fC373196b5392b"
},
"ethereum": {
"router": "0x43ae568363c4FA6897EE9dF0c9ca445d3872c906"
},
"moonbeam": {
"router": "0x1Efd1EdC42ef6cf2612F75e6C599C081d650c513"
},
"gnosis": {
"router": "0x14aBb1f28B06272c57c37723D0e671d1c3326679"
}
}

@ -0,0 +1,74 @@
{
"bsc": [
{
"name": "router",
"address": "0x3f4663873A9aC7Ec683a5Bddc0acbC00091c10D0",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
],
"avalanche": [
{
"name": "router",
"address": "0xaC5a4925d8aab7B9fb33F0a1722e3b94b6f87dB4",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
],
"polygon": [
{
"name": "router",
"address": "0x3Ee06Da5110117c5B9AD41e2F827B774cBb15CC3",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
],
"celo": [
{
"name": "router",
"address": "0x8E10405F4D23060b1a75005EFB99d99D537e0A7f",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
],
"arbitrum": [
{
"name": "router",
"address": "0xb44a2B834FFdf762051Ee26Eb41531a4A02fA8d0",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
],
"optimism": [
{
"name": "router",
"address": "0xe5F7E241F9bb6A644e88f2ca38fC373196b5392b",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
],
"ethereum": [
{
"name": "router",
"address": "0x43ae568363c4FA6897EE9dF0c9ca445d3872c906",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
],
"moonbeam": [
{
"name": "router",
"address": "0x1Efd1EdC42ef6cf2612F75e6C599C081d650c513",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
],
"gnosis": [
{
"name": "router",
"address": "0x14aBb1f28B06272c57c37723D0e671d1c3326679",
"constructorArguments": "00000000000000000000000035231d4c2d8b8adcb5617a638a0c4548684c7c7000000000000000000000000056f52c0a1ddcd557285f7cbc782d3d83096ce1cc",
"isProxy": false
}
]
}

@ -1,23 +1,22 @@
import { chainMetadata } from '@hyperlane-xyz/sdk';
import { ALL_KEY_ROLES } from '../../../src/agents/roles';
import { ALL_KEY_ROLES, KEY_ROLE_ENUM } from '../../../src/agents/roles';
import { AgentConfig } from '../../../src/config';
import {
ConnectionType,
GasPaymentEnforcementPolicyType,
} from '../../../src/config/agent';
import { Contexts } from '../../contexts';
import { helloworldMatchingList } from '../../utils';
import { TestnetChains, chainNames, environment } from './chains';
// import { helloWorld } from './helloworld';
import { helloWorld } from './helloworld';
import { validators } from './validators';
/*
const releaseCandidateHelloworldMatchingList = helloworldMatchingList(
helloWorld,
Contexts.ReleaseCandidate,
);
*/
export const hyperlane: AgentConfig<TestnetChains> = {
environment,
@ -26,7 +25,7 @@ export const hyperlane: AgentConfig<TestnetChains> = {
context: Contexts.Hyperlane,
docker: {
repo: 'gcr.io/abacus-labs-dev/hyperlane-agent',
tag: 'sha-c163fce',
tag: 'sha-0477ee1',
},
aws: {
region: 'us-east-1',
@ -67,6 +66,7 @@ export const hyperlane: AgentConfig<TestnetChains> = {
relayer: {
default: {
blacklist: [
...releaseCandidateHelloworldMatchingList,
{ recipientAddress: '0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE' },
],
gasPaymentEnforcementPolicy: {
@ -77,6 +77,37 @@ export const hyperlane: AgentConfig<TestnetChains> = {
rolesWithKeys: ALL_KEY_ROLES,
};
export const releaseCandidate: AgentConfig<TestnetChains> = {
environment,
namespace: environment,
runEnv: environment,
context: Contexts.ReleaseCandidate,
docker: {
repo: 'gcr.io/abacus-labs-dev/hyperlane-agent',
tag: 'sha-0477ee1',
},
aws: {
region: 'us-east-1',
},
environmentChainNames: chainNames,
contextChainNames: chainNames,
validatorSets: validators,
gelato: {
enabledChains: [],
},
connectionType: ConnectionType.HttpQuorum,
relayer: {
default: {
whitelist: releaseCandidateHelloworldMatchingList,
gasPaymentEnforcementPolicy: {
type: GasPaymentEnforcementPolicyType.None,
},
},
},
rolesWithKeys: [KEY_ROLE_ENUM.Relayer, KEY_ROLE_ENUM.Kathy],
};
export const agents = {
[Contexts.Hyperlane]: hyperlane,
[Contexts.ReleaseCandidate]: releaseCandidate,
};

@ -20,6 +20,7 @@ export const keyFunderConfig: KeyFunderConfig = {
contextFundingFrom: Contexts.Hyperlane,
contextsAndRolesToFund: {
[Contexts.Hyperlane]: [KEY_ROLE_ENUM.Relayer, KEY_ROLE_ENUM.Kathy],
[Contexts.ReleaseCandidate]: [KEY_ROLE_ENUM.Relayer, KEY_ROLE_ENUM.Kathy],
},
connectionType: ConnectionType.Http,
};

@ -5,6 +5,7 @@ import { Contexts } from '../../contexts';
import { TestnetChains, environment } from './chains';
import hyperlaneAddresses from './helloworld/hyperlane/addresses.json';
import rcAddresses from './helloworld/rc/addresses.json';
export const hyperlane: HelloWorldConfig<TestnetChains> = {
addresses: hyperlaneAddresses,
@ -26,8 +27,28 @@ export const hyperlane: HelloWorldConfig<TestnetChains> = {
},
};
export const releaseCandidate: HelloWorldConfig<TestnetChains> = {
addresses: rcAddresses,
kathy: {
docker: {
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
tag: 'sha-0477ee1',
},
chainsToSkip: [],
runEnv: environment,
namespace: environment,
runConfig: {
mode: HelloWorldKathyRunMode.CycleOnce,
},
messageSendTimeout: 1000 * 60 * 8, // 8 min
messageReceiptTimeout: 1000 * 60 * 20, // 20 min
connectionType: ConnectionType.Http,
},
};
export const helloWorld: Partial<
Record<Contexts, HelloWorldConfig<TestnetChains>>
> = {
[Contexts.Hyperlane]: hyperlane,
[Contexts.ReleaseCandidate]: releaseCandidate,
};

@ -0,0 +1,26 @@
{
"alfajores": {
"router": "0x908200F276B36dAa2FAfe0757bB7188F36E85d3E"
},
"fuji": {
"router": "0xc91Fcf115926705737394c4560E8b974f28eaad6"
},
"mumbai": {
"router": "0x5B30cF4a552B32FBF9c15b98f91e863D822f355C"
},
"bsctestnet": {
"router": "0x07453BE646Aab789a4AcE31DB68688263fB48D53"
},
"goerli": {
"router": "0x04E9e0B2EC0bB80F9A914d82435DeE7f10ce7D29"
},
"moonbasealpha": {
"router": "0xa5075B2AcA697944273d67B57a3340a0730632A3"
},
"optimismgoerli": {
"router": "0x793A8E343eBc1498afd644A05507fc2b6B97AfB4"
},
"arbitrumgoerli": {
"router": "0xa1E338311C26a00Eb586133728c3C9B97c67fAe0"
}
}

@ -0,0 +1,66 @@
{
"alfajores": [
{
"name": "router",
"address": "0x908200F276B36dAa2FAfe0757bB7188F36E85d3E",
"constructorArguments": "000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685000000000000000000000000f90cb82a76492614d07b82a7658917f3ac811ac1",
"isProxy": false
}
],
"fuji": [
{
"name": "router",
"address": "0xc91Fcf115926705737394c4560E8b974f28eaad6",
"constructorArguments": "000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685000000000000000000000000f90cb82a76492614d07b82a7658917f3ac811ac1",
"isProxy": false
}
],
"mumbai": [
{
"name": "router",
"address": "0x5B30cF4a552B32FBF9c15b98f91e863D822f355C",
"constructorArguments": "000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685000000000000000000000000f90cb82a76492614d07b82a7658917f3ac811ac1",
"isProxy": false
}
],
"bsctestnet": [
{
"name": "router",
"address": "0x07453BE646Aab789a4AcE31DB68688263fB48D53",
"constructorArguments": "000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685000000000000000000000000f90cb82a76492614d07b82a7658917f3ac811ac1",
"isProxy": false
}
],
"goerli": [
{
"name": "router",
"address": "0x04E9e0B2EC0bB80F9A914d82435DeE7f10ce7D29",
"constructorArguments": "000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685000000000000000000000000f90cb82a76492614d07b82a7658917f3ac811ac1",
"isProxy": false
}
],
"moonbasealpha": [
{
"name": "router",
"address": "0xa5075B2AcA697944273d67B57a3340a0730632A3",
"constructorArguments": "000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685000000000000000000000000f90cb82a76492614d07b82a7658917f3ac811ac1",
"isProxy": false
}
],
"optimismgoerli": [
{
"name": "router",
"address": "0x793A8E343eBc1498afd644A05507fc2b6B97AfB4",
"constructorArguments": "000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685000000000000000000000000f90cb82a76492614d07b82a7658917f3ac811ac1",
"isProxy": false
}
],
"arbitrumgoerli": [
{
"name": "router",
"address": "0xa1E338311C26a00Eb586133728c3C9B97c67fAe0",
"constructorArguments": "000000000000000000000000cc737a94fecaec165abcf12ded095bb13f037685000000000000000000000000f90cb82a76492614d07b82a7658917f3ac811ac1",
"isProxy": false
}
]
}
Loading…
Cancel
Save