diff --git a/main.star b/main.star index ca1dd83a8..a318322ce 100644 --- a/main.star +++ b/main.star @@ -179,9 +179,9 @@ def run(plan, args={}): all_el_contexts[0].ip_addr, all_el_contexts[0].engine_rpc_port_num, ) - beacon_uri = "{0}:{1}".format( - all_cl_contexts[0].ip_addr, all_cl_contexts[0].http_port_num - ) + beacon_uri = "{0}".format(all_cl_contexts[0].beacon_http_url)[ + 7: + ] # remove http:// endpoint = mock_mev.launch_mock_mev( plan, el_uri, @@ -199,10 +199,7 @@ def run(plan, args={}): all_el_contexts[-1].ip_addr, all_el_contexts[-1].rpc_port_num ) beacon_uris = ",".join( - [ - "http://{0}:{1}".format(context.ip_addr, context.http_port_num) - for context in all_cl_contexts - ] + ["{0}".format(context.beacon_http_url) for context in all_cl_contexts] ) first_cl_client = all_cl_contexts[0] diff --git a/src/assertoor/assertoor_launcher.star b/src/assertoor/assertoor_launcher.star index be78bed55..df258e62f 100644 --- a/src/assertoor/assertoor_launcher.star +++ b/src/assertoor/assertoor_launcher.star @@ -52,8 +52,7 @@ def launch_assertoor( ) all_client_info.append( new_client_info( - cl_client.ip_addr, - cl_client.http_port_num, + cl_client.beacon_http_url, el_client.ip_addr, el_client.rpc_port_num, full_name, @@ -63,8 +62,7 @@ def launch_assertoor( if participant_config.validator_count != 0: vc_info.append( new_client_info( - cl_client.ip_addr, - cl_client.http_port_num, + cl_client.beacon_http_url, el_client.ip_addr, el_client.rpc_port_num, full_name, @@ -164,10 +162,9 @@ def new_config_template_data(listen_port_num, client_info, vc_info, assertoor_pa } -def new_client_info(cl_ip_addr, cl_port_num, el_ip_addr, el_port_num, full_name): +def new_client_info(beacon_http_url, el_ip_addr, el_port_num, full_name): return { - "CLIPAddr": cl_ip_addr, - "CLPortNum": cl_port_num, + "CL_HTTP_URL": beacon_http_url, "ELIPAddr": el_ip_addr, "ELPortNum": el_port_num, "Name": full_name, diff --git a/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star b/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star index 35b04f4f8..efc895570 100644 --- a/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star +++ b/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star @@ -38,8 +38,7 @@ def launch_beacon_metrics_gazer( global_node_selectors, ): config = get_config( - cl_contexts[0].ip_addr, - cl_contexts[0].http_port_num, + cl_contexts[0].beacon_http_url, global_node_selectors, ) @@ -57,7 +56,7 @@ def launch_beacon_metrics_gazer( ) -def get_config(ip_addr, http_port_num, node_selectors): +def get_config(beacon_http_url, node_selectors): config_file_path = shared_utils.path_join( BEACON_METRICS_GAZER_CONFIG_MOUNT_DIRPATH_ON_SERVICE, BEACON_METRICS_GAZER_CONFIG_FILENAME, @@ -69,7 +68,7 @@ def get_config(ip_addr, http_port_num, node_selectors): BEACON_METRICS_GAZER_CONFIG_MOUNT_DIRPATH_ON_SERVICE: VALIDATOR_RANGES_ARTIFACT_NAME, }, cmd=[ - "http://{0}:{1}".format(ip_addr, http_port_num), + "{0}".format(beacon_http_url), "--ranges-file", config_file_path, "--port", diff --git a/src/blob_spammer/blob_spammer.star b/src/blob_spammer/blob_spammer.star index 6ee934158..de08d38fd 100644 --- a/src/blob_spammer/blob_spammer.star +++ b/src/blob_spammer/blob_spammer.star @@ -50,13 +50,12 @@ def get_config( [ "apk update", "apk add curl jq", - 'current_epoch=$(curl -s http://{0}:{1}/eth/v2/beacon/blocks/head | jq -r ".version")'.format( - cl_context.ip_addr, cl_context.http_port_num + 'current_epoch=$(curl -s {0}/eth/v2/beacon/blocks/head | jq -r ".version")'.format( + cl_context.beacon_http_url, ), "echo $current_epoch", - 'while [ $current_epoch != "deneb" ]; do echo "waiting for deneb, current epoch is $current_epoch"; current_epoch=$(curl -s http://{0}:{1}/eth/v2/beacon/blocks/head | jq -r ".version"); sleep {2}; done'.format( - cl_context.ip_addr, - cl_context.http_port_num, + 'while [ $current_epoch != "deneb" ]; do echo "waiting for deneb, current epoch is $current_epoch"; current_epoch=$(curl -s {0}/eth/v2/beacon/blocks/head | jq -r ".version"); sleep {1}; done'.format( + cl_context.beacon_http_url, seconds_per_slot, ), 'echo "sleep is over, starting to send blob transactions"', diff --git a/src/blobscan/blobscan_launcher.star b/src/blobscan/blobscan_launcher.star index 209237d45..8b8e73756 100644 --- a/src/blobscan/blobscan_launcher.star +++ b/src/blobscan/blobscan_launcher.star @@ -62,9 +62,7 @@ def launch_blobscan( global_node_selectors, ): node_selectors = global_node_selectors - beacon_node_rpc_uri = "http://{0}:{1}".format( - cl_contexts[0].ip_addr, cl_contexts[0].http_port_num - ) + beacon_node_rpc_uri = "{0}".format(cl_contexts[0].beacon_http_url) execution_node_rpc_uri = "http://{0}:{1}".format( el_contexts[0].ip_addr, el_contexts[0].rpc_port_num ) diff --git a/src/cl/cl_context.star b/src/cl/cl_context.star index b89b79f74..d388952ed 100644 --- a/src/cl/cl_context.star +++ b/src/cl/cl_context.star @@ -1,8 +1,7 @@ def new_cl_context( client_name, enr, - ip_addr, - http_port_num, + beacon_http_url, cl_nodes_metrics_info, beacon_service_name, multiaddr="", @@ -14,8 +13,7 @@ def new_cl_context( return struct( client_name=client_name, enr=enr, - ip_addr=ip_addr, - http_port_num=http_port_num, + beacon_http_url=beacon_http_url, cl_nodes_metrics_info=cl_nodes_metrics_info, beacon_service_name=beacon_service_name, multiaddr=multiaddr, diff --git a/src/cl/grandine/grandine_launcher.star b/src/cl/grandine/grandine_launcher.star index e78fe6e7b..46bf3a418 100644 --- a/src/cl/grandine/grandine_launcher.star +++ b/src/cl/grandine/grandine_launcher.star @@ -184,12 +184,10 @@ def launch( service_name, BEACON_METRICS_PATH, beacon_metrics_url ) nodes_metrics_info = [beacon_node_metrics_info] - return cl_context.new_cl_context( "grandine", beacon_node_enr, - beacon_service.ip_address, - BEACON_HTTP_PORT_NUM, + beacon_http_url, nodes_metrics_info, beacon_service_name, multiaddr=beacon_multiaddr, diff --git a/src/cl/lighthouse/lighthouse_launcher.star b/src/cl/lighthouse/lighthouse_launcher.star index cfa00da74..8821890fe 100644 --- a/src/cl/lighthouse/lighthouse_launcher.star +++ b/src/cl/lighthouse/lighthouse_launcher.star @@ -201,12 +201,10 @@ def launch( beacon_service_name, METRICS_PATH, beacon_metrics_url ) nodes_metrics_info = [beacon_node_metrics_info] - return cl_context.new_cl_context( "lighthouse", beacon_node_enr, - beacon_service.ip_address, - BEACON_HTTP_PORT_NUM, + beacon_http_url, nodes_metrics_info, beacon_service_name, beacon_multiaddr, @@ -300,6 +298,7 @@ def get_beacon_config( # ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^ # Enable this flag once we have https://github.com/sigp/lighthouse/issues/5054 fixed # "--allow-insecure-genesis-sync", + "--enable-private-discovery", ] if network not in constants.PUBLIC_NETWORKS: diff --git a/src/cl/lodestar/lodestar_launcher.star b/src/cl/lodestar/lodestar_launcher.star index f0a075ad6..7b0301c4f 100644 --- a/src/cl/lodestar/lodestar_launcher.star +++ b/src/cl/lodestar/lodestar_launcher.star @@ -196,8 +196,7 @@ def launch( return cl_context.new_cl_context( "lodestar", beacon_node_enr, - beacon_service.ip_address, - HTTP_PORT_NUM, + beacon_http_url, nodes_metrics_info, beacon_service_name, beacon_multiaddr, diff --git a/src/cl/nimbus/nimbus_launcher.star b/src/cl/nimbus/nimbus_launcher.star index 9f9c414b2..82f82688d 100644 --- a/src/cl/nimbus/nimbus_launcher.star +++ b/src/cl/nimbus/nimbus_launcher.star @@ -199,8 +199,7 @@ def launch( return cl_context.new_cl_context( "nimbus", beacon_node_enr, - beacon_service.ip_address, - BEACON_HTTP_PORT_NUM, + beacon_http_url, nodes_metrics_info, beacon_service_name, beacon_multiaddr, diff --git a/src/cl/prysm/prysm_launcher.star b/src/cl/prysm/prysm_launcher.star index dd4889cd0..9b73bc432 100644 --- a/src/cl/prysm/prysm_launcher.star +++ b/src/cl/prysm/prysm_launcher.star @@ -150,7 +150,7 @@ def launch( beacon_http_endpoint = "{0}:{1}".format(beacon_service.ip_address, HTTP_PORT_NUM) beacon_rpc_endpoint = "{0}:{1}".format(beacon_service.ip_address, RPC_PORT_NUM) - + beacon_http_url = beacon_http_endpoint # TODO(old) add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module beacon_node_identity_recipe = GetHttpRequestRecipe( endpoint="/eth/v1/node/identity", @@ -180,8 +180,7 @@ def launch( return cl_context.new_cl_context( "prysm", beacon_node_enr, - beacon_service.ip_address, - HTTP_PORT_NUM, + beacon_http_url, nodes_metrics_info, beacon_service_name, beacon_multiaddr, diff --git a/src/cl/teku/teku_launcher.star b/src/cl/teku/teku_launcher.star index 9919181c8..e0d0d08b4 100644 --- a/src/cl/teku/teku_launcher.star +++ b/src/cl/teku/teku_launcher.star @@ -192,8 +192,7 @@ def launch( return cl_context.new_cl_context( "teku", beacon_node_enr, - beacon_service.ip_address, - BEACON_HTTP_PORT_NUM, + beacon_http_url, nodes_metrics_info, beacon_service_name, multiaddr=beacon_multiaddr, diff --git a/src/dora/dora_launcher.star b/src/dora/dora_launcher.star index 586f8372a..b5d97ac2d 100644 --- a/src/dora/dora_launcher.star +++ b/src/dora/dora_launcher.star @@ -44,8 +44,7 @@ def launch_dora( ) all_cl_client_info.append( new_cl_client_info( - cl_client.ip_addr, - cl_client.http_port_num, + cl_client.beacon_http_url, full_name, ) ) @@ -115,9 +114,8 @@ def new_config_template_data(network, listen_port_num, cl_client_info): } -def new_cl_client_info(ip_addr, port_num, full_name): +def new_cl_client_info(beacon_http_url, full_name): return { - "IPAddr": ip_addr, - "PortNum": port_num, + "Beacon_HTTP_URL": beacon_http_url, "FullName": full_name, } diff --git a/src/ethereum_metrics_exporter/ethereum_metrics_exporter_launcher.star b/src/ethereum_metrics_exporter/ethereum_metrics_exporter_launcher.star index 1c24162c9..cfe7d9c12 100644 --- a/src/ethereum_metrics_exporter/ethereum_metrics_exporter_launcher.star +++ b/src/ethereum_metrics_exporter/ethereum_metrics_exporter_launcher.star @@ -39,9 +39,8 @@ def launch( "--metrics-port", str(METRICS_PORT_NUMBER), "--consensus-url", - "http://{}:{}".format( - cl_context.ip_addr, - cl_context.http_port_num, + "{0}".format( + cl_context.beacon_http_url, ), "--execution-url", "http://{}:{}".format( diff --git a/src/goomy_blob/goomy_blob.star b/src/goomy_blob/goomy_blob.star index 8872d21c8..c856af241 100644 --- a/src/goomy_blob/goomy_blob.star +++ b/src/goomy_blob/goomy_blob.star @@ -60,12 +60,11 @@ def get_config( [ "apt-get update", "apt-get install -y curl jq", - 'current_epoch=$(curl -s http://{0}:{1}/eth/v2/beacon/blocks/head | jq -r ".version")'.format( - cl_context.ip_addr, cl_context.http_port_num + 'current_epoch=$(curl -s {0}/eth/v2/beacon/blocks/head | jq -r ".version")'.format( + cl_context.beacon_http_url, ), - 'while [ $current_epoch != "deneb" ]; do echo "waiting for deneb, current epoch is $current_epoch"; current_epoch=$(curl -s http://{0}:{1}/eth/v2/beacon/blocks/head | jq -r ".version"); sleep {2}; done'.format( - cl_context.ip_addr, - cl_context.http_port_num, + 'while [ $current_epoch != "deneb" ]; do echo "waiting for deneb, current epoch is $current_epoch"; current_epoch=$(curl -s {0}/eth/v2/beacon/blocks/head | jq -r ".version"); sleep {1}; done'.format( + cl_context.beacon_http_url, seconds_per_slot, ), 'echo "sleep is over, starting to send blob transactions"', diff --git a/src/snooper/snooper_beacon_launcher.star b/src/snooper/snooper_beacon_launcher.star index 1110de3a2..5ff83e1a7 100644 --- a/src/snooper/snooper_beacon_launcher.star +++ b/src/snooper/snooper_beacon_launcher.star @@ -37,9 +37,8 @@ def launch(plan, service_name, cl_context, node_selectors): def get_config(service_name, cl_context, node_selectors): - beacon_rpc_port_num = "http://{0}:{1}".format( - cl_context.ip_addr, - cl_context.http_port_num, + beacon_rpc_port_num = "{0}".format( + cl_context.beacon_http_url, ) cmd = [ SNOOPER_BINARY_COMMAND, diff --git a/src/vc/prysm.star b/src/vc/prysm.star index 1b4b5c912..df22408e5 100644 --- a/src/vc/prysm.star +++ b/src/vc/prysm.star @@ -42,9 +42,8 @@ def get_config( + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/config.yaml", "--beacon-rpc-provider=" - + "{}:{}".format( - cl_context.ip_addr, - PRYSM_BEACON_RPC_PORT, + + "{0}".format( + cl_context.beacon_http_url, ), "--beacon-rest-api-provider=" + beacon_http_url, "--wallet-dir=" + validator_keys_dirpath, diff --git a/src/vc/vc_launcher.star b/src/vc/vc_launcher.star index d50facf0f..a3f753f64 100644 --- a/src/vc/vc_launcher.star +++ b/src/vc/vc_launcher.star @@ -58,16 +58,14 @@ def launch( ) if snooper_enabled: - beacon_http_url = "http://{}:{}".format( + beacon_http_url = "http://{0}:{1}".format( snooper_beacon_context.ip_addr, snooper_beacon_context.beacon_rpc_port_num, ) else: - beacon_http_url = "http://{}:{}".format( - cl_context.ip_addr, - cl_context.http_port_num, + beacon_http_url = "{0}".format( + cl_context.beacon_http_url, ) - vc_min_cpu = int(vc_min_cpu) if int(vc_min_cpu) > 0 else MIN_CPU vc_max_cpu = int(vc_max_cpu) if int(vc_max_cpu) > 0 else MAX_CPU vc_min_mem = int(vc_min_mem) if int(vc_min_mem) > 0 else MIN_MEMORY diff --git a/src/xatu_sentry/xatu_sentry_launcher.star b/src/xatu_sentry/xatu_sentry_launcher.star index c0964ee4b..0021359d5 100644 --- a/src/xatu_sentry/xatu_sentry_launcher.star +++ b/src/xatu_sentry/xatu_sentry_launcher.star @@ -29,10 +29,7 @@ def launch( template_data = new_config_template_data( str(METRICS_PORT_NUMBER), pair_name, - "http://{}:{}".format( - cl_context.ip_addr, - cl_context.http_port_num, - ), + "{0}".format(cl_context.beacon_http_url), xatu_sentry_params.xatu_server_addr, network_params.network, xatu_sentry_params.beacon_subscriptions, diff --git a/static_files/assertoor-config/config.yaml.tmpl b/static_files/assertoor-config/config.yaml.tmpl index 1feeaa584..9a453c9ed 100644 --- a/static_files/assertoor-config/config.yaml.tmpl +++ b/static_files/assertoor-config/config.yaml.tmpl @@ -2,7 +2,7 @@ endpoints: {{ range $client := .ClientInfo }} - name: "{{ $client.Name }}" - consensusUrl: "http://{{ $client.CLIPAddr }}:{{ $client.CLPortNum }}" + consensusUrl: "{{ $client.CL_HTTP_URL }}" executionUrl: "http://{{ $client.ELIPAddr }}:{{ $client.ELPortNum }}" {{- end }} diff --git a/static_files/dora-config/config.yaml.tmpl b/static_files/dora-config/config.yaml.tmpl index 33c10b134..041a980be 100644 --- a/static_files/dora-config/config.yaml.tmpl +++ b/static_files/dora-config/config.yaml.tmpl @@ -34,7 +34,7 @@ beaconapi: # CL Client RPC endpoints: {{ range $clClient := .CLClientInfo }} - - url: "http://{{ $clClient.IPAddr }}:{{ $clClient.PortNum }}" + - url: "{{ $clClient.Beacon_HTTP_URL }}" name: "{{ $clClient.FullName }}" archive: true {{- end }}