🌳
pt0/deployF/ethF/ethClientTypesAI.mts
1// Eth client type definitions for status monitoring
2// Ports are the REST/RPC API ports used for status checks
4export const execClientPorts = {
5 geth: 8545,
6 reth: 8545,
7 nether: 8545,
8}
10export const consClientPorts = {
11 teku: 5051,
12 nimbus: 5052,
13 prysm: 3500,
14 maru: 8080,
17const consClientPodPrefix: Partial<Record<keyof typeof consClientPorts, string>> = {
18 prysm: 'beacon-prysm',
21import path from 'path'
22import { fileURLToPath } from 'url'
25export const mkEthStatusCfg = ({cluster_name, ethNetwork, execClientType, consClientType, importMetaUrl}: {
26 cluster_name: string, ethNetwork: string, execClientType: keyof typeof execClientPorts,
27 consClientType: keyof typeof consClientPorts, importMetaUrl?: string,
28}) => {
29 const epFilePath = importMetaUrl ? fileURLToPath(importMetaUrl) : null
30 const epPath = epFilePath ? path.relative(ptDir, epFilePath) : null
31 return {
32 cluster_name,
33 epPath,
34 epFilePath,
35 execClient: {
36 fuzzyPodName: `${execClientType}-${ethNetwork}`,
37 portNo: execClientPorts[execClientType],
38 },
39 consClient: {
40 fuzzyPodName: `${consClientPodPrefix[consClientType] ?? consClientType}-${ethNetwork}`,
41 portNo: consClientPorts[consClientType],
42 },
43 }