Skip to content

Commit cbfb6a6

Browse files
authored
refactor(infra): centralize Docker image/tag configuration (#7705)
1 parent c8c7023 commit cbfb6a6

10 files changed

Lines changed: 101 additions & 49 deletions

File tree

typescript/infra/config/docker.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
export const DockerImageRepos = {
2+
AGENT: 'gcr.io/abacus-labs-dev/hyperlane-agent',
3+
MONOREPO: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
4+
WARP_MONITOR: 'gcr.io/abacus-labs-dev/hyperlane-warp-monitor',
5+
REBALANCER: 'gcr.io/abacus-labs-dev/hyperlane-rebalancer',
6+
} as const;
7+
8+
interface AgentDockerTags {
9+
relayer: string;
10+
relayerRC: string;
11+
validator: string;
12+
validatorRC: string;
13+
scraper: string;
14+
}
15+
16+
interface BaseDockerTags extends AgentDockerTags {
17+
keyFunder: string;
18+
kathy: string;
19+
}
20+
21+
interface MainnetDockerTags extends BaseDockerTags {
22+
checkWarpDeploy: string;
23+
warpMonitor: string;
24+
rebalancer: string;
25+
}
26+
27+
export const mainnetDockerTags: MainnetDockerTags = {
28+
relayer: '28f67ad-20260103-234517',
29+
relayerRC: '28f67ad-20260103-234517',
30+
validator: '28f67ad-20260103-234517',
31+
validatorRC: '28f67ad-20260103-234517',
32+
scraper: '28f67ad-20260103-234517',
33+
keyFunder: 'ff24bc3-20260104-175430',
34+
kathy: '8da6852-20251215-172511',
35+
checkWarpDeploy: '8da6852-20251215-172511',
36+
warpMonitor: 'eda7b03-20251230-135200',
37+
rebalancer: 'be84fc0-20251229-194426',
38+
};
39+
40+
export const testnetDockerTags: BaseDockerTags = {
41+
relayer: 'cd94774-20251217-100437',
42+
relayerRC: 'cd94774-20251217-100437',
43+
validator: 'cd94774-20251217-100437',
44+
validatorRC: 'cd94774-20251217-100437',
45+
scraper: 'f50feaa-20251219-084739',
46+
keyFunder: '8da6852-20251215-172511',
47+
kathy: '8da6852-20251215-172511',
48+
};

typescript/infra/config/environments/mainnet3/agent.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
import { BaseScraperConfig } from '../../../src/config/agent/scraper.js';
3838
import { ALL_KEY_ROLES, Role } from '../../../src/roles.js';
3939
import { Contexts } from '../../contexts.js';
40+
import { DockerImageRepos, mainnetDockerTags } from '../../docker.js';
4041
import { getDomainId, getWarpAddresses } from '../../registry.js';
4142

4243
import { environment, ethereumChainNames } from './chains.js';
@@ -58,8 +59,6 @@ import { WarpRouteIds } from './warp/warpIds.js';
5859
// helloWorld[Contexts.ReleaseCandidate].addresses,
5960
// );
6061

61-
const repo = 'gcr.io/abacus-labs-dev/hyperlane-agent';
62-
6362
// The chains here must be consistent with the environment's supportedChainNames, which is
6463
// checked / enforced at runtime & in the CI pipeline.
6564
//
@@ -894,8 +893,8 @@ const hyperlane: RootAgentConfig = {
894893
relayer: {
895894
rpcConsensusType: RpcConsensusType.Fallback,
896895
docker: {
897-
repo,
898-
tag: '28f67ad-20260103-234517',
896+
repo: DockerImageRepos.AGENT,
897+
tag: mainnetDockerTags.relayer,
899898
},
900899
blacklist,
901900
gasPaymentEnforcement: gasPaymentEnforcement,
@@ -914,8 +913,8 @@ const hyperlane: RootAgentConfig = {
914913
},
915914
validators: {
916915
docker: {
917-
repo,
918-
tag: '28f67ad-20260103-234517',
916+
repo: DockerImageRepos.AGENT,
917+
tag: mainnetDockerTags.validator,
919918
},
920919
rpcConsensusType: RpcConsensusType.Quorum,
921920
chains: validatorChainConfig(Contexts.Hyperlane),
@@ -925,8 +924,8 @@ const hyperlane: RootAgentConfig = {
925924
scraperOnlyChains,
926925
rpcConsensusType: RpcConsensusType.Fallback,
927926
docker: {
928-
repo,
929-
tag: '28f67ad-20260103-234517',
927+
repo: DockerImageRepos.AGENT,
928+
tag: mainnetDockerTags.scraper,
930929
},
931930
resources: scraperResources,
932931
},
@@ -940,8 +939,8 @@ const releaseCandidate: RootAgentConfig = {
940939
relayer: {
941940
rpcConsensusType: RpcConsensusType.Fallback,
942941
docker: {
943-
repo,
944-
tag: '28f67ad-20260103-234517',
942+
repo: DockerImageRepos.AGENT,
943+
tag: mainnetDockerTags.relayerRC,
945944
},
946945
blacklist,
947946
// We're temporarily (ab)using the RC relayer as a way to increase
@@ -963,8 +962,8 @@ const releaseCandidate: RootAgentConfig = {
963962
},
964963
validators: {
965964
docker: {
966-
repo,
967-
tag: '28f67ad-20260103-234517',
965+
repo: DockerImageRepos.AGENT,
966+
tag: mainnetDockerTags.validatorRC,
968967
},
969968
rpcConsensusType: RpcConsensusType.Quorum,
970969
chains: validatorChainConfig(Contexts.ReleaseCandidate),
@@ -984,8 +983,8 @@ const neutron: RootAgentConfig = {
984983
relayer: {
985984
rpcConsensusType: RpcConsensusType.Fallback,
986985
docker: {
987-
repo,
988-
tag: 'cd94774-20251217-100437',
986+
repo: DockerImageRepos.AGENT,
987+
tag: mainnetDockerTags.relayerRC,
989988
},
990989
blacklist,
991990
gasPaymentEnforcement,

typescript/infra/config/environments/mainnet3/funding.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { objMap } from '@hyperlane-xyz/utils';
33
import { KeyFunderConfig } from '../../../src/config/funding.js';
44
import { Role } from '../../../src/roles.js';
55
import { Contexts } from '../../contexts.js';
6+
import { DockerImageRepos, mainnetDockerTags } from '../../docker.js';
67

78
import desiredRebalancerBalances from './balances/desiredRebalancerBalances.json' with { type: 'json' };
89
import desiredRelayerBalances from './balances/desiredRelayerBalances.json' with { type: 'json' };
@@ -35,8 +36,8 @@ export const keyFunderConfig: KeyFunderConfig<
3536
typeof mainnet3SupportedChainNames
3637
> = {
3738
docker: {
38-
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
39-
tag: 'ff24bc3-20260104-175430',
39+
repo: DockerImageRepos.MONOREPO,
40+
tag: mainnetDockerTags.keyFunder,
4041
},
4142
// We're currently using the same deployer/key funder key as mainnet2.
4243
// To minimize nonce clobbering we offset the key funder cron

typescript/infra/config/environments/mainnet3/helloworld.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
HelloWorldKathyRunMode,
44
} from '../../../src/config/helloworld/types.js';
55
import { Contexts } from '../../contexts.js';
6+
import { DockerImageRepos, mainnetDockerTags } from '../../docker.js';
67

78
import { environment } from './chains.js';
89
import hyperlaneAddresses from './helloworld/hyperlane/addresses.json' with { type: 'json' };
@@ -12,8 +13,8 @@ export const hyperlane: HelloWorldConfig = {
1213
addresses: hyperlaneAddresses,
1314
kathy: {
1415
docker: {
15-
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
16-
tag: '8da6852-20251215-172511',
16+
repo: DockerImageRepos.MONOREPO,
17+
tag: mainnetDockerTags.kathy,
1718
},
1819
chainsToSkip: [],
1920
runEnv: environment,
@@ -32,8 +33,8 @@ export const releaseCandidate: HelloWorldConfig = {
3233
addresses: rcAddresses,
3334
kathy: {
3435
docker: {
35-
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
36-
tag: '8da6852-20251215-172511',
36+
repo: DockerImageRepos.MONOREPO,
37+
tag: mainnetDockerTags.kathy,
3738
},
3839
chainsToSkip: [],
3940
runEnv: environment,

typescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { CheckWarpDeployConfig } from '../../../../src/config/funding.js';
2+
import { DockerImageRepos, mainnetDockerTags } from '../../../docker.js';
23
import { environment } from '../chains.js';
34

45
export const checkWarpDeployConfig: CheckWarpDeployConfig = {
56
docker: {
6-
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
7-
tag: '8da6852-20251215-172511',
7+
repo: DockerImageRepos.MONOREPO,
8+
tag: mainnetDockerTags.checkWarpDeploy,
89
},
910
namespace: environment,
1011
cronSchedule: '0 15 * * *', // set to 3pm utc every day

typescript/infra/config/environments/testnet4/agent.ts

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
} from '../../../src/config/agent/relayer.js';
2222
import { ALL_KEY_ROLES, Role } from '../../../src/roles.js';
2323
import { Contexts } from '../../contexts.js';
24+
import { DockerImageRepos, testnetDockerTags } from '../../docker.js';
2425
import { getDomainId } from '../../registry.js';
2526

2627
import { environment, ethereumChainNames } from './chains.js';
@@ -35,8 +36,6 @@ const releaseCandidateHelloworldMatchingList = routerMatchingList(
3536
helloWorld[Contexts.ReleaseCandidate].addresses,
3637
);
3738

38-
const repo = 'gcr.io/abacus-labs-dev/hyperlane-agent';
39-
4039
// The chains here must be consistent with the environment's supportedChainNames, which is
4140
// checked / enforced at runtime & in the CI pipeline.
4241
//
@@ -345,8 +344,8 @@ const hyperlane: RootAgentConfig = {
345344
relayer: {
346345
rpcConsensusType: RpcConsensusType.Fallback,
347346
docker: {
348-
repo,
349-
tag: 'cd94774-20251217-100437',
347+
repo: DockerImageRepos.AGENT,
348+
tag: testnetDockerTags.relayer,
350349
},
351350
blacklist: [...releaseCandidateHelloworldMatchingList, ...relayBlacklist],
352351
gasPaymentEnforcement,
@@ -366,17 +365,17 @@ const hyperlane: RootAgentConfig = {
366365
validators: {
367366
rpcConsensusType: RpcConsensusType.Fallback,
368367
docker: {
369-
repo,
370-
tag: 'cd94774-20251217-100437',
368+
repo: DockerImageRepos.AGENT,
369+
tag: testnetDockerTags.validator,
371370
},
372371
chains: validatorChainConfig(Contexts.Hyperlane),
373372
resources: validatorResources,
374373
},
375374
scraper: {
376375
rpcConsensusType: RpcConsensusType.Fallback,
377376
docker: {
378-
repo,
379-
tag: 'f50feaa-20251219-084739',
377+
repo: DockerImageRepos.AGENT,
378+
tag: testnetDockerTags.scraper,
380379
},
381380
resources: scraperResources,
382381
},
@@ -390,8 +389,8 @@ const releaseCandidate: RootAgentConfig = {
390389
relayer: {
391390
rpcConsensusType: RpcConsensusType.Fallback,
392391
docker: {
393-
repo,
394-
tag: 'cd94774-20251217-100437',
392+
repo: DockerImageRepos.AGENT,
393+
tag: testnetDockerTags.relayerRC,
395394
},
396395
blacklist: relayBlacklist,
397396
gasPaymentEnforcement,
@@ -411,8 +410,8 @@ const releaseCandidate: RootAgentConfig = {
411410
validators: {
412411
rpcConsensusType: RpcConsensusType.Fallback,
413412
docker: {
414-
repo,
415-
tag: 'cd94774-20251217-100437',
413+
repo: DockerImageRepos.AGENT,
414+
tag: testnetDockerTags.validatorRC,
416415
},
417416
chains: validatorChainConfig(Contexts.ReleaseCandidate),
418417
resources: validatorResources,
@@ -438,8 +437,8 @@ const neutron: RootAgentConfig = {
438437
relayer: {
439438
rpcConsensusType: RpcConsensusType.Fallback,
440439
docker: {
441-
repo,
442-
tag: 'cd94774-20251217-100437',
440+
repo: DockerImageRepos.AGENT,
441+
tag: testnetDockerTags.relayerRC,
443442
},
444443
blacklist: relayBlacklist,
445444
gasPaymentEnforcement,
@@ -459,8 +458,8 @@ const neutron: RootAgentConfig = {
459458
validators: {
460459
rpcConsensusType: RpcConsensusType.Fallback,
461460
docker: {
462-
repo,
463-
tag: 'cd94774-20251217-100437',
461+
repo: DockerImageRepos.AGENT,
462+
tag: testnetDockerTags.validatorRC,
464463
},
465464
chains: validatorChainConfig(Contexts.ReleaseCandidate),
466465
resources: validatorResources,

typescript/infra/config/environments/testnet4/funding.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { KeyFunderConfig } from '../../../src/config/funding.js';
22
import { Role } from '../../../src/roles.js';
33
import { Contexts } from '../../contexts.js';
4+
import { DockerImageRepos, testnetDockerTags } from '../../docker.js';
45

56
import { environment } from './chains.js';
67
import { testnet4SupportedChainNames } from './supportedChainNames.js';
@@ -9,8 +10,8 @@ export const keyFunderConfig: KeyFunderConfig<
910
typeof testnet4SupportedChainNames
1011
> = {
1112
docker: {
12-
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
13-
tag: '8da6852-20251215-172511',
13+
repo: DockerImageRepos.MONOREPO,
14+
tag: testnetDockerTags.keyFunder,
1415
},
1516
// We're currently using the same deployer key as testnet2.
1617
// To minimize nonce clobbering we offset the key funder cron

typescript/infra/config/environments/testnet4/helloworld.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
HelloWorldKathyRunMode,
44
} from '../../../src/config/helloworld/types.js';
55
import { Contexts } from '../../contexts.js';
6+
import { DockerImageRepos, testnetDockerTags } from '../../docker.js';
67

78
import { environment } from './chains.js';
89
import hyperlaneAddresses from './helloworld/hyperlane/addresses.json' with { type: 'json' };
@@ -12,8 +13,8 @@ export const hyperlaneHelloworld: HelloWorldConfig = {
1213
addresses: hyperlaneAddresses,
1314
kathy: {
1415
docker: {
15-
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
16-
tag: '8da6852-20251215-172511',
16+
repo: DockerImageRepos.MONOREPO,
17+
tag: testnetDockerTags.kathy,
1718
},
1819
chainsToSkip: [],
1920
runEnv: environment,
@@ -31,8 +32,8 @@ export const releaseCandidateHelloworld: HelloWorldConfig = {
3132
addresses: rcAddresses,
3233
kathy: {
3334
docker: {
34-
repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
35-
tag: '8da6852-20251215-172511',
35+
repo: DockerImageRepos.MONOREPO,
36+
tag: testnetDockerTags.kathy,
3637
},
3738
chainsToSkip: [],
3839
runEnv: environment,

typescript/infra/src/rebalancer/helm.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { DEFAULT_GITHUB_REGISTRY } from '@hyperlane-xyz/registry';
1010
import { isObjEmpty } from '@hyperlane-xyz/utils';
1111
import { readYaml } from '@hyperlane-xyz/utils/fs';
1212

13+
import { DockerImageRepos, mainnetDockerTags } from '../../config/docker.js';
1314
import { getWarpCoreConfig } from '../../config/registry.js';
1415
import { DeployEnvironment } from '../config/environment.js';
1516
import { WARP_ROUTE_MONITOR_HELM_RELEASE_PREFIX } from '../utils/consts.js';
@@ -83,13 +84,12 @@ export class RebalancerHelmManager extends HelmManager {
8384
}
8485

8586
async helmValues() {
86-
// Build registry URI with commit embedded in /tree/{commit} format
8787
const registryUri = `${DEFAULT_GITHUB_REGISTRY}/tree/${this.registryCommit}`;
8888

8989
return {
9090
image: {
91-
repository: 'gcr.io/abacus-labs-dev/hyperlane-rebalancer',
92-
tag: 'be84fc0-20251229-194426',
91+
repository: DockerImageRepos.REBALANCER,
92+
tag: mainnetDockerTags.rebalancer,
9393
},
9494
withMetrics: this.withMetrics,
9595
fullnameOverride: this.helmReleaseName,

typescript/infra/src/warp/helm.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
} from '@hyperlane-xyz/sdk';
1313
import { difference, rootLogger } from '@hyperlane-xyz/utils';
1414

15+
import { DockerImageRepos, mainnetDockerTags } from '../../config/docker.js';
1516
import {
1617
DEFAULT_REGISTRY_URI,
1718
getRegistry,
@@ -101,8 +102,8 @@ export class WarpRouteMonitorHelmManager extends HelmManager {
101102
async helmValues() {
102103
return {
103104
image: {
104-
repository: 'gcr.io/abacus-labs-dev/hyperlane-warp-monitor',
105-
tag: 'eda7b03-20251230-135200',
105+
repository: DockerImageRepos.WARP_MONITOR,
106+
tag: mainnetDockerTags.warpMonitor,
106107
},
107108
warpRouteId: this.warpRouteId,
108109
fullnameOverride: this.helmReleaseName,

0 commit comments

Comments
 (0)