-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathethrex.py
More file actions
55 lines (52 loc) · 1.67 KB
/
ethrex.py
File metadata and controls
55 lines (52 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from expb.clients.client_config import (
CLIENT_ENGINE_PORT,
CLIENT_METRICS_PORT,
CLIENT_P2P_PORT,
CLIENT_RPC_PORT,
CLIENT_RPC_WS_PORT,
CLIENTS_DATA_DIR,
CLIENTS_JWT_SECRET_FILE,
ClientConfig,
)
from expb.configs.networks import Network
class EthrexConfig(ClientConfig):
def __init__(self):
super().__init__(
name="ethrex",
default_image="ghcr.io/lambdaclass/ethrex:main",
default_command=[
"--syncmode=full",
f"--datadir={CLIENTS_DATA_DIR}",
f"--p2p.port={CLIENT_P2P_PORT}",
f"--discovery.port={CLIENT_P2P_PORT}",
"--http.addr=0.0.0.0",
f"--http.port={CLIENT_RPC_PORT}",
"--ws.enabled",
"--ws.addr=0.0.0.0",
f"--ws.port={CLIENT_RPC_WS_PORT}",
"--authrpc.addr=0.0.0.0",
f"--authrpc.port={CLIENT_ENGINE_PORT}",
f"--authrpc.jwtsecret={CLIENTS_JWT_SECRET_FILE}",
"--metrics",
"--metrics.addr=0.0.0.0",
f"--metrics.port={CLIENT_METRICS_PORT}",
# Disable peering
"--p2p.disabled",
],
prometheus_metrics_path="/metrics",
default_env={},
)
def get_command(
self,
instance: str,
network: Network,
extra_flags: list[str] = [],
) -> list[str]:
command = []
if network == Network.MAINNET:
command.extend(
[
"--network=mainnet",
]
)
return self.default_command + command + extra_flags