Commit d3a4b495 authored by pk910's avatar pk910 Committed by GitHub

fix: rename light-beaconchain-explorer to dora-the-explorer & change db location (#243)

The lightweight beaconchain explorer was renamed to `dora` (Dora the
Explorer).
This PR renames all explorer related variables & references accordingly.

I've also changed the explorer db path to a local file instead of the
`:memory:` placeholder.
The in-memory database caused issues as the content is being wiped when
all db connections are being closed.
I've just used `/dora-database.sqlite` as path. Maybe some of you can
give feedback if that's the right location for it :)

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