Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra for neutron & neutrontestnet #2869

Merged
merged 41 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9041183
Add neutron testnet
tkporter Oct 25, 2023
4d0bc14
Remove unnecessary reorgPeriod setting from infra for the Validator, …
tkporter Oct 26, 2023
9c8382d
It aint pretty but it probably works
tkporter Oct 26, 2023
9962e05
Add new neutron context
tkporter Oct 27, 2023
34c00df
Add neutron context
tkporter Oct 27, 2023
d166639
Update external secrets prefixes
tkporter Oct 27, 2023
7032820
new image
tkporter Oct 27, 2023
ab2fbf1
Add neutron and manta
tkporter Oct 28, 2023
8b27f68
wip
tkporter Oct 28, 2023
7071213
Update neutron validators
nambrot Oct 29, 2023
794c7d4
Deploy to mantapacific
nambrot Oct 29, 2023
921fa32
Add Neutron config
nambrot Oct 29, 2023
d754236
PR comments
tkporter Oct 29, 2023
6fec2b0
Try deploy
tkporter Oct 29, 2023
8c8a802
Deploy
tkporter Oct 29, 2023
5f85a75
More PR comments
tkporter Oct 30, 2023
8056b46
Fix gnosis from block
tkporter Oct 30, 2023
844aaa9
Update new images
tkporter Oct 30, 2023
20598bb
Touchups
tkporter Oct 30, 2023
451d874
Cleanup
tkporter Oct 30, 2023
711cb8d
Cleanin
tkporter Oct 30, 2023
e2e6e5d
new images
tkporter Oct 30, 2023
29e5035
Update image
tkporter Oct 31, 2023
4aff474
Don't charge neutron -> mantapacific
tkporter Oct 31, 2023
b38abd4
new image
tkporter Nov 1, 2023
8c42715
Roll out reorg period change
tkporter Nov 2, 2023
2a3c181
Deploy sequenced merkle tree indexing
tkporter Nov 3, 2023
c2915df
Relayer arbitrum
nambrot Nov 3, 2023
419d038
New image with null deser fix
tkporter Nov 8, 2023
8c0b059
testnet too
tkporter Nov 8, 2023
51a1722
Kunal's lower gas fix
tkporter Nov 9, 2023
1b1b9a0
Typescript compiles
tkporter Nov 9, 2023
6d9c312
I lied, now typescript builds
tkporter Nov 9, 2023
7ca99aa
nits
tkporter Nov 9, 2023
66233f7
Rm skipping certain validator deploys
tkporter Nov 10, 2023
19e6e11
Merge branch 'v3' into trevor/add-neutron
nambrot Nov 13, 2023
8b190cf
Add Manta validators to check with verify-validators (#2917)
nambrot Nov 14, 2023
82e2bd7
Merge branch 'main' of github.com:abacus-network/abacus-monorepo into…
tkporter Nov 28, 2023
e61ee63
refine signer type
tkporter Nov 28, 2023
2c05b16
Merge branch 'main' of github.com:abacus-network/abacus-monorepo into…
tkporter Nov 28, 2023
f155e53
add test
tkporter Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions rust/helm/hyperlane-agent/templates/external-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,25 @@ spec:
{{- range .Values.hyperlane.chains }}
{{- if not .disabled }}
HYP_CHAINS_{{ .name | upper }}_CUSTOMRPCURLS: {{ printf "'{{ .%s_rpcs | mustFromJson | join \",\" }}'" .name }}
{{- if eq .protocol "cosmos" }}
HYP_CHAINS_{{ .name | upper }}_GRPCURL: {{ printf "'{{ .%s_grpc }}'" .name }}
{{- end }}
{{- end }}
{{- end }}
data:
{{- /*
* For each network, load the secret in GCP secret manager with the form: environment-rpc-endpoint-network,
* and associate it with the secret key networkname_rpc.
* For each network, load the secret in GCP secret manager with the form: environment-rpc-endpoints-network,
* and associate it with the secret key networkname_rpcs.
*/}}
{{- range .Values.hyperlane.chains }}
{{- if not .disabled }}
- secretKey: {{ printf "%s_rpcs" .name }}
remoteRef:
key: {{ printf "%s-rpc-endpoints-%s" $.Values.hyperlane.runEnv .name }}
{{- if eq .protocol "cosmos" }}
- secretKey: {{ printf "%s_grpc" .name }}
remoteRef:
key: {{ printf "%s-grpc-endpoint-%s" $.Values.hyperlane.runEnv .name }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,23 @@ spec:
{{- include "agent-common.labels" . | nindent 10 }}
data:
{{- range .Values.hyperlane.relayerChains }}
{{- if eq .signer.type "hexKey" }}
{{- if or (eq .signer.type "hexKey") (eq .signer.type "cosmosKey") }}
HYP_CHAINS_{{ .name | upper }}_SIGNER_KEY: {{ printf "'{{ .%s_signer_key | toString }}'" .name }}
{{- include "agent-common.config-env-vars" (dict "config" .signer "format" "config_map" "key_name_prefix" (printf "CHAINS_%s_SIGNER_" (.name | upper))) | nindent 8 }}
{{- end }}
{{- if and (eq .signer.type "aws") $.Values.hyperlane.relayer.aws }}
HYP_CHAINS_{{ .name | upper }}_SIGNER_TYPE: aws
HYP_CHAINS_{{ .name | upper }}_SIGNER_ID: {{ .signer.id }}
HYP_CHAINS_{{ .name | upper }}_SIGNER_REGION: {{ .signer.region}}
{{- end }}
{{- end }}
{{- if .Values.hyperlane.relayer.aws }}
AWS_ACCESS_KEY_ID: {{ print "'{{ .aws_access_key_id | toString }}'" }}
AWS_SECRET_ACCESS_KEY: {{ print "'{{ .aws_secret_access_key | toString }}'" }}
{{- end }}
{{- end }}
data:
{{- range .Values.hyperlane.relayerChains }}
{{- if eq .signer.type "hexKey" }}
{{- if or (eq .signer.type "hexKey") (eq .signer.type "cosmosKey") }}
- secretKey: {{ printf "%s_signer_key" .name }}
remoteRef:
{{- if $.Values.hyperlane.relayer.usingDefaultSignerKey }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
data:
{{- range $index, $config := .Values.hyperlane.validator.configs }}
validator-{{ $index }}.env: |
{{- include "agent-common.config-env-vars" (dict "config" $config "format" "dot_env") | nindent 4 }}
{{- include "agent-common.config-env-vars" (dict "config" (get $config "chainSigner") "format" "dot_env" "key_name_prefix" (printf "CHAINS_%s_SIGNER_" ($config.originChainName | upper))) | nindent 4 }}
{{- include "agent-common.config-env-vars" (dict "config" (omit $config "chainSigner") "format" "dot_env") | nindent 4 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ spec:
validator-{{ $index }}.env: |
{{- if eq .validator.type "hexKey" }}
HYP_VALIDATOR_KEY={{ printf "'{{ .signer_key_%d | toString }}'" $index }}
HYP_CHAINS_{{ .originChainName | upper }}_SIGNER_KEY={{ printf "'{{ .signer_key_%d | toString }}'" $index }}
{{- end }}
{{- if or (eq .checkpointSyncer.type "s3") $.Values.hyperlane.aws }}
AWS_ACCESS_KEY_ID={{ printf "'{{ .aws_access_key_id_%d | toString }}'" $index }}
AWS_SECRET_ACCESS_KEY={{ printf "'{{ .aws_secret_access_key_%d | toString }}'" $index }}
{{- end }}

{{- if or (eq .chainSigner.type "hexKey") (eq .chainSigner.type "cosmosKey") }}
HYP_CHAINS_{{ .originChainName | upper }}_SIGNER_KEY={{ printf "'{{ .signer_key_%d | toString }}'" $index }}
{{- end }}
{{ $index = add1 $index }}
{{- end }}
data:
{{ $index = 0 }}
{{- range .Values.hyperlane.validator.configs }}
{{- if eq .validator.type "hexKey" }}
{{- if or (eq .validator.type "hexKey") (eq .chainSigner.type "hexKey") (eq .chainSigner.type "cosmosKey") }}
- secretKey: signer_key_{{ $index }}
remoteRef:
key: {{ printf "%s-%s-key-%s-validator-%d" $.Values.hyperlane.context $.Values.hyperlane.runEnv .originChainName $index }}
Expand Down
1 change: 1 addition & 0 deletions typescript/infra/config/contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
export enum Contexts {
Hyperlane = 'hyperlane',
ReleaseCandidate = 'rc',
Neutron = 'neutron',
}
52 changes: 52 additions & 0 deletions typescript/infra/config/environments/mainnet3/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
GasPaymentEnforcementPolicyType,
RpcConsensusType,
chainMetadata,
getDomainId,
} from '@hyperlane-xyz/sdk';

import { RootAgentConfig, allAgentChainNames } from '../../../src/config';
Expand Down Expand Up @@ -51,6 +52,14 @@ const hyperlane: RootAgentConfig = {
repo,
tag: '1bee32a-20231121-121303',
},
chainDockerOverrides: {
[chainMetadata.neutron.name]: {
tag: '5070398-20231108-172634',
},
[chainMetadata.mantapacific.name]: {
tag: '5070398-20231108-172634',
},
},
rpcConsensusType: RpcConsensusType.Quorum,
chains: validatorChainConfig(Contexts.Hyperlane),
},
Expand Down Expand Up @@ -90,7 +99,50 @@ const releaseCandidate: RootAgentConfig = {
},
};

const neutron: RootAgentConfig = {
...contextBase,
contextChainNames: {
validator: [],
relayer: [
chainMetadata.neutron.name,
chainMetadata.mantapacific.name,
chainMetadata.arbitrum.name,
],
scraper: [],
},
context: Contexts.Neutron,
rolesWithKeys: [Role.Relayer],
relayer: {
rpcConsensusType: RpcConsensusType.Fallback,
docker: {
repo,
tag: '68bad33-20231109-024958',
},
gasPaymentEnforcement: [
{
type: GasPaymentEnforcementPolicyType.None,
matchingList: [
{
originDomain: getDomainId(chainMetadata.neutron),
destinationDomain: getDomainId(chainMetadata.mantapacific),
senderAddress: '*',
recipientAddress: '*',
},
{
originDomain: getDomainId(chainMetadata.neutron),
destinationDomain: getDomainId(chainMetadata.arbitrum),
senderAddress: '*',
recipientAddress: '*',
},
],
},
...gasPaymentEnforcement,
],
},
};

export const agents = {
[Contexts.Hyperlane]: hyperlane,
[Contexts.ReleaseCandidate]: releaseCandidate,
[Contexts.Neutron]: neutron,
};
25 changes: 11 additions & 14 deletions typescript/infra/config/environments/mainnet3/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ export const ethereumMainnetConfigs: ChainMap<ChainMetadata> = {
},
moonbeam: chainMetadata.moonbeam,
gnosis: chainMetadata.gnosis,
mantapacific: chainMetadata.mantapacific,
};

// Blessed non-Ethereum chains.
// export const nonEthereumMainnetConfigs: ChainMap<ChainMetadata> = {
// solana: chainMetadata.solana,
// };
export const nonEthereumMainnetConfigs: ChainMap<ChainMetadata> = {
// solana: chainMetadata.solana,
neutron: chainMetadata.neutron,
};

export const mainnetConfigs: ChainMap<ChainMetadata> = {
...ethereumMainnetConfigs,
// ...nonEthereumMainnetConfigs,
...nonEthereumMainnetConfigs,
};

export type MainnetChains = keyof typeof mainnetConfigs;
Expand All @@ -63,16 +65,11 @@ export const ethereumChainNames = Object.keys(
ethereumMainnetConfigs,
) as MainnetChains[];

const validatorChainNames = [
...supportedChainNames,
// chainMetadata.solana.name,
// chainMetadata.nautilus.name,
];

const relayerChainNames = validatorChainNames;

// Hyperlane & RC context agent chain names.
export const agentChainNames: AgentChainNames = {
[Role.Validator]: validatorChainNames,
[Role.Relayer]: relayerChainNames,
// Run validators for all chains.
[Role.Validator]: supportedChainNames,
// Only run relayers for Ethereum chains at the moment.
[Role.Relayer]: ethereumChainNames,
[Role.Scraper]: ethereumChainNames,
};
Original file line number Diff line number Diff line change
Expand Up @@ -1288,5 +1288,85 @@
"constructorArguments": "0000000000000000000000005d934f4e2f797775e53561bb72aca21ba36b96bb",
"isProxy": false
}
],
"mantapacific": [
{
"name": "ProxyAdmin",
"address": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7",
"constructorArguments": "",
"isProxy": false
},
{
"name": "Mailbox",
"address": "0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D",
"constructorArguments": "00000000000000000000000000000000000000000000000000000000000000a9",
"isProxy": false
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E",
"constructorArguments": "000000000000000000000000ea87ae93fa0019a82a727bfd3ebd1cfca8f64f1d0000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "MerkleTreeHook",
"address": "0x149db7afD694722747035d5AEC7007ccb6F8f112",
"constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e",
"isProxy": false
},
{
"name": "StorageGasOracle",
"address": "0x19dc38aeae620380430C200a6E990D5Af5480117",
"constructorArguments": "",
"isProxy": false
},
{
"name": "InterchainGasPaymaster",
"address": "0xBF12ef4B9f307463D3FB59c3604F294dDCe287E2",
"constructorArguments": "",
"isProxy": false
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x0D63128D887159d63De29497dfa45AFc7C699AE4",
"constructorArguments": "000000000000000000000000bf12ef4b9f307463d3fb59c3604f294ddce287e20000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044485cc955000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "MerkleTreeHook",
"address": "0x149db7afD694722747035d5AEC7007ccb6F8f112",
"constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e",
"isProxy": false
},
{
"name": "StorageGasOracle",
"address": "0x19dc38aeae620380430C200a6E990D5Af5480117",
"constructorArguments": "",
"isProxy": false
},
{
"name": "InterchainGasPaymaster",
"address": "0xBF12ef4B9f307463D3FB59c3604F294dDCe287E2",
"constructorArguments": "",
"isProxy": false
},
{
"name": "TransparentUpgradeableProxy",
"address": "0x0D63128D887159d63De29497dfa45AFc7C699AE4",
"constructorArguments": "000000000000000000000000bf12ef4b9f307463d3fb59c3604f294ddce287e20000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044485cc955000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000",
"isProxy": true
},
{
"name": "ProtocolFee",
"address": "0xd83A4F747fE80Ed98839e05079B1B7Fe037b1638",
"constructorArguments": "000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba",
"isProxy": false
},
{
"name": "ValidatorAnnounce",
"address": "0x2fa5F5C96419C222cDbCeC797D696e6cE428A7A9",
"constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e",
"isProxy": false
}
]
}
9 changes: 9 additions & 0 deletions typescript/infra/config/environments/mainnet3/gas-oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const gasPrices: ChainMap<BigNumber> = {
base: ethers.utils.parseUnits('1', 'gwei'),
scroll: ethers.utils.parseUnits('1', 'gwei'),
polygonzkevm: ethers.utils.parseUnits('2', 'gwei'),
neutron: ethers.utils.parseUnits('1', 'gwei'),
mantapacific: ethers.utils.parseUnits('1', 'gwei'),
};

// Accurate from coingecko as of Mar 9, 2023.
Expand Down Expand Up @@ -83,6 +85,13 @@ const tokenUsdPrices: ChainMap<BigNumber> = {
'1619.00',
TOKEN_EXCHANGE_RATE_DECIMALS,
),
// https://www.coingecko.com/en/coins/neutron
neutron: ethers.utils.parseUnits('0.304396', TOKEN_EXCHANGE_RATE_DECIMALS),
// https://www.coingecko.com/en/coins/ethereum
mantapacific: ethers.utils.parseUnits(
'1619.00',
TOKEN_EXCHANGE_RATE_DECIMALS,
),
};

// Gets the exchange rate of the remote quoted in local tokens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const infrastructure: InfrastructureConfig = {
'mainnet2-',
'hyperlane-mainnet3-',
'rc-mainnet3-',
'neutron-mainnet3-',
'mainnet3-',
],
},
Expand Down
1 change: 1 addition & 0 deletions typescript/infra/config/environments/mainnet3/owners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const safes: ChainMap<Address> = {
base: '',
scroll: '',
polygonzkevm: '',
mantapacific: '',
};

// export const owners = safes;
Expand Down
Loading
Loading