Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: get rid of explorer type #280

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,21 @@ To configure the package behaviour, you can modify your `network_params.json` fi
"launch_additional_services": true,

// By default includes
// - A transaction spammer is launched to fake transactions sent to the network
// - Forkmon will be launched after CL genesis has happened
// - A transaction spammer & blob spammer is launched to fake transactions sent to the network
// - Forkmon for EL & CL will be launched
// - A prometheus will be started, coupled with grafana
// - A beacon metrics gazer will be launched
// - A light beacon chain explorer will be launched
// - Default: ["tx_spammer", "blob_spammer", "cl_fork_mon", "el_forkmon", "beacon_metrics_gazer", "dora"," "prometheus_grafana"]
"additional_services": [
"tx_spammer",
"blob_spammer",
"goomy_blob"
"cl_forkmon",
"el_forkmon",
"beacon_metrics_gazer",
"explorer",
"dora",
"full_beaconchain_explorer",
"prometheus_grafana"
],

Expand Down
43 changes: 17 additions & 26 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -298,32 +298,23 @@ def run(plan, args={}):
beacon_metrics_gazer_prometheus_metrics_job
)
plan.print("Succesfully launched beacon metrics gazer")
elif additional_service == "explorer":
if args_with_right_defaults.explorer_version == "dora":
plan.print("Launching dora")
dora_config_template = read_file(
static_files.DORA_CONFIG_TEMPLATE_FILEPATH
)
dora.launch_dora(plan, dora_config_template, all_cl_client_contexts)
plan.print("Succesfully launched dora")
elif args_with_right_defaults.explorer_version == "full":
plan.print("Launching full-beaconchain-explorer")
full_beaconchain_explorer_config_template = read_file(
static_files.FULL_BEACONCHAIN_CONFIG_TEMPLATE_FILEPATH
)
full_beaconchain_explorer.launch_full_beacon(
plan,
full_beaconchain_explorer_config_template,
all_cl_client_contexts,
all_el_client_contexts,
)
plan.print("Succesfully launched full-beaconchain-explorer")
else:
fail(
"expected explorer_version to be one of (dora, full) but got {0} which is invalid".format(
args_with_right_defaults.explorer_version
)
)
elif additional_service == "dora":
plan.print("Launching dora")
dora_config_template = read_file(static_files.DORA_CONFIG_TEMPLATE_FILEPATH)
dora.launch_dora(plan, dora_config_template, all_cl_client_contexts)
plan.print("Succesfully launched dora")
elif additional_service == "full_beaconchain_explorer":
plan.print("Launching full-beaconchain-explorer")
full_beaconchain_explorer_config_template = read_file(
static_files.FULL_BEACONCHAIN_CONFIG_TEMPLATE_FILEPATH
)
full_beaconchain_explorer.launch_full_beacon(
plan,
full_beaconchain_explorer_config_template,
all_cl_client_contexts,
all_el_client_contexts,
)
plan.print("Succesfully launched full-beaconchain-explorer")
elif additional_service == "prometheus_grafana":
# Allow prometheus to be launched last so is able to collect metrics from other services
launch_prometheus_grafana = True
Expand Down
6 changes: 1 addition & 5 deletions src/package_io/parse_input.star
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ DEFAULT_ADDITIONAL_SERVICES = [
"cl_forkmon",
"el_forkmon",
"beacon_metrics_gazer",
"explorer",
"dora",
"prometheus_grafana",
]

Expand All @@ -46,8 +46,6 @@ ATTR_TO_BE_SKIPPED_AT_ROOT = (
"goomy_blob_params",
)

DEFAULT_EXPLORER_VERSION = "dora"

package_io_constants = import_module("../package_io/constants.star")

genesis_constants = import_module(
Expand All @@ -63,7 +61,6 @@ def parse_input(plan, input_args):
result["mev_params"] = get_default_mev_params()
result["launch_additional_services"] = True
result["additional_services"] = DEFAULT_ADDITIONAL_SERVICES
result["explorer_version"] = DEFAULT_EXPLORER_VERSION

for attr in input_args:
value = input_args[attr]
Expand Down Expand Up @@ -180,7 +177,6 @@ def parse_input(plan, input_args):
mev_type=result["mev_type"],
snooper_enabled=result["snooper_enabled"],
parallel_keystore_generation=result["parallel_keystore_generation"],
explorer_version=result["explorer_version"],
)


Expand Down