Commit 6f84e3d5 authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

fix: blobber incorrect url (#528)

parent 47d0ea08
...@@ -179,9 +179,9 @@ def run(plan, args={}): ...@@ -179,9 +179,9 @@ def run(plan, args={}):
all_el_contexts[0].ip_addr, all_el_contexts[0].ip_addr,
all_el_contexts[0].engine_rpc_port_num, all_el_contexts[0].engine_rpc_port_num,
) )
beacon_uri = "{0}:{1}".format( beacon_uri = "{0}".format(all_cl_contexts[0].beacon_http_url)[
all_cl_contexts[0].ip_addr, all_cl_contexts[0].http_port_num 7:
) ] # remove http://
endpoint = mock_mev.launch_mock_mev( endpoint = mock_mev.launch_mock_mev(
plan, plan,
el_uri, el_uri,
...@@ -199,10 +199,7 @@ def run(plan, args={}): ...@@ -199,10 +199,7 @@ def run(plan, args={}):
all_el_contexts[-1].ip_addr, all_el_contexts[-1].rpc_port_num all_el_contexts[-1].ip_addr, all_el_contexts[-1].rpc_port_num
) )
beacon_uris = ",".join( beacon_uris = ",".join(
[ ["{0}".format(context.beacon_http_url) for context in all_cl_contexts]
"http://{0}:{1}".format(context.ip_addr, context.http_port_num)
for context in all_cl_contexts
]
) )
first_cl_client = all_cl_contexts[0] first_cl_client = all_cl_contexts[0]
......
...@@ -52,8 +52,7 @@ def launch_assertoor( ...@@ -52,8 +52,7 @@ def launch_assertoor(
) )
all_client_info.append( all_client_info.append(
new_client_info( new_client_info(
cl_client.ip_addr, cl_client.beacon_http_url,
cl_client.http_port_num,
el_client.ip_addr, el_client.ip_addr,
el_client.rpc_port_num, el_client.rpc_port_num,
full_name, full_name,
...@@ -63,8 +62,7 @@ def launch_assertoor( ...@@ -63,8 +62,7 @@ def launch_assertoor(
if participant_config.validator_count != 0: if participant_config.validator_count != 0:
vc_info.append( vc_info.append(
new_client_info( new_client_info(
cl_client.ip_addr, cl_client.beacon_http_url,
cl_client.http_port_num,
el_client.ip_addr, el_client.ip_addr,
el_client.rpc_port_num, el_client.rpc_port_num,
full_name, full_name,
...@@ -164,10 +162,9 @@ def new_config_template_data(listen_port_num, client_info, vc_info, assertoor_pa ...@@ -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 { return {
"CLIPAddr": cl_ip_addr, "CL_HTTP_URL": beacon_http_url,
"CLPortNum": cl_port_num,
"ELIPAddr": el_ip_addr, "ELIPAddr": el_ip_addr,
"ELPortNum": el_port_num, "ELPortNum": el_port_num,
"Name": full_name, "Name": full_name,
......
...@@ -38,8 +38,7 @@ def launch_beacon_metrics_gazer( ...@@ -38,8 +38,7 @@ def launch_beacon_metrics_gazer(
global_node_selectors, global_node_selectors,
): ):
config = get_config( config = get_config(
cl_contexts[0].ip_addr, cl_contexts[0].beacon_http_url,
cl_contexts[0].http_port_num,
global_node_selectors, global_node_selectors,
) )
...@@ -57,7 +56,7 @@ def launch_beacon_metrics_gazer( ...@@ -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( config_file_path = shared_utils.path_join(
BEACON_METRICS_GAZER_CONFIG_MOUNT_DIRPATH_ON_SERVICE, BEACON_METRICS_GAZER_CONFIG_MOUNT_DIRPATH_ON_SERVICE,
BEACON_METRICS_GAZER_CONFIG_FILENAME, BEACON_METRICS_GAZER_CONFIG_FILENAME,
...@@ -69,7 +68,7 @@ def get_config(ip_addr, http_port_num, node_selectors): ...@@ -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, BEACON_METRICS_GAZER_CONFIG_MOUNT_DIRPATH_ON_SERVICE: VALIDATOR_RANGES_ARTIFACT_NAME,
}, },
cmd=[ cmd=[
"http://{0}:{1}".format(ip_addr, http_port_num), "{0}".format(beacon_http_url),
"--ranges-file", "--ranges-file",
config_file_path, config_file_path,
"--port", "--port",
......
...@@ -50,13 +50,12 @@ def get_config( ...@@ -50,13 +50,12 @@ def get_config(
[ [
"apk update", "apk update",
"apk add curl jq", "apk add curl jq",
'current_epoch=$(curl -s http://{0}:{1}/eth/v2/beacon/blocks/head | jq -r ".version")'.format( 'current_epoch=$(curl -s {0}/eth/v2/beacon/blocks/head | jq -r ".version")'.format(
cl_context.ip_addr, cl_context.http_port_num cl_context.beacon_http_url,
), ),
"echo $current_epoch", "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( '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.ip_addr, cl_context.beacon_http_url,
cl_context.http_port_num,
seconds_per_slot, seconds_per_slot,
), ),
'echo "sleep is over, starting to send blob transactions"', 'echo "sleep is over, starting to send blob transactions"',
......
...@@ -62,9 +62,7 @@ def launch_blobscan( ...@@ -62,9 +62,7 @@ def launch_blobscan(
global_node_selectors, global_node_selectors,
): ):
node_selectors = global_node_selectors node_selectors = global_node_selectors
beacon_node_rpc_uri = "http://{0}:{1}".format( beacon_node_rpc_uri = "{0}".format(cl_contexts[0].beacon_http_url)
cl_contexts[0].ip_addr, cl_contexts[0].http_port_num
)
execution_node_rpc_uri = "http://{0}:{1}".format( execution_node_rpc_uri = "http://{0}:{1}".format(
el_contexts[0].ip_addr, el_contexts[0].rpc_port_num el_contexts[0].ip_addr, el_contexts[0].rpc_port_num
) )
......
def new_cl_context( def new_cl_context(
client_name, client_name,
enr, enr,
ip_addr, beacon_http_url,
http_port_num,
cl_nodes_metrics_info, cl_nodes_metrics_info,
beacon_service_name, beacon_service_name,
multiaddr="", multiaddr="",
...@@ -14,8 +13,7 @@ def new_cl_context( ...@@ -14,8 +13,7 @@ def new_cl_context(
return struct( return struct(
client_name=client_name, client_name=client_name,
enr=enr, enr=enr,
ip_addr=ip_addr, beacon_http_url=beacon_http_url,
http_port_num=http_port_num,
cl_nodes_metrics_info=cl_nodes_metrics_info, cl_nodes_metrics_info=cl_nodes_metrics_info,
beacon_service_name=beacon_service_name, beacon_service_name=beacon_service_name,
multiaddr=multiaddr, multiaddr=multiaddr,
......
...@@ -184,12 +184,10 @@ def launch( ...@@ -184,12 +184,10 @@ def launch(
service_name, BEACON_METRICS_PATH, beacon_metrics_url service_name, BEACON_METRICS_PATH, beacon_metrics_url
) )
nodes_metrics_info = [beacon_node_metrics_info] nodes_metrics_info = [beacon_node_metrics_info]
return cl_context.new_cl_context( return cl_context.new_cl_context(
"grandine", "grandine",
beacon_node_enr, beacon_node_enr,
beacon_service.ip_address, beacon_http_url,
BEACON_HTTP_PORT_NUM,
nodes_metrics_info, nodes_metrics_info,
beacon_service_name, beacon_service_name,
multiaddr=beacon_multiaddr, multiaddr=beacon_multiaddr,
......
...@@ -201,12 +201,10 @@ def launch( ...@@ -201,12 +201,10 @@ def launch(
beacon_service_name, METRICS_PATH, beacon_metrics_url beacon_service_name, METRICS_PATH, beacon_metrics_url
) )
nodes_metrics_info = [beacon_node_metrics_info] nodes_metrics_info = [beacon_node_metrics_info]
return cl_context.new_cl_context( return cl_context.new_cl_context(
"lighthouse", "lighthouse",
beacon_node_enr, beacon_node_enr,
beacon_service.ip_address, beacon_http_url,
BEACON_HTTP_PORT_NUM,
nodes_metrics_info, nodes_metrics_info,
beacon_service_name, beacon_service_name,
beacon_multiaddr, beacon_multiaddr,
...@@ -300,6 +298,7 @@ def get_beacon_config( ...@@ -300,6 +298,7 @@ def get_beacon_config(
# ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^ # ^^^^^^^^^^^^^^^^^^^ METRICS CONFIG ^^^^^^^^^^^^^^^^^^^^^
# Enable this flag once we have https://github.com/sigp/lighthouse/issues/5054 fixed # Enable this flag once we have https://github.com/sigp/lighthouse/issues/5054 fixed
# "--allow-insecure-genesis-sync", # "--allow-insecure-genesis-sync",
"--enable-private-discovery",
] ]
if network not in constants.PUBLIC_NETWORKS: if network not in constants.PUBLIC_NETWORKS:
......
...@@ -196,8 +196,7 @@ def launch( ...@@ -196,8 +196,7 @@ def launch(
return cl_context.new_cl_context( return cl_context.new_cl_context(
"lodestar", "lodestar",
beacon_node_enr, beacon_node_enr,
beacon_service.ip_address, beacon_http_url,
HTTP_PORT_NUM,
nodes_metrics_info, nodes_metrics_info,
beacon_service_name, beacon_service_name,
beacon_multiaddr, beacon_multiaddr,
......
...@@ -199,8 +199,7 @@ def launch( ...@@ -199,8 +199,7 @@ def launch(
return cl_context.new_cl_context( return cl_context.new_cl_context(
"nimbus", "nimbus",
beacon_node_enr, beacon_node_enr,
beacon_service.ip_address, beacon_http_url,
BEACON_HTTP_PORT_NUM,
nodes_metrics_info, nodes_metrics_info,
beacon_service_name, beacon_service_name,
beacon_multiaddr, beacon_multiaddr,
......
...@@ -150,7 +150,7 @@ def launch( ...@@ -150,7 +150,7 @@ def launch(
beacon_http_endpoint = "{0}:{1}".format(beacon_service.ip_address, HTTP_PORT_NUM) 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_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 # 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( beacon_node_identity_recipe = GetHttpRequestRecipe(
endpoint="/eth/v1/node/identity", endpoint="/eth/v1/node/identity",
...@@ -180,8 +180,7 @@ def launch( ...@@ -180,8 +180,7 @@ def launch(
return cl_context.new_cl_context( return cl_context.new_cl_context(
"prysm", "prysm",
beacon_node_enr, beacon_node_enr,
beacon_service.ip_address, beacon_http_url,
HTTP_PORT_NUM,
nodes_metrics_info, nodes_metrics_info,
beacon_service_name, beacon_service_name,
beacon_multiaddr, beacon_multiaddr,
......
...@@ -192,8 +192,7 @@ def launch( ...@@ -192,8 +192,7 @@ def launch(
return cl_context.new_cl_context( return cl_context.new_cl_context(
"teku", "teku",
beacon_node_enr, beacon_node_enr,
beacon_service.ip_address, beacon_http_url,
BEACON_HTTP_PORT_NUM,
nodes_metrics_info, nodes_metrics_info,
beacon_service_name, beacon_service_name,
multiaddr=beacon_multiaddr, multiaddr=beacon_multiaddr,
......
...@@ -44,8 +44,7 @@ def launch_dora( ...@@ -44,8 +44,7 @@ def launch_dora(
) )
all_cl_client_info.append( all_cl_client_info.append(
new_cl_client_info( new_cl_client_info(
cl_client.ip_addr, cl_client.beacon_http_url,
cl_client.http_port_num,
full_name, full_name,
) )
) )
...@@ -115,9 +114,8 @@ def new_config_template_data(network, listen_port_num, cl_client_info): ...@@ -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 { return {
"IPAddr": ip_addr, "Beacon_HTTP_URL": beacon_http_url,
"PortNum": port_num,
"FullName": full_name, "FullName": full_name,
} }
...@@ -39,9 +39,8 @@ def launch( ...@@ -39,9 +39,8 @@ def launch(
"--metrics-port", "--metrics-port",
str(METRICS_PORT_NUMBER), str(METRICS_PORT_NUMBER),
"--consensus-url", "--consensus-url",
"http://{}:{}".format( "{0}".format(
cl_context.ip_addr, cl_context.beacon_http_url,
cl_context.http_port_num,
), ),
"--execution-url", "--execution-url",
"http://{}:{}".format( "http://{}:{}".format(
......
...@@ -60,12 +60,11 @@ def get_config( ...@@ -60,12 +60,11 @@ def get_config(
[ [
"apt-get update", "apt-get update",
"apt-get install -y curl jq", "apt-get install -y curl jq",
'current_epoch=$(curl -s http://{0}:{1}/eth/v2/beacon/blocks/head | jq -r ".version")'.format( 'current_epoch=$(curl -s {0}/eth/v2/beacon/blocks/head | jq -r ".version")'.format(
cl_context.ip_addr, cl_context.http_port_num 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( '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.ip_addr, cl_context.beacon_http_url,
cl_context.http_port_num,
seconds_per_slot, seconds_per_slot,
), ),
'echo "sleep is over, starting to send blob transactions"', 'echo "sleep is over, starting to send blob transactions"',
......
...@@ -37,9 +37,8 @@ def launch(plan, service_name, cl_context, node_selectors): ...@@ -37,9 +37,8 @@ def launch(plan, service_name, cl_context, node_selectors):
def get_config(service_name, cl_context, node_selectors): def get_config(service_name, cl_context, node_selectors):
beacon_rpc_port_num = "http://{0}:{1}".format( beacon_rpc_port_num = "{0}".format(
cl_context.ip_addr, cl_context.beacon_http_url,
cl_context.http_port_num,
) )
cmd = [ cmd = [
SNOOPER_BINARY_COMMAND, SNOOPER_BINARY_COMMAND,
......
...@@ -42,9 +42,8 @@ def get_config( ...@@ -42,9 +42,8 @@ def get_config(
+ constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/config.yaml", + "/config.yaml",
"--beacon-rpc-provider=" "--beacon-rpc-provider="
+ "{}:{}".format( + "{0}".format(
cl_context.ip_addr, cl_context.beacon_http_url,
PRYSM_BEACON_RPC_PORT,
), ),
"--beacon-rest-api-provider=" + beacon_http_url, "--beacon-rest-api-provider=" + beacon_http_url,
"--wallet-dir=" + validator_keys_dirpath, "--wallet-dir=" + validator_keys_dirpath,
......
...@@ -58,16 +58,14 @@ def launch( ...@@ -58,16 +58,14 @@ def launch(
) )
if snooper_enabled: if snooper_enabled:
beacon_http_url = "http://{}:{}".format( beacon_http_url = "http://{0}:{1}".format(
snooper_beacon_context.ip_addr, snooper_beacon_context.ip_addr,
snooper_beacon_context.beacon_rpc_port_num, snooper_beacon_context.beacon_rpc_port_num,
) )
else: else:
beacon_http_url = "http://{}:{}".format( beacon_http_url = "{0}".format(
cl_context.ip_addr, cl_context.beacon_http_url,
cl_context.http_port_num,
) )
vc_min_cpu = int(vc_min_cpu) if int(vc_min_cpu) > 0 else MIN_CPU 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_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 vc_min_mem = int(vc_min_mem) if int(vc_min_mem) > 0 else MIN_MEMORY
......
...@@ -29,10 +29,7 @@ def launch( ...@@ -29,10 +29,7 @@ def launch(
template_data = new_config_template_data( template_data = new_config_template_data(
str(METRICS_PORT_NUMBER), str(METRICS_PORT_NUMBER),
pair_name, pair_name,
"http://{}:{}".format( "{0}".format(cl_context.beacon_http_url),
cl_context.ip_addr,
cl_context.http_port_num,
),
xatu_sentry_params.xatu_server_addr, xatu_sentry_params.xatu_server_addr,
network_params.network, network_params.network,
xatu_sentry_params.beacon_subscriptions, xatu_sentry_params.beacon_subscriptions,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
endpoints: endpoints:
{{ range $client := .ClientInfo }} {{ range $client := .ClientInfo }}
- name: "{{ $client.Name }}" - name: "{{ $client.Name }}"
consensusUrl: "http://{{ $client.CLIPAddr }}:{{ $client.CLPortNum }}" consensusUrl: "{{ $client.CL_HTTP_URL }}"
executionUrl: "http://{{ $client.ELIPAddr }}:{{ $client.ELPortNum }}" executionUrl: "http://{{ $client.ELIPAddr }}:{{ $client.ELPortNum }}"
{{- end }} {{- end }}
......
...@@ -34,7 +34,7 @@ beaconapi: ...@@ -34,7 +34,7 @@ beaconapi:
# CL Client RPC # CL Client RPC
endpoints: endpoints:
{{ range $clClient := .CLClientInfo }} {{ range $clClient := .CLClientInfo }}
- url: "http://{{ $clClient.IPAddr }}:{{ $clClient.PortNum }}" - url: "{{ $clClient.Beacon_HTTP_URL }}"
name: "{{ $clClient.FullName }}" name: "{{ $clClient.FullName }}"
archive: true archive: true
{{- end }} {{- end }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment