🌳
pt0/deployF/ethF/doSyncRethAI.mts
2import { jwtPath } from './jwtPathF.mts'
8export const doSyncReth = async ({
9 ethNetwork, sizeGb, rethNodePort: nodePort,
10 rethV, full = true
11}: {ethNetwork: string, sizeGb: number, rethNodePort: number, rethV: string, full?: boolean}) => {
12 const {cluster_name} = getKlusterCtx()
13 const action = getAction()
14 const name = `reth-${ethNetwork}`
16 const args = [
17 'node',
18 `--chain=${ethNetwork}`,
19 '--datadir=/data',
20 `--port=${nodePort}`,
21 `--discovery.port=${nodePort}`,
22 '--http',
23 '--http.addr=0.0.0.0',
24 '--http.port=8545',
25 '--http.api=eth,net,web3,txpool,trace',
26 '--http.corsdomain=*',
27 '--authrpc.addr=0.0.0.0',
28 '--authrpc.port=8551',
29 `--authrpc.jwtsecret=${jwtPath}`,
30 ]
31 if (full) args.push('--full')
33 const {volumeMounts, volumes} = getEth2VolMounts({name, ethNetwork})
35 let resources = [
37 name,
38 strategy: {
39 type: "Recreate"
40 },
41 containers: [
42 {
43 name,
44 args,
45 image: `ghcr.io/paradigmxyz/reth:${rethV}`,
46 volumeMounts
47 }
48 ],
49 volumes
50 }),
51 ...await getExCliResources({action, name, sizeGb, nodePort})
52 ]
53 await guardOnlyRecreateDeploymentsResourcesAction({resources, action, cluster_name})