diff --git a/README.md b/README.md index 36704810c..4c152c47c 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ To configure the package behaviour, you can modify your `network_params.json` fi "cl_forkmon", "el_forkmon", "beacon_metrics_gazer", - "light_beaconchain_explorer", + "dora", "prometheus_grafana" ], diff --git a/main.star b/main.star index 143dc8e67..2ea8259b2 100644 --- a/main.star +++ b/main.star @@ -28,8 +28,8 @@ el_forkmon = import_module( beacon_metrics_gazer = import_module( "github.com/kurtosis-tech/ethereum-package/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star" ) -light_beaconchain_explorer = import_module( - "github.com/kurtosis-tech/ethereum-package/src/light_beaconchain/light_beaconchain_launcher.star" +dora = import_module( + "github.com/kurtosis-tech/ethereum-package/src/dora/dora_launcher.star" ) prometheus = import_module( "github.com/kurtosis-tech/ethereum-package/src/prometheus/prometheus_launcher.star" @@ -299,15 +299,11 @@ def run(plan, args={}): beacon_metrics_gazer_prometheus_metrics_job ) plan.print("Succesfully launched beacon metrics gazer") - elif additional_service == "light_beaconchain_explorer": - plan.print("Launching light-beaconchain-explorer") - light_beaconchain_explorer_config_template = read_file( - static_files.LIGHT_BEACONCHAIN_CONFIG_TEMPLATE_FILEPATH - ) - light_beaconchain_explorer.launch_light_beacon( - plan, light_beaconchain_explorer_config_template, all_cl_client_contexts - ) - plan.print("Succesfully light-beaconchain-explorer") + 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 == "prometheus_grafana": # Allow prometheus to be launched last so is able to collect metrics from other services launch_prometheus_grafana = True diff --git a/src/light_beaconchain/light_beaconchain_launcher.star b/src/dora/dora_launcher.star similarity index 78% rename from src/light_beaconchain/light_beaconchain_launcher.star rename to src/dora/dora_launcher.star index f49606925..960f3be28 100644 --- a/src/light_beaconchain/light_beaconchain_launcher.star +++ b/src/dora/dora_launcher.star @@ -3,15 +3,15 @@ shared_utils = import_module( ) -SERVICE_NAME = "light-beaconchain" +SERVICE_NAME = "dora" IMAGE_NAME = "ethpandaops/dora-the-explorer:master" HTTP_PORT_ID = "http" HTTP_PORT_NUMBER = 8080 -LIGHT_BEACONCHAIN_CONFIG_FILENAME = "light-beaconchain-config.yaml" +DORA_CONFIG_FILENAME = "dora-config.yaml" -LIGHT_BEACONCHAIN_CONFIG_MOUNT_DIRPATH_ON_SERVICE = "/config" +DORA_CONFIG_MOUNT_DIRPATH_ON_SERVICE = "/config" VALIDATOR_RANGES_MOUNT_DIRPATH_ON_SERVICE = "/validator-ranges" VALIDATOR_RANGES_ARTIFACT_NAME = "validator-ranges" @@ -29,7 +29,7 @@ USED_PORTS = { } -def launch_light_beacon( +def launch_dora( plan, config_template, cl_client_contexts, @@ -48,12 +48,10 @@ def launch_light_beacon( config_template, template_data ) template_and_data_by_rel_dest_filepath = {} - template_and_data_by_rel_dest_filepath[ - LIGHT_BEACONCHAIN_CONFIG_FILENAME - ] = template_and_data + template_and_data_by_rel_dest_filepath[DORA_CONFIG_FILENAME] = template_and_data config_files_artifact_name = plan.render_templates( - template_and_data_by_rel_dest_filepath, "light-beaconchain-config" + template_and_data_by_rel_dest_filepath, "dora-config" ) config = get_config(config_files_artifact_name) @@ -63,14 +61,14 @@ def launch_light_beacon( def get_config(config_files_artifact_name): config_file_path = shared_utils.path_join( - LIGHT_BEACONCHAIN_CONFIG_MOUNT_DIRPATH_ON_SERVICE, - LIGHT_BEACONCHAIN_CONFIG_FILENAME, + DORA_CONFIG_MOUNT_DIRPATH_ON_SERVICE, + DORA_CONFIG_FILENAME, ) return ServiceConfig( image=IMAGE_NAME, ports=USED_PORTS, files={ - LIGHT_BEACONCHAIN_CONFIG_MOUNT_DIRPATH_ON_SERVICE: config_files_artifact_name, + DORA_CONFIG_MOUNT_DIRPATH_ON_SERVICE: config_files_artifact_name, VALIDATOR_RANGES_MOUNT_DIRPATH_ON_SERVICE: VALIDATOR_RANGES_ARTIFACT_NAME, CL_CONFIG_MOUNT_DIRPATH_ON_SERVICE: CL_CONFIG_ARTIFACT_NAME, }, diff --git a/src/package_io/parse_input.star b/src/package_io/parse_input.star index 7474c01f7..e016c3120 100644 --- a/src/package_io/parse_input.star +++ b/src/package_io/parse_input.star @@ -33,7 +33,7 @@ DEFAULT_ADDITIONAL_SERVICES = [ "cl_forkmon", "el_forkmon", "beacon_metrics_gazer", - "light_beaconchain_explorer", + "dora", "prometheus_grafana", ] diff --git a/src/static_files/static_files.star b/src/static_files/static_files.star index d13377cca..9a2252ce5 100644 --- a/src/static_files/static_files.star +++ b/src/static_files/static_files.star @@ -21,9 +21,7 @@ BEACON_METRICS_GAZER_CONFIG_TEMPLATE_FILEPATH = ( STATIC_FILES_DIRPATH + "/beacon-metrics-gazer-config/config.yaml.tmpl" ) -LIGHT_BEACONCHAIN_CONFIG_TEMPLATE_FILEPATH = ( - STATIC_FILES_DIRPATH + "/light-beaconchain-config/config.yaml.tmpl" -) +DORA_CONFIG_TEMPLATE_FILEPATH = STATIC_FILES_DIRPATH + "/dora-config/config.yaml.tmpl" # Grafana config GRAFANA_CONFIG_DIRPATH = "/grafana-config" diff --git a/static_files/light-beaconchain-config/config.yaml.tmpl b/static_files/dora-config/config.yaml.tmpl similarity index 80% rename from static_files/light-beaconchain-config/config.yaml.tmpl rename to static_files/dora-config/config.yaml.tmpl index 1b63681ab..5157d1b3d 100644 --- a/static_files/light-beaconchain-config/config.yaml.tmpl +++ b/static_files/dora-config/config.yaml.tmpl @@ -1,10 +1,6 @@ logging: outputLevel: "info" - #outputStderr: false - - #filePath: "explorer.log" - #fileLevel: "warn" # Chain network configuration chain: @@ -23,7 +19,7 @@ frontend: minimize: false # minimize html templates # Name of the site, displayed in the title tag - siteName: "Beaconchain Light" + siteName: "Dora the Explorer" siteSubtitle: "Kurtosis Testnet" # link to EL Explorer @@ -41,7 +37,7 @@ beaconapi: archive: true {{- end }} # local cache for page models - localCacheSize: 100 # 100MB + localCacheSize: 10 # 10MB # remote cache for page models redisCacheAddr: "" @@ -49,23 +45,19 @@ beaconapi: # indexer keeps track of the latest epochs in memory. indexer: - # number of epochs to load on startup - prepopulateEpochs: 2 - # max number of epochs to keep in memory - inMemoryEpochs: 3 + inMemoryEpochs: 8 - # epoch processing delay (should be >= 2) - epochProcessingDelay: 2 + # number of epochs to wait before storing unfinalized blocks to db + cachePersistenceDelay: 8 # disable synchronizing and everything that writes to the db (indexer just maintains local cache) disableIndexWriter: false # number of seconds to wait between each epoch (don't overload CL client) - syncEpochCooldown: 2 - + syncEpochCooldown: 1 database: engine: "sqlite" sqlite: - file: ":memory:" + file: "/dora-database.sqlite"