Commit e721373f authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

fix: geth flags for verkle genesis (#328)

parent 242a4cde
...@@ -311,6 +311,7 @@ def run(plan, args={}): ...@@ -311,6 +311,7 @@ def run(plan, args={}):
dora_config_template, dora_config_template,
all_cl_client_contexts, all_cl_client_contexts,
el_cl_data_files_artifact_uuid, el_cl_data_files_artifact_uuid,
network_params.electra_fork_epoch,
) )
plan.print("Succesfully launched dora") plan.print("Succesfully launched dora")
elif additional_service == "full_beaconchain_explorer": elif additional_service == "full_beaconchain_explorer":
......
shared_utils = import_module("../shared_utils/shared_utils.star") shared_utils = import_module("../shared_utils/shared_utils.star")
constants = import_module("../package_io/constants.star") constants = import_module("../package_io/constants.star")
SERVICE_NAME = "dora" SERVICE_NAME = "dora"
IMAGE_NAME = "ethpandaops/dora:master"
HTTP_PORT_ID = "http" HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER = 8080 HTTP_PORT_NUMBER = 8080
...@@ -24,7 +23,11 @@ USED_PORTS = { ...@@ -24,7 +23,11 @@ USED_PORTS = {
def launch_dora( def launch_dora(
plan, config_template, cl_client_contexts, el_cl_data_files_artifact_uuid plan,
config_template,
cl_client_contexts,
el_cl_data_files_artifact_uuid,
electra_fork_epoch,
): ):
all_cl_client_info = [] all_cl_client_info = []
for index, client in enumerate(cl_client_contexts): for index, client in enumerate(cl_client_contexts):
...@@ -49,16 +52,26 @@ def launch_dora( ...@@ -49,16 +52,26 @@ def launch_dora(
config = get_config( config = get_config(
config_files_artifact_name, config_files_artifact_name,
el_cl_data_files_artifact_uuid, el_cl_data_files_artifact_uuid,
electra_fork_epoch,
) )
plan.add_service(SERVICE_NAME, config) plan.add_service(SERVICE_NAME, config)
def get_config(config_files_artifact_name, el_cl_data_files_artifact_uuid): def get_config(
config_files_artifact_name, el_cl_data_files_artifact_uuid, electra_fork_epoch
):
config_file_path = shared_utils.path_join( config_file_path = shared_utils.path_join(
DORA_CONFIG_MOUNT_DIRPATH_ON_SERVICE, DORA_CONFIG_MOUNT_DIRPATH_ON_SERVICE,
DORA_CONFIG_FILENAME, DORA_CONFIG_FILENAME,
) )
# TODO: This is a hack to get the verkle support image for the electra fork
if electra_fork_epoch != None:
IMAGE_NAME = "ethpandaops/dora:verkle-support"
else:
IMAGE_NAME = "ethpandaops/dora:master"
return ServiceConfig( return ServiceConfig(
image=IMAGE_NAME, image=IMAGE_NAME,
ports=USED_PORTS, ports=USED_PORTS,
......
...@@ -151,7 +151,8 @@ def get_config( ...@@ -151,7 +151,8 @@ def get_config(
): ):
# TODO: Remove this once electra fork has path based storage scheme implemented # TODO: Remove this once electra fork has path based storage scheme implemented
if electra_fork_epoch != None: if electra_fork_epoch != None:
init_datadir_cmd_str = "geth init --cache.preimages --datadir={0} {1}".format( init_datadir_cmd_str = "geth init --cache.preimages --override.prague={0} --datadir={1} {2}".format(
final_genesis_timestamp,
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json", constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
) )
...@@ -172,10 +173,12 @@ def get_config( ...@@ -172,10 +173,12 @@ def get_config(
# TODO: REMOVE Once geth default db is path based, and builder rebased # TODO: REMOVE Once geth default db is path based, and builder rebased
"{0}".format( "{0}".format(
"--state.scheme=path" "--state.scheme=path"
if electra_fork_epoch != None or "--builder" not in extra_params if electra_fork_epoch == None and "--builder" not in extra_params
else "" else ""
), ),
# Override prague fork timestamp for electra fork # Override prague fork timestamp for electra fork
"{0}".format("--cache.preimages" if electra_fork_epoch != None else ""),
# Override prague fork timestamp for electra fork
"{0}".format( "{0}".format(
"--override.prague=" + final_genesis_timestamp "--override.prague=" + final_genesis_timestamp
if electra_fork_epoch != None if electra_fork_epoch != None
......
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