Commit 9bf99793 authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

refactor: rename some module names (#313)

parent c46b6bf1
parse_input = import_module("./src/package_io/parse_input.star") input_parser = import_module("./src/package_io/input_parser.star")
constants = import_module("./src/package_io/constants.star") constants = import_module("./src/package_io/constants.star")
participant_network = import_module("./src/participant_network.star") participant_network = import_module("./src/participant_network.star")
static_files = import_module("./src/static_files/static_files.star") static_files = import_module("./src/static_files/static_files.star")
...@@ -27,14 +26,14 @@ full_beaconchain_explorer = import_module( ...@@ -27,14 +26,14 @@ full_beaconchain_explorer = import_module(
) )
prometheus = import_module("./src/prometheus/prometheus_launcher.star") prometheus = import_module("./src/prometheus/prometheus_launcher.star")
grafana = import_module("./src/grafana/grafana_launcher.star") grafana = import_module("./src/grafana/grafana_launcher.star")
mev_boost_launcher_module = import_module("./src/mev_boost/mev_boost_launcher.star") mev_boost = import_module("./src/mev_boost/mev_boost_launcher.star")
mock_mev_launcher_module = import_module("./src/mock_mev/mock_mev_launcher.star") mock_mev = import_module("./src/mock_mev/mock_mev_launcher.star")
mev_relay_launcher_module = import_module("./src/mev_relay/mev_relay_launcher.star") mev_relay = import_module("./src/mev_relay/mev_relay_launcher.star")
mev_flood_module = import_module("./src/mev_flood/mev_flood_launcher.star") mev_flood = import_module("./src/mev_flood/mev_flood_launcher.star")
mev_custom_flood_module = import_module( mev_custom_flood = import_module(
"./src/mev_custom_flood/mev_custom_flood_launcher.star" "./src/mev_custom_flood/mev_custom_flood_launcher.star"
) )
eip4788_deployment_module = import_module( eip4788_deployment = import_module(
"./src/eip4788_deployment/eip4788_deployment_launcher.star" "./src/eip4788_deployment/eip4788_deployment_launcher.star"
) )
GRAFANA_USER = "admin" GRAFANA_USER = "admin"
...@@ -51,7 +50,7 @@ PATH_TO_PARSED_BEACON_STATE = "/genesis/output/parsedBeaconState.json" ...@@ -51,7 +50,7 @@ PATH_TO_PARSED_BEACON_STATE = "/genesis/output/parsedBeaconState.json"
def run(plan, args={}): def run(plan, args={}):
args_with_right_defaults = parse_input.parse_input(plan, args) args_with_right_defaults = input_parser.input_parser(plan, args)
num_participants = len(args_with_right_defaults.participants) num_participants = len(args_with_right_defaults.participants)
network_params = args_with_right_defaults.network_params network_params = args_with_right_defaults.network_params
...@@ -118,7 +117,7 @@ def run(plan, args={}): ...@@ -118,7 +117,7 @@ def run(plan, args={}):
el_uri = "http://{0}:{1}".format( el_uri = "http://{0}:{1}".format(
all_el_client_contexts[0].ip_addr, all_el_client_contexts[0].rpc_port_num all_el_client_contexts[0].ip_addr, all_el_client_contexts[0].rpc_port_num
) )
eip4788_deployment_module.deploy_eip4788_contract_in_background( eip4788_deployment.deploy_eip4788_contract_in_background(
plan, plan,
genesis_constants.PRE_FUNDED_ACCOUNTS[5].private_key, genesis_constants.PRE_FUNDED_ACCOUNTS[5].private_key,
el_uri, el_uri,
...@@ -150,7 +149,7 @@ def run(plan, args={}): ...@@ -150,7 +149,7 @@ def run(plan, args={}):
files={"/data": el_cl_data_files_artifact_uuid}, files={"/data": el_cl_data_files_artifact_uuid},
wait=None, wait=None,
) )
endpoint = mock_mev_launcher_module.launch_mock_mev( endpoint = mock_mev.launch_mock_mev(
plan, plan,
el_uri, el_uri,
beacon_uri, beacon_uri,
...@@ -177,7 +176,7 @@ def run(plan, args={}): ...@@ -177,7 +176,7 @@ def run(plan, args={}):
first_cl_client = all_cl_client_contexts[0] first_cl_client = all_cl_client_contexts[0]
first_client_beacon_name = first_cl_client.beacon_service_name first_client_beacon_name = first_cl_client.beacon_service_name
mev_flood_module.launch_mev_flood( mev_flood.launch_mev_flood(
plan, plan,
mev_params.mev_flood_image, mev_params.mev_flood_image,
el_uri, el_uri,
...@@ -196,7 +195,7 @@ def run(plan, args={}): ...@@ -196,7 +195,7 @@ def run(plan, args={}):
timeout="20m", timeout="20m",
service_name=first_client_beacon_name, service_name=first_client_beacon_name,
) )
endpoint = mev_relay_launcher_module.launch_mev_relay( endpoint = mev_relay.launch_mev_relay(
plan, plan,
mev_params, mev_params,
network_params.network_id, network_params.network_id,
...@@ -205,7 +204,7 @@ def run(plan, args={}): ...@@ -205,7 +204,7 @@ def run(plan, args={}):
builder_uri, builder_uri,
network_params.seconds_per_slot, network_params.seconds_per_slot,
) )
mev_flood_module.spam_in_background( mev_flood.spam_in_background(
plan, plan,
el_uri, el_uri,
mev_params.mev_flood_extra_args, mev_params.mev_flood_extra_args,
...@@ -219,13 +218,13 @@ def run(plan, args={}): ...@@ -219,13 +218,13 @@ def run(plan, args={}):
if mev_endpoints: if mev_endpoints:
for index, participant in enumerate(all_participants): for index, participant in enumerate(all_participants):
if args_with_right_defaults.participants[index].validator_count != 0: if args_with_right_defaults.participants[index].validator_count != 0:
mev_boost_launcher = mev_boost_launcher_module.new_mev_boost_launcher( mev_boost_launcher = mev_boost.new_mev_boost_launcher(
MEV_BOOST_SHOULD_CHECK_RELAY, mev_endpoints MEV_BOOST_SHOULD_CHECK_RELAY, mev_endpoints
) )
mev_boost_service_name = "{0}{1}".format( mev_boost_service_name = "{0}{1}".format(
parse_input.MEV_BOOST_SERVICE_NAME_PREFIX, index input_parser.MEV_BOOST_SERVICE_NAME_PREFIX, index
) )
mev_boost_context = mev_boost_launcher_module.launch( mev_boost_context = mev_boost.launch(
plan, plan,
mev_boost_launcher, mev_boost_launcher,
mev_boost_service_name, mev_boost_service_name,
...@@ -330,7 +329,7 @@ def run(plan, args={}): ...@@ -330,7 +329,7 @@ def run(plan, args={}):
# 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
elif additional_service == "custom_flood": elif additional_service == "custom_flood":
mev_custom_flood_module.spam_in_background( mev_custom_flood.spam_in_background(
plan, plan,
genesis_constants.PRE_FUNDED_ACCOUNTS[-1].private_key, genesis_constants.PRE_FUNDED_ACCOUNTS[-1].private_key,
genesis_constants.PRE_FUNDED_ACCOUNTS[0].address, genesis_constants.PRE_FUNDED_ACCOUNTS[0].address,
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
cl_client_context = import_module("../../cl/cl_client_context.star") cl_client_context = import_module("../../cl/cl_client_context.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
LIGHTHOUSE_BINARY_COMMAND = "lighthouse" LIGHTHOUSE_BINARY_COMMAND = "lighthouse"
...@@ -84,11 +85,11 @@ VALIDATOR_USED_PORTS = { ...@@ -84,11 +85,11 @@ VALIDATOR_USED_PORTS = {
} }
LIGHTHOUSE_LOG_LEVELS = { LIGHTHOUSE_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "error", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "error",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "info", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "info",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace",
} }
...@@ -266,7 +267,7 @@ def get_beacon_config( ...@@ -266,7 +267,7 @@ def get_beacon_config(
"beacon_node", "beacon_node",
"--debug-level=" + log_level, "--debug-level=" + log_level,
"--datadir=" + CONSENSUS_DATA_DIRPATH_ON_BEACON_SERVICE_CONTAINER, "--datadir=" + CONSENSUS_DATA_DIRPATH_ON_BEACON_SERVICE_CONTAINER,
"--testnet-dir=" + package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER, "--testnet-dir=" + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER,
# vvvvvvvvvvvvvvvvvvv REMOVE THESE WHEN CONNECTING TO EXTERNAL NET vvvvvvvvvvvvvvvvvvvvv # vvvvvvvvvvvvvvvvvvv REMOVE THESE WHEN CONNECTING TO EXTERNAL NET vvvvvvvvvvvvvvvvvvvvv
"--disable-enr-auto-update", "--disable-enr-auto-update",
"--enr-address=" + PRIVATE_IP_ADDRESS_PLACEHOLDER, "--enr-address=" + PRIVATE_IP_ADDRESS_PLACEHOLDER,
...@@ -281,14 +282,14 @@ def get_beacon_config( ...@@ -281,14 +282,14 @@ def get_beacon_config(
"--http-address=0.0.0.0", "--http-address=0.0.0.0",
"--http-port={0}".format(BEACON_HTTP_PORT_NUM), "--http-port={0}".format(BEACON_HTTP_PORT_NUM),
"--http-allow-sync-stalled", "--http-allow-sync-stalled",
"--slots-per-restore-point={0}".format(32 if package_io.ARCHIVE_MODE else 8192), "--slots-per-restore-point={0}".format(32 if constants.ARCHIVE_MODE else 8192),
# NOTE: This comes from: # NOTE: This comes from:
# https://github.com/sigp/lighthouse/blob/7c88f582d955537f7ffff9b2c879dcf5bf80ce13/scripts/local_testnet/beacon_node.sh # https://github.com/sigp/lighthouse/blob/7c88f582d955537f7ffff9b2c879dcf5bf80ce13/scripts/local_testnet/beacon_node.sh
# and the option says it's "useful for testing in smaller networks" (unclear what happens in larger networks) # and the option says it's "useful for testing in smaller networks" (unclear what happens in larger networks)
"--disable-packet-filter", "--disable-packet-filter",
"--execution-endpoints=" + EXECUTION_ENGINE_ENDPOINT, "--execution-endpoints=" + EXECUTION_ENGINE_ENDPOINT,
"--jwt-secrets=" + package_io.JWT_AUTH_PATH, "--jwt-secrets=" + constants.JWT_AUTH_PATH,
"--suggested-fee-recipient=" + package_io.VALIDATING_REWARDS_ACCOUNT, "--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT,
# Set per Paris' recommendation to reduce noise in the logs # Set per Paris' recommendation to reduce noise in the logs
"--subscribe-all-subnets", "--subscribe-all-subnets",
# vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv # vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv
...@@ -303,7 +304,7 @@ def get_beacon_config( ...@@ -303,7 +304,7 @@ def get_beacon_config(
cmd.append( cmd.append(
"--boot-nodes=" "--boot-nodes="
+ ",".join( + ",".join(
[ctx.enr for ctx in boot_cl_client_ctxs[: package_io.MAX_ENR_ENTRIES]] [ctx.enr for ctx in boot_cl_client_ctxs[: constants.MAX_ENR_ENTRIES]]
) )
) )
cmd.append( cmd.append(
...@@ -311,7 +312,7 @@ def get_beacon_config( ...@@ -311,7 +312,7 @@ def get_beacon_config(
+ ",".join( + ",".join(
[ [
ctx.peer_id ctx.peer_id
for ctx in boot_cl_client_ctxs[: package_io.MAX_ENR_ENTRIES] for ctx in boot_cl_client_ctxs[: constants.MAX_ENR_ENTRIES]
] ]
) )
) )
...@@ -324,24 +325,18 @@ def get_beacon_config( ...@@ -324,24 +325,18 @@ def get_beacon_config(
endpoint="/eth/v1/node/identity", port_id=BEACON_HTTP_PORT_ID endpoint="/eth/v1/node/identity", port_id=BEACON_HTTP_PORT_ID
) )
ready_conditions = ReadyCondition(
recipe=recipe,
field="code",
assertion="IN",
target_value=[200, 206],
timeout="15m",
)
return ServiceConfig( return ServiceConfig(
image=image, image=image,
ports=BEACON_USED_PORTS, ports=BEACON_USED_PORTS,
cmd=cmd, cmd=cmd,
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid
}, },
env_vars={RUST_BACKTRACE_ENVVAR_NAME: RUST_FULL_BACKTRACE_KEYWORD}, env_vars={RUST_BACKTRACE_ENVVAR_NAME: RUST_FULL_BACKTRACE_KEYWORD},
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
ready_conditions=ready_conditions, ready_conditions=cl_node_ready_conditions.get_ready_conditions(
BEACON_HTTP_PORT_ID
),
min_cpu=bn_min_cpu, min_cpu=bn_min_cpu,
max_cpu=bn_max_cpu, max_cpu=bn_max_cpu,
min_memory=bn_min_mem, min_memory=bn_min_mem,
...@@ -374,7 +369,7 @@ def get_validator_config( ...@@ -374,7 +369,7 @@ def get_validator_config(
"lighthouse", "lighthouse",
"validator_client", "validator_client",
"--debug-level=" + log_level, "--debug-level=" + log_level,
"--testnet-dir=" + package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER, "--testnet-dir=" + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER,
"--validators-dir=" + validator_keys_dirpath, "--validators-dir=" + validator_keys_dirpath,
# NOTE: When secrets-dir is specified, we can't add the --data-dir flag # NOTE: When secrets-dir is specified, we can't add the --data-dir flag
"--secrets-dir=" + validator_secrets_dirpath, "--secrets-dir=" + validator_secrets_dirpath,
...@@ -387,7 +382,7 @@ def get_validator_config( ...@@ -387,7 +382,7 @@ def get_validator_config(
"--beacon-nodes=" + beacon_client_http_url, "--beacon-nodes=" + beacon_client_http_url,
# "--enable-doppelganger-protection", // Disabled to not have to wait 2 epochs before validator can start # "--enable-doppelganger-protection", // Disabled to not have to wait 2 epochs before validator can start
# burn address - If unset, the validator will scream in its logs # burn address - If unset, the validator will scream in its logs
"--suggested-fee-recipient=" + package_io.VALIDATING_REWARDS_ACCOUNT, "--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT,
# vvvvvvvvvvvvvvvvvvv PROMETHEUS CONFIG vvvvvvvvvvvvvvvvvvvvv # vvvvvvvvvvvvvvvvvvv PROMETHEUS CONFIG vvvvvvvvvvvvvvvvvvvvv
"--metrics", "--metrics",
"--metrics-address=0.0.0.0", "--metrics-address=0.0.0.0",
...@@ -404,7 +399,7 @@ def get_validator_config( ...@@ -404,7 +399,7 @@ def get_validator_config(
ports=VALIDATOR_USED_PORTS, ports=VALIDATOR_USED_PORTS,
cmd=cmd, cmd=cmd,
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
VALIDATOR_KEYS_MOUNTPOINT_ON_CLIENTS: node_keystore_files.files_artifact_uuid, VALIDATOR_KEYS_MOUNTPOINT_ON_CLIENTS: node_keystore_files.files_artifact_uuid,
}, },
env_vars={RUST_BACKTRACE_ENVVAR_NAME: RUST_FULL_BACKTRACE_KEYWORD}, env_vars={RUST_BACKTRACE_ENVVAR_NAME: RUST_FULL_BACKTRACE_KEYWORD},
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
cl_client_context = import_module("../../cl/cl_client_context.star") cl_client_context = import_module("../../cl/cl_client_context.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star") cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
# ---------------------------------- Beacon client ------------------------------------- # ---------------------------------- Beacon client -------------------------------------
CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/consensus-data" CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/consensus-data"
...@@ -61,11 +61,11 @@ VALIDATOR_USED_PORTS = { ...@@ -61,11 +61,11 @@ VALIDATOR_USED_PORTS = {
LODESTAR_LOG_LEVELS = { LODESTAR_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "error", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "error",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "info", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "info",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace",
} }
...@@ -232,10 +232,10 @@ def get_beacon_config( ...@@ -232,10 +232,10 @@ def get_beacon_config(
"--discoveryPort={0}".format(DISCOVERY_PORT_NUM), "--discoveryPort={0}".format(DISCOVERY_PORT_NUM),
"--dataDir=" + CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER, "--dataDir=" + CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER,
"--paramsFile=" "--paramsFile="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/config.yaml", + "/config.yaml",
"--genesisStateFile=" "--genesisStateFile="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/genesis.ssz", + "/genesis.ssz",
"--eth1.depositContractDeployBlock=0", "--eth1.depositContractDeployBlock=0",
"--network.connectToDiscv5Bootnodes=true", "--network.connectToDiscv5Bootnodes=true",
...@@ -253,7 +253,7 @@ def get_beacon_config( ...@@ -253,7 +253,7 @@ def get_beacon_config(
"--enr.udp={0}".format(DISCOVERY_PORT_NUM), "--enr.udp={0}".format(DISCOVERY_PORT_NUM),
# Set per Pari's recommendation to reduce noise in the logs # Set per Pari's recommendation to reduce noise in the logs
"--subscribeAllSubnets=true", "--subscribeAllSubnets=true",
"--jwt-secret=" + package_io.JWT_AUTH_PATH, "--jwt-secret=" + constants.JWT_AUTH_PATH,
# vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv # vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv
"--metrics", "--metrics",
"--metrics.address=0.0.0.0", "--metrics.address=0.0.0.0",
...@@ -265,7 +265,7 @@ def get_beacon_config( ...@@ -265,7 +265,7 @@ def get_beacon_config(
cmd.append( cmd.append(
"--bootnodes=" "--bootnodes="
+ ",".join( + ",".join(
[ctx.enr for ctx in bootnode_contexts[: package_io.MAX_ENR_ENTRIES]] [ctx.enr for ctx in bootnode_contexts[: constants.MAX_ENR_ENTRIES]]
) )
) )
...@@ -278,7 +278,7 @@ def get_beacon_config( ...@@ -278,7 +278,7 @@ def get_beacon_config(
ports=BEACON_USED_PORTS, ports=BEACON_USED_PORTS,
cmd=cmd, cmd=cmd,
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid
}, },
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
ready_conditions=cl_node_ready_conditions.get_ready_conditions(HTTP_PORT_ID), ready_conditions=cl_node_ready_conditions.get_ready_conditions(HTTP_PORT_ID),
...@@ -321,12 +321,12 @@ def get_validator_config( ...@@ -321,12 +321,12 @@ def get_validator_config(
"--logLevel=" + log_level, "--logLevel=" + log_level,
"--dataDir=" + root_dirpath, "--dataDir=" + root_dirpath,
"--paramsFile=" "--paramsFile="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/config.yaml", + "/config.yaml",
"--beaconNodes=" + beacon_client_http_url, "--beaconNodes=" + beacon_client_http_url,
"--keystoresDir=" + validator_keys_dirpath, "--keystoresDir=" + validator_keys_dirpath,
"--secretsDir=" + validator_secrets_dirpath, "--secretsDir=" + validator_secrets_dirpath,
"--suggestedFeeRecipient=" + package_io.VALIDATING_REWARDS_ACCOUNT, "--suggestedFeeRecipient=" + constants.VALIDATING_REWARDS_ACCOUNT,
# vvvvvvvvvvvvvvvvvvv PROMETHEUS CONFIG vvvvvvvvvvvvvvvvvvvvv # vvvvvvvvvvvvvvvvvvv PROMETHEUS CONFIG vvvvvvvvvvvvvvvvvvvvv
"--metrics", "--metrics",
"--metrics.address=0.0.0.0", "--metrics.address=0.0.0.0",
...@@ -343,7 +343,7 @@ def get_validator_config( ...@@ -343,7 +343,7 @@ def get_validator_config(
ports=VALIDATOR_USED_PORTS, ports=VALIDATOR_USED_PORTS,
cmd=cmd, cmd=cmd,
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
VALIDATOR_KEYS_MOUNT_DIRPATH_ON_SERVICE_CONTAINER: node_keystore_files.files_artifact_uuid, VALIDATOR_KEYS_MOUNT_DIRPATH_ON_SERVICE_CONTAINER: node_keystore_files.files_artifact_uuid,
}, },
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
cl_client_context = import_module("../../cl/cl_client_context.star") cl_client_context = import_module("../../cl/cl_client_context.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star") cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
VALIDATOR_KEYS_MOUNTPOINT_ON_CLIENT = "/validator-keys" VALIDATOR_KEYS_MOUNTPOINT_ON_CLIENT = "/validator-keys"
...@@ -61,11 +61,11 @@ USED_PORTS = { ...@@ -61,11 +61,11 @@ USED_PORTS = {
} }
NIMBUS_LOG_LEVELS = { NIMBUS_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE",
} }
ENTRYPOINT_ARGS = ["sh", "-c"] ENTRYPOINT_ARGS = ["sh", "-c"]
...@@ -239,7 +239,7 @@ def get_config( ...@@ -239,7 +239,7 @@ def get_config(
validator_flags = [ validator_flags = [
"--validators-dir=" + VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER, "--validators-dir=" + VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
"--secrets-dir=" + VALIDATOR_SECRETS_DIRPATH_ON_SERVICE_CONTAINER, "--secrets-dir=" + VALIDATOR_SECRETS_DIRPATH_ON_SERVICE_CONTAINER,
"--suggested-fee-recipient=" + package_io.VALIDATING_REWARDS_ACCOUNT, "--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT,
] ]
beacon_start = [ beacon_start = [
...@@ -248,12 +248,12 @@ def get_config( ...@@ -248,12 +248,12 @@ def get_config(
"--log-level=" + log_level, "--log-level=" + log_level,
"--udp-port={0}".format(DISCOVERY_PORT_NUM), "--udp-port={0}".format(DISCOVERY_PORT_NUM),
"--tcp-port={0}".format(DISCOVERY_PORT_NUM), "--tcp-port={0}".format(DISCOVERY_PORT_NUM),
"--network=" + package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER, "--network=" + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER,
"--data-dir=" + CONSENSUS_DATA_DIRPATH_IN_SERVICE_CONTAINER, "--data-dir=" + CONSENSUS_DATA_DIRPATH_IN_SERVICE_CONTAINER,
"--web3-url=" + EXECUTION_ENGINE_ENDPOINT, "--web3-url=" + EXECUTION_ENGINE_ENDPOINT,
"--nat=extip:" + PRIVATE_IP_ADDRESS_PLACEHOLDER, "--nat=extip:" + PRIVATE_IP_ADDRESS_PLACEHOLDER,
"--enr-auto-update=false", "--enr-auto-update=false",
"--history={0}".format("archive" if package_io.ARCHIVE_MODE else "prune"), "--history={0}".format("archive" if constants.ARCHIVE_MODE else "prune"),
"--rest", "--rest",
"--rest-address=0.0.0.0", "--rest-address=0.0.0.0",
"--rest-allow-origin=*", "--rest-allow-origin=*",
...@@ -266,7 +266,7 @@ def get_config( ...@@ -266,7 +266,7 @@ def get_config(
"--subscribe-all-subnets=true", "--subscribe-all-subnets=true",
# Nimbus can handle a max of 256 threads, if the host has more then nimbus crashes. Setting it to 4 so it doesn't crash on build servers # Nimbus can handle a max of 256 threads, if the host has more then nimbus crashes. Setting it to 4 so it doesn't crash on build servers
"--num-threads=4", "--num-threads=4",
"--jwt-secret=" + package_io.JWT_AUTH_PATH, "--jwt-secret=" + constants.JWT_AUTH_PATH,
# vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv # vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv
"--metrics", "--metrics",
"--metrics-address=0.0.0.0", "--metrics-address=0.0.0.0",
...@@ -288,7 +288,7 @@ def get_config( ...@@ -288,7 +288,7 @@ def get_config(
# See explanation there # See explanation there
cmd.append("--subscribe-all-subnets") cmd.append("--subscribe-all-subnets")
else: else:
for ctx in bootnode_contexts[: package_io.MAX_ENR_ENTRIES]: for ctx in bootnode_contexts[: constants.MAX_ENR_ENTRIES]:
cmd.append("--bootstrap-node=" + ctx.enr) cmd.append("--bootstrap-node=" + ctx.enr)
cmd.append("--direct-peer=" + ctx.multiaddr) cmd.append("--direct-peer=" + ctx.multiaddr)
...@@ -296,7 +296,7 @@ def get_config( ...@@ -296,7 +296,7 @@ def get_config(
cmd.extend([param for param in extra_params]) cmd.extend([param for param in extra_params])
files = { files = {
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
} }
if node_keystore_files: if node_keystore_files:
files[ files[
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
cl_client_context = import_module("../../cl/cl_client_context.star") cl_client_context = import_module("../../cl/cl_client_context.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star") cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
IMAGE_SEPARATOR_DELIMITER = "," IMAGE_SEPARATOR_DELIMITER = ","
EXPECTED_NUM_IMAGES = 2 EXPECTED_NUM_IMAGES = 2
...@@ -74,11 +74,11 @@ VALIDATOR_NODE_USED_PORTS = { ...@@ -74,11 +74,11 @@ VALIDATOR_NODE_USED_PORTS = {
} }
PRYSM_LOG_LEVELS = { PRYSM_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "error", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "error",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "info", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "info",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace",
} }
...@@ -264,10 +264,10 @@ def get_beacon_config( ...@@ -264,10 +264,10 @@ def get_beacon_config(
"--accept-terms-of-use=true", # it's mandatory in order to run the node "--accept-terms-of-use=true", # it's mandatory in order to run the node
"--datadir=" + CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER, "--datadir=" + CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER,
"--chain-config-file=" "--chain-config-file="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/config.yaml", + "/config.yaml",
"--genesis-state=" "--genesis-state="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/genesis.ssz", + "/genesis.ssz",
"--execution-endpoint=" + EXECUTION_ENGINE_ENDPOINT, "--execution-endpoint=" + EXECUTION_ENGINE_ENDPOINT,
"--rpc-host=0.0.0.0", "--rpc-host=0.0.0.0",
...@@ -280,11 +280,11 @@ def get_beacon_config( ...@@ -280,11 +280,11 @@ def get_beacon_config(
"--p2p-udp-port={0}".format(DISCOVERY_UDP_PORT_NUM), "--p2p-udp-port={0}".format(DISCOVERY_UDP_PORT_NUM),
"--min-sync-peers={0}".format(MIN_PEERS), "--min-sync-peers={0}".format(MIN_PEERS),
"--verbosity=" + log_level, "--verbosity=" + log_level,
"--slots-per-archive-point={0}".format(32 if package_io.ARCHIVE_MODE else 8192), "--slots-per-archive-point={0}".format(32 if constants.ARCHIVE_MODE else 8192),
"--suggested-fee-recipient=" + package_io.VALIDATING_REWARDS_ACCOUNT, "--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT,
# Set per Pari's recommendation to reduce noise # Set per Pari's recommendation to reduce noise
"--subscribe-all-subnets=true", "--subscribe-all-subnets=true",
"--jwt-secret=" + package_io.JWT_AUTH_PATH, "--jwt-secret=" + constants.JWT_AUTH_PATH,
# vvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv # vvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv
"--disable-monitoring=false", "--disable-monitoring=false",
"--monitoring-host=0.0.0.0", "--monitoring-host=0.0.0.0",
...@@ -293,7 +293,7 @@ def get_beacon_config( ...@@ -293,7 +293,7 @@ def get_beacon_config(
] ]
if bootnode_contexts != None: if bootnode_contexts != None:
for ctx in bootnode_contexts[: package_io.MAX_ENR_ENTRIES]: for ctx in bootnode_contexts[: constants.MAX_ENR_ENTRIES]:
cmd.append("--peer=" + ctx.multiaddr) cmd.append("--peer=" + ctx.multiaddr)
cmd.append("--bootstrap-node=" + ctx.enr) cmd.append("--bootstrap-node=" + ctx.enr)
cmd.append("--p2p-static-id=true") cmd.append("--p2p-static-id=true")
...@@ -307,7 +307,7 @@ def get_beacon_config( ...@@ -307,7 +307,7 @@ def get_beacon_config(
ports=BEACON_NODE_USED_PORTS, ports=BEACON_NODE_USED_PORTS,
cmd=cmd, cmd=cmd,
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
}, },
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
ready_conditions=cl_node_ready_conditions.get_ready_conditions(HTTP_PORT_ID), ready_conditions=cl_node_ready_conditions.get_ready_conditions(HTTP_PORT_ID),
...@@ -346,7 +346,7 @@ def get_validator_config( ...@@ -346,7 +346,7 @@ def get_validator_config(
cmd = [ cmd = [
"--accept-terms-of-use=true", # it's mandatory in order to run the node "--accept-terms-of-use=true", # it's mandatory in order to run the node
"--chain-config-file=" "--chain-config-file="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/config.yaml", + "/config.yaml",
"--beacon-rpc-gateway-provider=" + beacon_http_endpoint, "--beacon-rpc-gateway-provider=" + beacon_http_endpoint,
"--beacon-rpc-provider=" + beacon_rpc_endpoint, "--beacon-rpc-provider=" + beacon_rpc_endpoint,
...@@ -355,7 +355,7 @@ def get_validator_config( ...@@ -355,7 +355,7 @@ def get_validator_config(
"--datadir=" + CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER, "--datadir=" + CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER,
"--monitoring-port={0}".format(VALIDATOR_MONITORING_PORT_NUM), "--monitoring-port={0}".format(VALIDATOR_MONITORING_PORT_NUM),
"--verbosity=" + log_level, "--verbosity=" + log_level,
"--suggested-fee-recipient=" + package_io.VALIDATING_REWARDS_ACCOUNT, "--suggested-fee-recipient=" + constants.VALIDATING_REWARDS_ACCOUNT,
# TODO(old) SOMETHING ABOUT JWT # TODO(old) SOMETHING ABOUT JWT
# vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv # vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv
"--disable-monitoring=false", "--disable-monitoring=false",
...@@ -373,7 +373,7 @@ def get_validator_config( ...@@ -373,7 +373,7 @@ def get_validator_config(
ports=VALIDATOR_NODE_USED_PORTS, ports=VALIDATOR_NODE_USED_PORTS,
cmd=cmd, cmd=cmd,
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
VALIDATOR_KEYS_MOUNT_DIRPATH_ON_SERVICE_CONTAINER: node_keystore_files.files_artifact_uuid, VALIDATOR_KEYS_MOUNT_DIRPATH_ON_SERVICE_CONTAINER: node_keystore_files.files_artifact_uuid,
PRYSM_PASSWORD_MOUNT_DIRPATH_ON_SERVICE_CONTAINER: prysm_password_artifact_uuid, PRYSM_PASSWORD_MOUNT_DIRPATH_ON_SERVICE_CONTAINER: prysm_password_artifact_uuid,
}, },
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
cl_client_context = import_module("../../cl/cl_client_context.star") cl_client_context = import_module("../../cl/cl_client_context.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star") cl_node_ready_conditions = import_module("../../cl/cl_node_ready_conditions.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
TEKU_BINARY_FILEPATH_IN_IMAGE = "/opt/teku/bin/teku" TEKU_BINARY_FILEPATH_IN_IMAGE = "/opt/teku/bin/teku"
...@@ -65,11 +65,11 @@ ENTRYPOINT_ARGS = ["sh", "-c"] ...@@ -65,11 +65,11 @@ ENTRYPOINT_ARGS = ["sh", "-c"]
TEKU_LOG_LEVELS = { TEKU_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE",
} }
...@@ -230,21 +230,21 @@ def get_config( ...@@ -230,21 +230,21 @@ def get_config(
DEST_VALIDATOR_SECRETS_DIRPATH_IN_SERVICE_CONTAINER, DEST_VALIDATOR_SECRETS_DIRPATH_IN_SERVICE_CONTAINER,
), ),
"--validators-proposer-default-fee-recipient=" "--validators-proposer-default-fee-recipient="
+ package_io.VALIDATING_REWARDS_ACCOUNT, + constants.VALIDATING_REWARDS_ACCOUNT,
] ]
beacon_start = [ beacon_start = [
TEKU_BINARY_FILEPATH_IN_IMAGE, TEKU_BINARY_FILEPATH_IN_IMAGE,
"--logging=" + log_level, "--logging=" + log_level,
"--log-destination=CONSOLE", "--log-destination=CONSOLE",
"--network=" "--network="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/config.yaml", + "/config.yaml",
"--initial-state=" "--initial-state="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/genesis.ssz", + "/genesis.ssz",
"--data-path=" + CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER, "--data-path=" + CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER,
"--data-storage-mode={0}".format( "--data-storage-mode={0}".format(
"ARCHIVE" if package_io.ARCHIVE_MODE else "PRUNE" "ARCHIVE" if constants.ARCHIVE_MODE else "PRUNE"
), ),
"--p2p-enabled=true", "--p2p-enabled=true",
# Set per Pari's recommendation, to reduce noise in the logs # Set per Pari's recommendation, to reduce noise in the logs
...@@ -258,7 +258,7 @@ def get_config( ...@@ -258,7 +258,7 @@ def get_config(
"--rest-api-port={0}".format(HTTP_PORT_NUM), "--rest-api-port={0}".format(HTTP_PORT_NUM),
"--rest-api-host-allowlist=*", "--rest-api-host-allowlist=*",
"--data-storage-non-canonical-blocks-enabled=true", "--data-storage-non-canonical-blocks-enabled=true",
"--ee-jwt-secret-file=" + package_io.JWT_AUTH_PATH, "--ee-jwt-secret-file=" + constants.JWT_AUTH_PATH,
"--ee-endpoint=" + EXECUTION_ENGINE_ENDPOINT, "--ee-endpoint=" + EXECUTION_ENGINE_ENDPOINT,
# vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv # vvvvvvvvvvvvvvvvvvv METRICS CONFIG vvvvvvvvvvvvvvvvvvvvv
"--metrics-enabled", "--metrics-enabled",
...@@ -282,7 +282,7 @@ def get_config( ...@@ -282,7 +282,7 @@ def get_config(
cmd.append( cmd.append(
"--p2p-discovery-bootnodes=" "--p2p-discovery-bootnodes="
+ ",".join( + ",".join(
[ctx.enr for ctx in bootnode_contexts[: package_io.MAX_ENR_ENTRIES]] [ctx.enr for ctx in bootnode_contexts[: constants.MAX_ENR_ENTRIES]]
) )
) )
cmd.append( cmd.append(
...@@ -290,7 +290,7 @@ def get_config( ...@@ -290,7 +290,7 @@ def get_config(
+ ",".join( + ",".join(
[ [
ctx.multiaddr ctx.multiaddr
for ctx in bootnode_contexts[: package_io.MAX_ENR_ENTRIES] for ctx in bootnode_contexts[: constants.MAX_ENR_ENTRIES]
] ]
) )
) )
...@@ -300,7 +300,7 @@ def get_config( ...@@ -300,7 +300,7 @@ def get_config(
cmd.extend([param for param in extra_params]) cmd.extend([param for param in extra_params])
files = { files = {
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
} }
if node_keystore_files: if node_keystore_files:
files[ files[
......
shared_utils = import_module("../shared_utils/shared_utils.star") shared_utils = import_module("../shared_utils/shared_utils.star")
package_io = import_module("../package_io/constants.star") constants = import_module("../package_io/constants.star")
SERVICE_NAME = "dora" SERVICE_NAME = "dora"
IMAGE_NAME = "ethpandaops/dora:master" IMAGE_NAME = "ethpandaops/dora:master"
...@@ -65,7 +65,7 @@ def get_config(config_files_artifact_name, el_cl_data_files_artifact_uuid): ...@@ -65,7 +65,7 @@ def get_config(config_files_artifact_name, el_cl_data_files_artifact_uuid):
files={ files={
DORA_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,
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_data_files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_data_files_artifact_uuid,
}, },
cmd=["-config", config_file_path], cmd=["-config", config_file_path],
) )
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
el_client_context = import_module("../../el/el_client_context.star") el_client_context = import_module("../../el/el_client_context.star")
el_admin_node_info = import_module("../../el/el_admin_node_info.star") el_admin_node_info = import_module("../../el/el_admin_node_info.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
# The dirpath of the execution data directory on the client container # The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/opt/besu/execution-data" EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/opt/besu/execution-data"
...@@ -52,11 +52,11 @@ USED_PORTS = { ...@@ -52,11 +52,11 @@ USED_PORTS = {
ENTRYPOINT_ARGS = ["sh", "-c"] ENTRYPOINT_ARGS = ["sh", "-c"]
BESU_LOG_LEVELS = { BESU_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE",
} }
...@@ -138,7 +138,7 @@ def get_config( ...@@ -138,7 +138,7 @@ def get_config(
"--logging=" + log_level, "--logging=" + log_level,
"--data-path=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--data-path=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
"--genesis-file=" "--genesis-file="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/besu.json", + "/besu.json",
"--network-id=" + network_id, "--network-id=" + network_id,
"--host-allowlist=*", "--host-allowlist=*",
...@@ -155,12 +155,12 @@ def get_config( ...@@ -155,12 +155,12 @@ def get_config(
"--p2p-host=" + PRIVATE_IP_ADDRESS_PLACEHOLDER, "--p2p-host=" + PRIVATE_IP_ADDRESS_PLACEHOLDER,
"--p2p-port={0}".format(DISCOVERY_PORT_NUM), "--p2p-port={0}".format(DISCOVERY_PORT_NUM),
"--engine-rpc-enabled=true", "--engine-rpc-enabled=true",
"--engine-jwt-secret=" + package_io.JWT_AUTH_PATH, "--engine-jwt-secret=" + constants.JWT_AUTH_PATH,
"--engine-host-allowlist=*", "--engine-host-allowlist=*",
"--engine-rpc-port={0}".format(ENGINE_HTTP_RPC_PORT_NUM), "--engine-rpc-port={0}".format(ENGINE_HTTP_RPC_PORT_NUM),
"--sync-mode=FULL", "--sync-mode=FULL",
"--data-storage-format=BONSAI", "--data-storage-format=BONSAI",
"--kzg-trusted-setup=" + package_io.KZG_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--kzg-trusted-setup=" + constants.KZG_DATA_DIRPATH_ON_CLIENT_CONTAINER,
"--metrics-enabled=true", "--metrics-enabled=true",
"--metrics-host=0.0.0.0", "--metrics-host=0.0.0.0",
"--metrics-port={0}".format(METRICS_PORT_NUM), "--metrics-port={0}".format(METRICS_PORT_NUM),
...@@ -172,7 +172,7 @@ def get_config( ...@@ -172,7 +172,7 @@ def get_config(
+ ",".join( + ",".join(
[ [
ctx.enode ctx.enode
for ctx in existing_el_clients[: package_io.MAX_ENODE_ENTRIES] for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES]
] ]
) )
) )
...@@ -188,7 +188,7 @@ def get_config( ...@@ -188,7 +188,7 @@ def get_config(
ports=USED_PORTS, ports=USED_PORTS,
cmd=[cmd_str], cmd=[cmd_str],
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
}, },
entrypoint=ENTRYPOINT_ARGS, entrypoint=ENTRYPOINT_ARGS,
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
el_admin_node_info = import_module("../../el/el_admin_node_info.star") el_admin_node_info = import_module("../../el/el_admin_node_info.star")
el_client_context = import_module("../../el/el_client_context.star") el_client_context = import_module("../../el/el_client_context.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
# The dirpath of the execution data directory on the client container # The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/home/erigon/execution-data" EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/home/erigon/execution-data"
...@@ -53,11 +53,11 @@ USED_PORTS = { ...@@ -53,11 +53,11 @@ USED_PORTS = {
ENTRYPOINT_ARGS = ["sh", "-c"] ENTRYPOINT_ARGS = ["sh", "-c"]
ERIGON_LOG_LEVELS = { ERIGON_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "1", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "1",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "2", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "2",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "3", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "3",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "4", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "4",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "5", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "5",
} }
...@@ -140,7 +140,7 @@ def get_config( ...@@ -140,7 +140,7 @@ def get_config(
init_datadir_cmd_str = "erigon init --datadir={0} {1}".format( init_datadir_cmd_str = "erigon init --datadir={0} {1}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json", constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
) )
cmd = [ cmd = [
...@@ -158,7 +158,7 @@ def get_config( ...@@ -158,7 +158,7 @@ def get_config(
"--http.addr=0.0.0.0", "--http.addr=0.0.0.0",
"--http.corsdomain=*", "--http.corsdomain=*",
"--http.port={0}".format(WS_RPC_PORT_NUM), "--http.port={0}".format(WS_RPC_PORT_NUM),
"--authrpc.jwtsecret=" + package_io.JWT_AUTH_PATH, "--authrpc.jwtsecret=" + constants.JWT_AUTH_PATH,
"--authrpc.addr=0.0.0.0", "--authrpc.addr=0.0.0.0",
"--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM), "--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM),
"--authrpc.vhosts=*", "--authrpc.vhosts=*",
...@@ -173,7 +173,7 @@ def get_config( ...@@ -173,7 +173,7 @@ def get_config(
+ ",".join( + ",".join(
[ [
ctx.enode ctx.enode
for ctx in existing_el_clients[: package_io.MAX_ENODE_ENTRIES] for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES]
] ]
) )
) )
...@@ -182,7 +182,7 @@ def get_config( ...@@ -182,7 +182,7 @@ def get_config(
+ ",".join( + ",".join(
[ [
ctx.enode ctx.enode
for ctx in existing_el_clients[: package_io.MAX_ENODE_ENTRIES] for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES]
] ]
) )
) )
...@@ -200,7 +200,7 @@ def get_config( ...@@ -200,7 +200,7 @@ def get_config(
ports=USED_PORTS, ports=USED_PORTS,
cmd=[command_arg_str], cmd=[command_arg_str],
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
}, },
entrypoint=ENTRYPOINT_ARGS, entrypoint=ENTRYPOINT_ARGS,
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../..//package_io/parse_input.star") input_parser = import_module("../..//package_io/input_parser.star")
el_client_context = import_module("../../el/el_client_context.star") el_client_context = import_module("../../el/el_client_context.star")
el_admin_node_info = import_module("../../el/el_admin_node_info.star") el_admin_node_info = import_module("../../el/el_admin_node_info.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
RPC_PORT_NUM = 8545 RPC_PORT_NUM = 8545
...@@ -56,11 +56,11 @@ USED_PORTS = { ...@@ -56,11 +56,11 @@ USED_PORTS = {
ENTRYPOINT_ARGS = [] ENTRYPOINT_ARGS = []
VERBOSITY_LEVELS = { VERBOSITY_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "error", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "error",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "info", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "info",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace",
} }
...@@ -137,7 +137,7 @@ def get_config( ...@@ -137,7 +137,7 @@ def get_config(
): ):
cmd = [ cmd = [
"--gethGenesis=" "--gethGenesis="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/genesis.json", + "/genesis.json",
"--dataDir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--dataDir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
"--port={0}".format(DISCOVERY_PORT_NUM), "--port={0}".format(DISCOVERY_PORT_NUM),
...@@ -153,7 +153,7 @@ def get_config( ...@@ -153,7 +153,7 @@ def get_config(
"--wsPort={0}".format(WS_PORT_NUM), "--wsPort={0}".format(WS_PORT_NUM),
"--wsEnginePort={0}".format(WS_PORT_ENGINE_NUM), "--wsEnginePort={0}".format(WS_PORT_ENGINE_NUM),
"--wsEngineAddr=0.0.0.0", "--wsEngineAddr=0.0.0.0",
"--jwt-secret=" + package_io.JWT_AUTH_PATH, "--jwt-secret=" + constants.JWT_AUTH_PATH,
"--extIP={0}".format(PRIVATE_IP_ADDRESS_PLACEHOLDER), "--extIP={0}".format(PRIVATE_IP_ADDRESS_PLACEHOLDER),
"--sync=full", "--sync=full",
"--isSingleNode=true", "--isSingleNode=true",
...@@ -166,7 +166,7 @@ def get_config( ...@@ -166,7 +166,7 @@ def get_config(
+ ",".join( + ",".join(
[ [
ctx.enode ctx.enode
for ctx in existing_el_clients[: package_io.MAX_ENODE_ENTRIES] for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES]
] ]
) )
) )
...@@ -180,7 +180,7 @@ def get_config( ...@@ -180,7 +180,7 @@ def get_config(
ports=USED_PORTS, ports=USED_PORTS,
cmd=cmd, cmd=cmd,
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
}, },
entrypoint=ENTRYPOINT_ARGS, entrypoint=ENTRYPOINT_ARGS,
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
el_client_context = import_module("../../el/el_client_context.star") el_client_context = import_module("../../el/el_client_context.star")
el_admin_node_info = import_module("../../el/el_admin_node_info.star") el_admin_node_info = import_module("../../el/el_admin_node_info.star")
genesis_constants = import_module( genesis_constants = import_module(
...@@ -7,7 +7,7 @@ genesis_constants = import_module( ...@@ -7,7 +7,7 @@ genesis_constants = import_module(
) )
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
RPC_PORT_NUM = 8545 RPC_PORT_NUM = 8545
WS_PORT_NUM = 8546 WS_PORT_NUM = 8546
...@@ -60,11 +60,11 @@ USED_PORTS = { ...@@ -60,11 +60,11 @@ USED_PORTS = {
ENTRYPOINT_ARGS = ["sh", "-c"] ENTRYPOINT_ARGS = ["sh", "-c"]
VERBOSITY_LEVELS = { VERBOSITY_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "1", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "1",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "2", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "2",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "3", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "3",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "4", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "4",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "5", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "5",
} }
BUILDER_IMAGE_STR = "builder" BUILDER_IMAGE_STR = "builder"
...@@ -150,7 +150,7 @@ def get_config( ...@@ -150,7 +150,7 @@ def get_config(
init_datadir_cmd_str = "geth init {0} --state.scheme=path --datadir={1} {2}".format( init_datadir_cmd_str = "geth init {0} --state.scheme=path --datadir={1} {2}".format(
"--cache.preimages" if electra_fork_epoch != None else "", "--cache.preimages" if electra_fork_epoch != None else "",
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json", constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
) )
cmd = [ cmd = [
...@@ -177,7 +177,7 @@ def get_config( ...@@ -177,7 +177,7 @@ def get_config(
"--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM), "--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM),
"--authrpc.addr=0.0.0.0", "--authrpc.addr=0.0.0.0",
"--authrpc.vhosts=*", "--authrpc.vhosts=*",
"--authrpc.jwtsecret=" + package_io.JWT_AUTH_PATH, "--authrpc.jwtsecret=" + constants.JWT_AUTH_PATH,
"--syncmode=full", "--syncmode=full",
"--rpc.allow-unprotected-txs", "--rpc.allow-unprotected-txs",
"--metrics", "--metrics",
...@@ -195,7 +195,7 @@ def get_config( ...@@ -195,7 +195,7 @@ def get_config(
+ ",".join( + ",".join(
[ [
ctx.enode ctx.enode
for ctx in existing_el_clients[: package_io.MAX_ENODE_ENTRIES] for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES]
] ]
) )
) )
...@@ -217,7 +217,7 @@ def get_config( ...@@ -217,7 +217,7 @@ def get_config(
ports=USED_PORTS, ports=USED_PORTS,
cmd=[command_str], cmd=[command_str],
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid
}, },
entrypoint=ENTRYPOINT_ARGS, entrypoint=ENTRYPOINT_ARGS,
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
el_client_context = import_module("../../el/el_client_context.star") el_client_context = import_module("../../el/el_client_context.star")
el_admin_node_info = import_module("../../el/el_admin_node_info.star") el_admin_node_info = import_module("../../el/el_admin_node_info.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
# The dirpath of the execution data directory on the client container # The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/execution-data" EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/execution-data"
...@@ -51,11 +51,11 @@ USED_PORTS = { ...@@ -51,11 +51,11 @@ USED_PORTS = {
} }
NETHERMIND_LOG_LEVELS = { NETHERMIND_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE",
} }
...@@ -135,10 +135,10 @@ def get_config( ...@@ -135,10 +135,10 @@ def get_config(
"--log=" + log_level, "--log=" + log_level,
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
"--Init.ChainSpecPath=" "--Init.ChainSpecPath="
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/chainspec.json", + "/chainspec.json",
"--Init.WebSocketsEnabled=true", "--Init.WebSocketsEnabled=true",
"--Init.KzgSetupPath=" + package_io.KZG_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--Init.KzgSetupPath=" + constants.KZG_DATA_DIRPATH_ON_CLIENT_CONTAINER,
"--config=none.cfg", "--config=none.cfg",
"--JsonRpc.Enabled=true", "--JsonRpc.Enabled=true",
"--JsonRpc.EnabledModules=net,eth,consensus,subscribe,web3,admin", "--JsonRpc.EnabledModules=net,eth,consensus,subscribe,web3,admin",
...@@ -150,7 +150,7 @@ def get_config( ...@@ -150,7 +150,7 @@ def get_config(
"--Network.ExternalIp={0}".format(PRIVATE_IP_ADDRESS_PLACEHOLDER), "--Network.ExternalIp={0}".format(PRIVATE_IP_ADDRESS_PLACEHOLDER),
"--Network.DiscoveryPort={0}".format(DISCOVERY_PORT_NUM), "--Network.DiscoveryPort={0}".format(DISCOVERY_PORT_NUM),
"--Network.P2PPort={0}".format(DISCOVERY_PORT_NUM), "--Network.P2PPort={0}".format(DISCOVERY_PORT_NUM),
"--JsonRpc.JwtSecretFile=" + package_io.JWT_AUTH_PATH, "--JsonRpc.JwtSecretFile=" + constants.JWT_AUTH_PATH,
"--Network.OnlyStaticPeers=true", "--Network.OnlyStaticPeers=true",
"--Metrics.Enabled=true", "--Metrics.Enabled=true",
"--Metrics.ExposePort={0}".format(METRICS_PORT_NUM), "--Metrics.ExposePort={0}".format(METRICS_PORT_NUM),
...@@ -162,7 +162,7 @@ def get_config( ...@@ -162,7 +162,7 @@ def get_config(
+ ",".join( + ",".join(
[ [
ctx.enode ctx.enode
for ctx in existing_el_clients[: package_io.MAX_ENODE_ENTRIES] for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES]
] ]
) )
) )
...@@ -176,7 +176,7 @@ def get_config( ...@@ -176,7 +176,7 @@ def get_config(
ports=USED_PORTS, ports=USED_PORTS,
cmd=cmd, cmd=cmd,
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
}, },
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
min_cpu=el_min_cpu, min_cpu=el_min_cpu,
......
shared_utils = import_module("../../shared_utils/shared_utils.star") shared_utils = import_module("../../shared_utils/shared_utils.star")
input_parser = import_module("../../package_io/parse_input.star") input_parser = import_module("../../package_io/input_parser.star")
el_client_context = import_module("../../el/el_client_context.star") el_client_context = import_module("../../el/el_client_context.star")
el_admin_node_info = import_module("../../el/el_admin_node_info.star") el_admin_node_info = import_module("../../el/el_admin_node_info.star")
node_metrics = import_module("../../node_metrics_info.star") node_metrics = import_module("../../node_metrics_info.star")
package_io = import_module("../../package_io/constants.star") constants = import_module("../../package_io/constants.star")
RPC_PORT_NUM = 8545 RPC_PORT_NUM = 8545
...@@ -54,11 +54,11 @@ USED_PORTS = { ...@@ -54,11 +54,11 @@ USED_PORTS = {
ENTRYPOINT_ARGS = ["sh", "-c"] ENTRYPOINT_ARGS = ["sh", "-c"]
VERBOSITY_LEVELS = { VERBOSITY_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "v", constants.GLOBAL_CLIENT_LOG_LEVEL.error: "v",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "vv", constants.GLOBAL_CLIENT_LOG_LEVEL.warn: "vv",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "vvv", constants.GLOBAL_CLIENT_LOG_LEVEL.info: "vvv",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "vvvv", constants.GLOBAL_CLIENT_LOG_LEVEL.debug: "vvvv",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "vvvvv", constants.GLOBAL_CLIENT_LOG_LEVEL.trace: "vvvvv",
} }
...@@ -136,7 +136,7 @@ def get_config( ...@@ -136,7 +136,7 @@ def get_config(
): ):
init_datadir_cmd_str = "reth init --datadir={0} --chain={1}".format( init_datadir_cmd_str = "reth init --datadir={0} --chain={1}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json", constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
) )
cmd = [ cmd = [
...@@ -144,9 +144,7 @@ def get_config( ...@@ -144,9 +144,7 @@ def get_config(
"node", "node",
"-{0}".format(verbosity_level), "-{0}".format(verbosity_level),
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER, "--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
"--chain=" "--chain=" + constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
+ package_io.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER
+ "/genesis.json",
"--http", "--http",
"--http.port={0}".format(RPC_PORT_NUM), "--http.port={0}".format(RPC_PORT_NUM),
"--http.addr=0.0.0.0", "--http.addr=0.0.0.0",
...@@ -161,7 +159,7 @@ def get_config( ...@@ -161,7 +159,7 @@ def get_config(
"--ws.origins=*", "--ws.origins=*",
"--nat=extip:" + PRIVATE_IP_ADDRESS_PLACEHOLDER, "--nat=extip:" + PRIVATE_IP_ADDRESS_PLACEHOLDER,
"--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM), "--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM),
"--authrpc.jwtsecret=" + package_io.JWT_AUTH_PATH, "--authrpc.jwtsecret=" + constants.JWT_AUTH_PATH,
"--authrpc.addr=0.0.0.0", "--authrpc.addr=0.0.0.0",
"--metrics=0.0.0.0:{0}".format(METRICS_PORT_NUM), "--metrics=0.0.0.0:{0}".format(METRICS_PORT_NUM),
] ]
...@@ -172,7 +170,7 @@ def get_config( ...@@ -172,7 +170,7 @@ def get_config(
+ ",".join( + ",".join(
[ [
ctx.enode ctx.enode
for ctx in existing_el_clients[: package_io.MAX_ENODE_ENTRIES] for ctx in existing_el_clients[: constants.MAX_ENODE_ENTRIES]
] ]
) )
) )
...@@ -194,7 +192,7 @@ def get_config( ...@@ -194,7 +192,7 @@ def get_config(
ports=USED_PORTS, ports=USED_PORTS,
cmd=[command_str], cmd=[command_str],
files={ files={
package_io.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid, constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
}, },
entrypoint=ENTRYPOINT_ARGS, entrypoint=ENTRYPOINT_ARGS,
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
......
shared_utils = import_module("../shared_utils/shared_utils.star") shared_utils = import_module("../shared_utils/shared_utils.star")
mev_boost_context_module = import_module("../mev_boost/mev_boost_context.star") mev_boost_context_module = import_module("../mev_boost/mev_boost_context.star")
parse_input = import_module("../package_io/parse_input.star") input_parser = import_module("../package_io/input_parser.star")
FLASHBOTS_MEV_BOOST_PROTOCOL = "TCP" FLASHBOTS_MEV_BOOST_PROTOCOL = "TCP"
USED_PORTS = { USED_PORTS = {
"api": shared_utils.new_port_spec( "api": shared_utils.new_port_spec(
parse_input.FLASHBOTS_MEV_BOOST_PORT, FLASHBOTS_MEV_BOOST_PROTOCOL, wait="5s" input_parser.FLASHBOTS_MEV_BOOST_PORT, FLASHBOTS_MEV_BOOST_PROTOCOL, wait="5s"
) )
} }
...@@ -23,7 +23,7 @@ def launch(plan, mev_boost_launcher, service_name, network_id, mev_boost_image): ...@@ -23,7 +23,7 @@ def launch(plan, mev_boost_launcher, service_name, network_id, mev_boost_image):
mev_boost_service = plan.add_service(service_name, config) mev_boost_service = plan.add_service(service_name, config)
return mev_boost_context_module.new_mev_boost_context( return mev_boost_context_module.new_mev_boost_context(
mev_boost_service.ip_address, parse_input.FLASHBOTS_MEV_BOOST_PORT mev_boost_service.ip_address, input_parser.FLASHBOTS_MEV_BOOST_PORT
) )
...@@ -44,7 +44,7 @@ def get_config(mev_boost_launcher, network_id, mev_boost_image): ...@@ -44,7 +44,7 @@ def get_config(mev_boost_launcher, network_id, mev_boost_image):
# does this need genesis time to be set as well # does this need genesis time to be set as well
"GENESIS_FORK_VERSION": "0x10000038", "GENESIS_FORK_VERSION": "0x10000038",
"BOOST_LISTEN_ADDR": "0.0.0.0:{0}".format( "BOOST_LISTEN_ADDR": "0.0.0.0:{0}".format(
parse_input.FLASHBOTS_MEV_BOOST_PORT input_parser.FLASHBOTS_MEV_BOOST_PORT
), ),
# maybe this is breaking; this isn't verifyign the bid and not sending it to the validator # maybe this is breaking; this isn't verifyign the bid and not sending it to the validator
"SKIP_RELAY_SIGNATURE_CHECK": "1", "SKIP_RELAY_SIGNATURE_CHECK": "1",
......
constants = import_module("../package_io/constants.star")
genesis_constants = import_module(
"../prelaunch_data_generator/genesis_constants/genesis_constants.star"
)
DEFAULT_EL_IMAGES = { DEFAULT_EL_IMAGES = {
"geth": "ethereum/client-go:latest", "geth": "ethereum/client-go:latest",
"erigon": "ethpandaops/erigon:devel", "erigon": "ethpandaops/erigon:devel",
...@@ -51,14 +57,8 @@ ATTR_TO_BE_SKIPPED_AT_ROOT = ( ...@@ -51,14 +57,8 @@ ATTR_TO_BE_SKIPPED_AT_ROOT = (
"custom_flood_params", "custom_flood_params",
) )
package_io_constants = import_module("../package_io/constants.star")
genesis_constants = import_module(
"../prelaunch_data_generator/genesis_constants/genesis_constants.star"
)
def parse_input(plan, input_args): def input_parser(plan, input_args):
result = parse_network_params(input_args) result = parse_network_params(input_args)
# add default eth2 input params # add default eth2 input params
...@@ -513,7 +513,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ ...@@ -513,7 +513,7 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port, mev_typ
"--builder.bellatrix_fork_version=0x30000038", "--builder.bellatrix_fork_version=0x30000038",
"--builder.genesis_fork_version=0x10000038", "--builder.genesis_fork_version=0x10000038",
"--builder.genesis_validators_root={0}".format( "--builder.genesis_validators_root={0}".format(
package_io_constants.GENESIS_VALIDATORS_ROOT_PLACEHOLDER constants.GENESIS_VALIDATORS_ROOT_PLACEHOLDER
), ),
'--miner.extradata="Illuminate Dmocratize Dstribute"', '--miner.extradata="Illuminate Dmocratize Dstribute"',
"--builder.algotype=greedy", "--builder.algotype=greedy",
......
...@@ -29,7 +29,7 @@ genesis_constants = import_module( ...@@ -29,7 +29,7 @@ genesis_constants = import_module(
) )
participant_module = import_module("./participant.star") participant_module = import_module("./participant.star")
package_io = import_module("./package_io/constants.star") constants = import_module("./package_io/constants.star")
BOOT_PARTICIPANT_INDEX = 0 BOOT_PARTICIPANT_INDEX = 0
...@@ -128,7 +128,7 @@ def launch_participant_network( ...@@ -128,7 +128,7 @@ def launch_participant_network(
) )
el_launchers = { el_launchers = {
package_io.EL_CLIENT_TYPE.geth: { constants.EL_CLIENT_TYPE.geth: {
"launcher": geth.new_geth_launcher( "launcher": geth.new_geth_launcher(
network_params.network_id, network_params.network_id,
el_cl_data, el_cl_data,
...@@ -136,25 +136,25 @@ def launch_participant_network( ...@@ -136,25 +136,25 @@ def launch_participant_network(
), ),
"launch_method": geth.launch, "launch_method": geth.launch,
}, },
package_io.EL_CLIENT_TYPE.besu: { constants.EL_CLIENT_TYPE.besu: {
"launcher": besu.new_besu_launcher(network_params.network_id, el_cl_data), "launcher": besu.new_besu_launcher(network_params.network_id, el_cl_data),
"launch_method": besu.launch, "launch_method": besu.launch,
}, },
package_io.EL_CLIENT_TYPE.erigon: { constants.EL_CLIENT_TYPE.erigon: {
"launcher": erigon.new_erigon_launcher( "launcher": erigon.new_erigon_launcher(
network_params.network_id, el_cl_data network_params.network_id, el_cl_data
), ),
"launch_method": erigon.launch, "launch_method": erigon.launch,
}, },
package_io.EL_CLIENT_TYPE.nethermind: { constants.EL_CLIENT_TYPE.nethermind: {
"launcher": nethermind.new_nethermind_launcher(el_cl_data), "launcher": nethermind.new_nethermind_launcher(el_cl_data),
"launch_method": nethermind.launch, "launch_method": nethermind.launch,
}, },
package_io.EL_CLIENT_TYPE.reth: { constants.EL_CLIENT_TYPE.reth: {
"launcher": reth.new_reth_launcher(el_cl_data), "launcher": reth.new_reth_launcher(el_cl_data),
"launch_method": reth.launch, "launch_method": reth.launch,
}, },
package_io.EL_CLIENT_TYPE.ethereumjs: { constants.EL_CLIENT_TYPE.ethereumjs: {
"launcher": ethereumjs.new_ethereumjs_launcher(el_cl_data), "launcher": ethereumjs.new_ethereumjs_launcher(el_cl_data),
"launch_method": ethereumjs.launch, "launch_method": ethereumjs.launch,
}, },
...@@ -208,19 +208,19 @@ def launch_participant_network( ...@@ -208,19 +208,19 @@ def launch_participant_network(
plan.print("Launching CL network") plan.print("Launching CL network")
cl_launchers = { cl_launchers = {
package_io.CL_CLIENT_TYPE.lighthouse: { constants.CL_CLIENT_TYPE.lighthouse: {
"launcher": lighthouse.new_lighthouse_launcher(el_cl_data), "launcher": lighthouse.new_lighthouse_launcher(el_cl_data),
"launch_method": lighthouse.launch, "launch_method": lighthouse.launch,
}, },
package_io.CL_CLIENT_TYPE.lodestar: { constants.CL_CLIENT_TYPE.lodestar: {
"launcher": lodestar.new_lodestar_launcher(el_cl_data), "launcher": lodestar.new_lodestar_launcher(el_cl_data),
"launch_method": lodestar.launch, "launch_method": lodestar.launch,
}, },
package_io.CL_CLIENT_TYPE.nimbus: { constants.CL_CLIENT_TYPE.nimbus: {
"launcher": nimbus.new_nimbus_launcher(el_cl_data), "launcher": nimbus.new_nimbus_launcher(el_cl_data),
"launch_method": nimbus.launch, "launch_method": nimbus.launch,
}, },
package_io.CL_CLIENT_TYPE.prysm: { constants.CL_CLIENT_TYPE.prysm: {
"launcher": prysm.new_prysm_launcher( "launcher": prysm.new_prysm_launcher(
el_cl_data, el_cl_data,
validator_data.prysm_password_relative_filepath, validator_data.prysm_password_relative_filepath,
...@@ -228,7 +228,7 @@ def launch_participant_network( ...@@ -228,7 +228,7 @@ def launch_participant_network(
), ),
"launch_method": prysm.launch, "launch_method": prysm.launch,
}, },
package_io.CL_CLIENT_TYPE.teku: { constants.CL_CLIENT_TYPE.teku: {
"launcher": teku.new_teku_launcher(el_cl_data), "launcher": teku.new_teku_launcher(el_cl_data),
"launch_method": teku.launch, "launch_method": teku.launch,
}, },
...@@ -273,7 +273,7 @@ def launch_participant_network( ...@@ -273,7 +273,7 @@ def launch_participant_network(
snooper_service_name = "snooper-{0}-{1}-{2}".format( snooper_service_name = "snooper-{0}-{1}-{2}".format(
index_str, cl_client_type, el_client_type index_str, cl_client_type, el_client_type
) )
snooper_image = package_io.DEFAULT_SNOOPER_IMAGE snooper_image = constants.DEFAULT_SNOOPER_IMAGE
snooper_engine_context = snooper.launch( snooper_engine_context = snooper.launch(
plan, plan,
snooper_service_name, snooper_service_name,
......
shared_utils = import_module("../shared_utils/shared_utils.star") shared_utils = import_module("../shared_utils/shared_utils.star")
input_parser = import_module("../package_io/parse_input.star") input_parser = import_module("../package_io/input_parser.star")
el_client_context = import_module("../el/el_client_context.star") el_client_context = import_module("../el/el_client_context.star")
el_admin_node_info = import_module("../el/el_admin_node_info.star") el_admin_node_info = import_module("../el/el_admin_node_info.star")
package_io = import_module("../package_io/constants.star")
snooper_engine_context = import_module("../snooper/snooper_engine_context.star") snooper_engine_context = import_module("../snooper/snooper_engine_context.star")
SNOOPER_ENGINE_RPC_PORT_NUM = 8561 SNOOPER_ENGINE_RPC_PORT_NUM = 8561
......
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