Commit 2a20d5ad authored by pk910's avatar pk910 Committed by GitHub

feat: add execution client urls to dora config (#588)

upcoming version of dora uses execution layer clients to crawl the
deposit contract log.
This PR adds the execution client urls to the dora config.
parent aabc942c
...@@ -37,8 +37,9 @@ def launch_dora( ...@@ -37,8 +37,9 @@ def launch_dora(
global_node_selectors, global_node_selectors,
): ):
all_cl_client_info = [] all_cl_client_info = []
all_el_client_info = []
for index, participant in enumerate(participant_contexts): for index, participant in enumerate(participant_contexts):
full_name, cl_client, _, _ = shared_utils.get_client_names( full_name, cl_client, el_client, _ = shared_utils.get_client_names(
participant, index, participant_contexts, participant_configs participant, index, participant_contexts, participant_configs
) )
all_cl_client_info.append( all_cl_client_info.append(
...@@ -47,9 +48,18 @@ def launch_dora( ...@@ -47,9 +48,18 @@ def launch_dora(
full_name, full_name,
) )
) )
all_el_client_info.append(
new_el_client_info(
"http://{0}:{1}".format(
el_client.ip_addr,
el_client.rpc_port_num,
),
full_name,
)
)
template_data = new_config_template_data( template_data = new_config_template_data(
network_params.network, HTTP_PORT_NUMBER, all_cl_client_info network_params.network, HTTP_PORT_NUMBER, all_cl_client_info, all_el_client_info
) )
template_and_data = shared_utils.new_template_and_data( template_and_data = shared_utils.new_template_and_data(
...@@ -105,11 +115,12 @@ def get_config( ...@@ -105,11 +115,12 @@ def get_config(
) )
def new_config_template_data(network, listen_port_num, cl_client_info): def new_config_template_data(network, listen_port_num, cl_client_info, el_client_info):
return { return {
"Network": network, "Network": network,
"ListenPortNum": listen_port_num, "ListenPortNum": listen_port_num,
"CLClientInfo": cl_client_info, "CLClientInfo": cl_client_info,
"ELClientInfo": el_client_info,
"PublicNetwork": True if network in constants.PUBLIC_NETWORKS else False, "PublicNetwork": True if network in constants.PUBLIC_NETWORKS else False,
} }
...@@ -119,3 +130,10 @@ def new_cl_client_info(beacon_http_url, full_name): ...@@ -119,3 +130,10 @@ def new_cl_client_info(beacon_http_url, full_name):
"Beacon_HTTP_URL": beacon_http_url, "Beacon_HTTP_URL": beacon_http_url,
"FullName": full_name, "FullName": full_name,
} }
def new_el_client_info(execution_http_url, full_name):
return {
"Execution_HTTP_URL": execution_http_url,
"FullName": full_name,
}
...@@ -45,6 +45,15 @@ beaconapi: ...@@ -45,6 +45,15 @@ beaconapi:
redisCacheAddr: "" redisCacheAddr: ""
redisCachePrefix: "" redisCachePrefix: ""
executionapi:
endpoints:
{{ range $clClient := .ELClientInfo }}
- url: "{{ $clClient.Execution_HTTP_URL }}"
name: "{{ $clClient.FullName }}"
archive: true
{{- end }}
depositLogBatchSize: 1000
# indexer keeps track of the latest epochs in memory. # indexer keeps track of the latest epochs in memory.
indexer: indexer:
# max number of epochs to keep in memory # max number of epochs to keep in memory
......
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