Skip to content

Commit 6509f47

Browse files
authored
Merge pull request #12 from lambdaclass/add-enr-and-clean
Removed commented code and added enr
2 parents 7d7864c + 731d7c9 commit 6509f47

File tree

1 file changed

+2
-36
lines changed

1 file changed

+2
-36
lines changed

src/el/ethrex/ethrex_launcher.star

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,9 @@ def get_used_ports(discovery_port):
3232
shared_utils.TCP_PROTOCOL,
3333
shared_utils.HTTP_APPLICATION_PROTOCOL,
3434
),
35-
# WS_PORT_ID: shared_utils.new_port_spec(WS_PORT_NUM, shared_utils.TCP_PROTOCOL),
36-
# TCP_DISCOVERY_PORT_ID: shared_utils.new_port_spec(
37-
# discovery_port, shared_utils.TCP_PROTOCOL
38-
# ),
39-
# UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec(
40-
# discovery_port, shared_utils.UDP_PROTOCOL
41-
# ),
4235
ENGINE_RPC_PORT_ID: shared_utils.new_port_spec(
4336
ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL
4437
),
45-
# METRICS_PORT_ID: shared_utils.new_port_spec(
46-
# METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL
47-
# ),
4838
}
4939
return used_ports
5040

@@ -112,7 +102,7 @@ def launch(
112102

113103
service = plan.add_service(service_name, config)
114104

115-
enode = el_admin_node_info.get_enode_for_node(plan, service_name, RPC_PORT_ID)
105+
enode, enr = el_admin_node_info.get_enode_enr_for_node(plan, service_name, RPC_PORT_ID)
116106

117107
metric_url = "{0}:{1}".format(service.ip_address, METRICS_PORT_NUM)
118108
metrics_info = node_metrics.new_node_metrics_info(
@@ -131,7 +121,7 @@ def launch(
131121
engine_rpc_port_num=ENGINE_RPC_PORT_NUM,
132122
rpc_http_url=http_url,
133123
ws_url=ws_url,
134-
enr="", # ethrex has no enr?
124+
enr=enr,
135125
service_name=service_name,
136126
el_metrics_info=[metrics_info],
137127
)
@@ -181,31 +171,17 @@ def get_config(
181171
used_ports = get_used_ports(discovery_port)
182172
cmd = [
183173
"ethrex",
184-
# "-{0}".format(verbosity_level),
185174
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
186175
"--network={0}".format(
187176
network
188177
if network in constants.PUBLIC_NETWORKS
189178
else constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json"
190179
),
191-
# "--http",
192180
"--http.port={0}".format(RPC_PORT_NUM),
193181
"--http.addr=0.0.0.0",
194-
# "--http.corsdomain=*",
195-
# # WARNING: The admin info endpoint is enabled so that we can easily get ENR/enode, which means
196-
# # that users should NOT store private information in these Kurtosis nodes!
197-
# "--http.api=admin,net,eth,web3,debug,trace",
198-
# "--ws",
199-
# "--ws.addr=0.0.0.0",
200-
# "--ws.port={0}".format(WS_PORT_NUM),
201-
# "--ws.api=net,eth",
202-
# "--ws.origins=*",
203-
# "--nat=extip:" + port_publisher.nat_exit_ip,
204182
"--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM),
205183
"--authrpc.jwtsecret=" + constants.JWT_MOUNT_PATH_ON_CONTAINER,
206184
"--authrpc.addr=0.0.0.0",
207-
# "--metrics=0.0.0.0:{0}".format(METRICS_PORT_NUM),
208-
# "--discovery.port={0}".format(discovery_port),
209185
]
210186
if network == constants.NETWORK_NAME.kurtosis:
211187
if len(existing_el_clients) > 0:
@@ -232,10 +208,6 @@ def get_config(
232208

233209
cmd_str = " ".join(cmd)
234210
if network not in constants.PUBLIC_NETWORKS:
235-
# subcommand_strs = [
236-
# init_datadir_cmd_str,
237-
# cmd_str,
238-
# ]
239211
subcommand_strs = [cmd_str]
240212
else:
241213
subcommand_strs = [cmd_str]
@@ -247,12 +219,6 @@ def get_config(
247219
constants.JWT_MOUNTPOINT_ON_CLIENTS: jwt_file,
248220
}
249221

250-
# if persistent:
251-
# files[EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER] = Directory(
252-
# persistent_key="data-{0}".format(service_name),
253-
# size=el_volume_size,
254-
# )
255-
256222
config_args = {
257223
"image": image,
258224
"ports": used_ports,

0 commit comments

Comments
 (0)