-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiltfile
160 lines (134 loc) · 3.67 KB
/
Tiltfile
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Init EL nodes
local_resource(
"el-init",
cmd="./.data/shell/init-el.sh",
deps=["cfg-gen-pre"],
)
# Start EL haproxy
local_resource(
"el-haproxy",
serve_cmd="./.data/shell/run-haproxy-el.sh",
deps=["el-init"],
)
cfg = decode_yaml(read_file("./.data/configuration.yaml"))
geth_nodes = []
# Init CL nodes
local_resource(
"init-cl",
cmd="./.data/shell/init-cl.sh",
deps=geth_nodes,
)
# Patch CL config
local_resource(
"patch-cl",
cmd="python3 -m eth_possim patch-cl",
deps=["init-cl"],
)
# Regenerate genesis
local_resource(
"cl-genesis",
cmd="./.data/shell/eth2-genesis.sh",
deps=["init-cl"],
)
# EL boot node
local_resource(
"el-boot",
serve_cmd="./.data/shell/run-el-bootnode.sh",
deps=["cl-genesis"]
)
# CL boot node
local_resource(
"cl-boot",
serve_cmd="./.data/shell/run-lh-boot.sh",
deps=["cl-genesis"]
)
# Deploy EL nodes
for idx, geth_node in enumerate(cfg["el"]["geth_node"]):
node_name = "el-geth-{}".format(idx)
local_resource(
node_name,
serve_cmd="./.data/shell/run-geth-node-{}.sh".format(idx),
deps=["cl-boot", "el-boot"],
allow_parallel=True,
)
geth_nodes.append(node_name)
if cfg["pbs"]["enabled"]:
mev_builder_nodes = []
# Deploy builder nodes
for idx, mev_node in enumerate(cfg["el"]["mev_builder_node"]):
node_name = "el-mev-{}".format(idx)
local_resource(
node_name,
serve_cmd="./.data/shell/run-mev-builder-{}.sh".format(idx),
deps=["cl-boot", "el-boot"],
allow_parallel=True,
)
mev_builder_nodes.append(node_name)
# Deploy beacon nodes
lh_beacon_nodes = []
for idx in range(cfg["cl"]["lh_node_count"]):
node_name = "cl-lh-{}".format(idx)
local_resource(
node_name,
serve_cmd="./.data/shell/run-lh-beacon-node-{}.sh".format(idx),
deps=geth_nodes,
)
lh_beacon_nodes.append(node_name)
# Deploy batch deposit contract
local_resource(
"deploy-deposit-contract",
cmd="python3 -m eth_possim deploy-batch-deposit-contract",
deps=lh_beacon_nodes,
allow_parallel=True,
)
# Deploy fee manager library and main contract.
local_resource(
"deploy-fee-manager-contracts",
cmd="python3 -m eth_possim deploy-fee-manager-contracts",
deps=lh_beacon_nodes,
resource_deps=["deploy-deposit-contract"],
allow_parallel=True,
)
# Deploy validator nodes
for idx in range(cfg["cl"]["lh_node_count"]):
node_name = "val-lh-{}".format(idx)
local_resource(
node_name,
serve_cmd="./.data/shell/run-lh-validator-node-{}.sh".format(idx),
deps=lh_beacon_nodes,
)
# Start CL haproxy
local_resource(
"cl-haproxy",
serve_cmd="./.data/shell/run-haproxy-cl.sh",
deps=lh_beacon_nodes,
)
# Deploy Teku
for idx in range(cfg["cl"]["teku_node_count"]):
local_resource(
"cl-teku-{}".format(idx),
serve_cmd="./.data/shell/run-teku-beacon-node-{}.sh".format(idx),
deps=lh_beacon_nodes,
)
if cfg["pbs"]["enabled"]:
mev_prysm_nodes = []
# Deploy Prysm
for idx, node in enumerate(cfg["el"]["mev_builder_node"]):
node_name = "cl-prysm-mev-{}".format(idx)
local_resource(
node_name,
serve_cmd="./.data/shell/run-mev-prysm-{}.sh".format(idx),
deps=lh_beacon_nodes + mev_builder_nodes,
)
mev_prysm_nodes.append(node_name)
# Deploy PBS tooling
local_resource(
"mev-relay",
serve_cmd="./.data/shell/run-mev-relay.sh",
deps=mev_prysm_nodes,
)
local_resource(
"mev-boost",
serve_cmd="./.data/shell/run-mev-boost.sh",
deps=["mev-relay"],
)