-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathreth.py
More file actions
51 lines (48 loc) · 1.56 KB
/
reth.py
File metadata and controls
51 lines (48 loc) · 1.56 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
from expb.clients.client_config import (
CLIENT_ENGINE_PORT,
CLIENT_METRICS_PORT,
CLIENT_P2P_PORT,
CLIENT_RPC_PORT,
CLIENTS_DATA_DIR,
CLIENTS_JWT_SECRET_FILE,
ClientConfig,
)
from expb.configs.networks import Network
class RethConfig(ClientConfig):
def __init__(self):
super().__init__(
name="reth",
default_image="ghcr.io/paradigmxyz/reth:nightly",
default_command=[
"node",
f"--datadir={CLIENTS_DATA_DIR}",
f"--port={CLIENT_P2P_PORT}",
"--http",
"--http.addr=0.0.0.0",
f"--http.port={CLIENT_RPC_PORT}",
"--authrpc.addr=0.0.0.0",
f"--authrpc.port={CLIENT_ENGINE_PORT}",
f"--authrpc.jwtsecret={CLIENTS_JWT_SECRET_FILE}",
f"--metrics=0.0.0.0:{CLIENT_METRICS_PORT}",
"--http.api=trace,rpc,eth,net,debug,web3,admin",
# Disable peering
"--disable-discovery",
"--max-inbound-peers=0",
"--max-outbound-peers=0",
],
prometheus_metrics_path="/debug/metrics/prometheus",
)
def get_command(
self,
instance: str,
network: Network,
extra_flags: list[str] = [],
) -> list[str]:
command = []
if network == Network.MAINNET:
command.extend(
[
"--chain=mainnet",
]
)
return self.default_command + command + extra_flags