Skip to content

Commit

Permalink
fix: dora template fix (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Jan 10, 2024
1 parent bb5a0c1 commit f9243ea
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
1 change: 1 addition & 0 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ def run(plan, args={}):
all_cl_client_contexts,
el_cl_data_files_artifact_uuid,
network_params.electra_fork_epoch,
network_params.network,
)
plan.print("Successfully launched dora")
elif additional_service == "blobscan":
Expand Down
7 changes: 7 additions & 0 deletions src/cl/teku/teku_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ def launch(
param for param in extra_validator_params
]

# Holesky has a bigger memory footprint, so it needs more memory
if launcher.network == "holesky":
holesky_beacon_memory_limit = 4096
bn_max_mem = (
int(bn_max_mem) if int(bn_max_mem) > 0 else holesky_beacon_memory_limit
)

bn_min_cpu = int(bn_min_cpu) if int(bn_min_cpu) > 0 else BEACON_MIN_CPU
bn_max_cpu = int(bn_max_cpu) if int(bn_max_cpu) > 0 else BEACON_MAX_CPU
bn_min_mem = int(bn_min_mem) if int(bn_min_mem) > 0 else BEACON_MIN_MEMORY
Expand Down
17 changes: 13 additions & 4 deletions src/dora/dora_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def launch_dora(
cl_client_contexts,
el_cl_data_files_artifact_uuid,
electra_fork_epoch,
network,
):
all_cl_client_info = []
for index, client in enumerate(cl_client_contexts):
Expand All @@ -42,7 +43,9 @@ def launch_dora(
)
)

template_data = new_config_template_data(HTTP_PORT_NUMBER, all_cl_client_info)
template_data = new_config_template_data(
network, HTTP_PORT_NUMBER, all_cl_client_info
)

template_and_data = shared_utils.new_template_and_data(
config_template, template_data
Expand All @@ -58,21 +61,25 @@ def launch_dora(
config_files_artifact_name,
el_cl_data_files_artifact_uuid,
electra_fork_epoch,
network,
)

plan.add_service(SERVICE_NAME, config)


def get_config(
config_files_artifact_name, el_cl_data_files_artifact_uuid, electra_fork_epoch
config_files_artifact_name,
el_cl_data_files_artifact_uuid,
electra_fork_epoch,
network,
):
config_file_path = shared_utils.path_join(
DORA_CONFIG_MOUNT_DIRPATH_ON_SERVICE,
DORA_CONFIG_FILENAME,
)

# TODO: This is a hack to get the verkle support image for the electra fork
if electra_fork_epoch != None:
if electra_fork_epoch != None or "verkle" in network:
IMAGE_NAME = "ethpandaops/dora:verkle-support"
else:
IMAGE_NAME = "ethpandaops/dora:master"
Expand All @@ -93,10 +100,12 @@ def get_config(
)


def new_config_template_data(listen_port_num, cl_client_info):
def new_config_template_data(network, listen_port_num, cl_client_info):
return {
"Network": network,
"ListenPortNum": listen_port_num,
"CLClientInfo": cl_client_info,
"PublicNetwork": True if network in constants.PUBLIC_NETWORKS else False,
}


Expand Down
8 changes: 5 additions & 3 deletions static_files/dora-config/config.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ logging:

# Chain network configuration
chain:
name: "kurtosis-testnet"
name: {{ .Network }}
{{ if not .PublicNetwork }}
configPath: "/network-configs/network-configs/config.yaml"
displayName: "Kurtosis Testnet"
{{ end }}
displayName: "{{ .Network }}"

# HTTP Server configuration
server:
Expand All @@ -20,7 +22,7 @@ frontend:

# Name of the site, displayed in the title tag
siteName: "Dora the Explorer"
siteSubtitle: "Kurtosis Testnet"
siteSubtitle: "{{ .Network }} - Kurtosis"

# link to EL Explorer
ethExplorerLink: ""
Expand Down

0 comments on commit f9243ea

Please sign in to comment.