Skip to content

Commit

Permalink
feat: add support for custom assertoor images & use assertoor image w…
Browse files Browse the repository at this point in the history
…ith verkle support for verkle chains (#483)
  • Loading branch information
pk910 authored Feb 1, 2024
1 parent 01868fc commit 2d8a143
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ goomy_blob_params:
# Configuration place for the assertoor testing tool - https:#github.com/ethpandaops/assertoor
assertoor_params:
# Assertoor docker image to use
# Leave blank to use the default image according to your network params
image: ""
# Check chain stability
# This check monitors the chain and succeeds if:
# - all clients are synced
Expand Down
1 change: 1 addition & 0 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ def run(plan, args={}):
assertoor_config_template,
all_participants,
args_with_right_defaults.participants,
network_params,
assertoor_params,
)
plan.print("Successfully launched assertoor")
Expand Down
17 changes: 15 additions & 2 deletions src/assertoor/assertoor_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def launch_assertoor(
config_template,
participant_contexts,
participant_configs,
network_params,
assertoor_params,
):
all_client_info = []
Expand Down Expand Up @@ -88,18 +89,30 @@ def launch_assertoor(
config = get_config(
config_files_artifact_name,
tests_config_artifacts_name,
network_params,
assertoor_params,
)

plan.add_service(SERVICE_NAME, config)


def get_config(config_files_artifact_name, tests_config_artifacts_name):
def get_config(
config_files_artifact_name,
tests_config_artifacts_name,
network_params,
assertoor_params,
):
config_file_path = shared_utils.path_join(
ASSERTOOR_CONFIG_MOUNT_DIRPATH_ON_SERVICE,
ASSERTOOR_CONFIG_FILENAME,
)

IMAGE_NAME = "ethpandaops/assertoor:master"
if assertoor_params.image != "":
IMAGE_NAME = assertoor_params.image
elif network_params.electra_fork_epoch != None:
IMAGE_NAME = "ethpandaops/assertoor:verkle-support"
else:
IMAGE_NAME = "ethpandaops/assertoor:master"

return ServiceConfig(
image=IMAGE_NAME,
Expand Down
2 changes: 2 additions & 0 deletions src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ def input_parser(plan, input_args):
goomy_blob_args=result["goomy_blob_params"]["goomy_blob_args"],
),
assertoor_params=struct(
image=result["assertoor_params"]["image"],
run_stability_check=result["assertoor_params"]["run_stability_check"],
run_block_proposal_check=result["assertoor_params"][
"run_block_proposal_check"
Expand Down Expand Up @@ -614,6 +615,7 @@ def get_default_goomy_blob_params():

def get_default_assertoor_params():
return {
"image": "",
"run_stability_check": True,
"run_block_proposal_check": True,
"run_lifecycle_test": False,
Expand Down

0 comments on commit 2d8a143

Please sign in to comment.