From fd26e5c31609b48e1d6718f72d295a27a7d84a49 Mon Sep 17 00:00:00 2001 From: Gyanendra Mishra Date: Thu, 11 Jan 2024 18:27:42 +0000 Subject: [PATCH] fix: added supprot for boot enr file (#456) --- src/cl/prysm/prysm_launcher.star | 5 ++--- src/shared_utils/shared_utils.star | 16 ---------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/cl/prysm/prysm_launcher.star b/src/cl/prysm/prysm_launcher.star index 61bc8d1d9..5230b23b5 100644 --- a/src/cl/prysm/prysm_launcher.star +++ b/src/cl/prysm/prysm_launcher.star @@ -349,9 +349,8 @@ def get_beacon_config( ) cmd.append( "--bootstrap-node=" - + shared_utils.get_devnet_enr( - plan, el_cl_genesis_data.files_artifact_uuid - ) + + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + + "/boot_enr.yaml" ) else: # Public network cmd.append("--{}".format(network)) diff --git a/src/shared_utils/shared_utils.star b/src/shared_utils/shared_utils.star index 43694e310..f2017f17c 100644 --- a/src/shared_utils/shared_utils.star +++ b/src/shared_utils/shared_utils.star @@ -107,22 +107,6 @@ print(",".join(bootnodes), end="") return enr_list.output -# Prysm and Nimbus needs to have the enrs in a list format -# Can't figure out how to pass each item as a list, as I can't return an array from the starlark function -# So for now I'm just returning the last item in the list -def get_devnet_enr(plan, filename): - enr_items = plan.run_python( - files={constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: filename}, - wait=None, - run=""" -with open("/network-configs/network-configs/bootstrap_nodes.txt") as bootnode_file: - last_enr = bootnode_file.read().splitlines()[-1] - print(last_enr, end="") - """, - ) - return enr_items.output - - def read_genesis_timestamp_from_config(plan, filename): value = plan.run_python( files={constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: filename},