Commit cb33648d authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

feat: split nimbus CL-validator (#404)

parent 21eae3b5
participants:
- el_client_type: geth
cl_client_type: nimbus
cl_split_mode_enabled: true
validator_count: 0
- el_client_type: nethermind
cl_client_type: nimbus
cl_split_mode_enabled: true
- el_client_type: erigon
cl_client_type: nimbus
cl_split_mode_enabled: true
- el_client_type: besu
cl_client_type: nimbus
cl_split_mode_enabled: true
- el_client_type: reth
cl_client_type: nimbus
cl_split_mode_enabled: true
- el_client_type: ethereumjs
cl_client_type: nimbus
cl_split_mode_enabled: true
additional_services: []
...@@ -147,6 +147,11 @@ participants: ...@@ -147,6 +147,11 @@ participants:
# over a specific participant's logging # over a specific participant's logging
cl_client_log_level: "" cl_client_log_level: ""
# A list of optional extra params that will be passed to the CL to run separate Beacon and validator nodes
# Only possible for nimbus or teku (coming soon)
# Defaults to false
cl_split_mode_enabled: false
# A list of optional extra params that will be passed to the CL client Beacon container for modifying its behaviour # A list of optional extra params that will be passed to the CL client Beacon container for modifying its behaviour
# If the client combines the Beacon & validator nodes (e.g. Teku, Nimbus), then this list will be passed to the combined Beacon-validator node # If the client combines the Beacon & validator nodes (e.g. Teku, Nimbus), then this list will be passed to the combined Beacon-validator node
beacon_extra_params: [] beacon_extra_params: []
......
...@@ -121,6 +121,7 @@ def launch( ...@@ -121,6 +121,7 @@ def launch(
extra_validator_params, extra_validator_params,
extra_beacon_labels, extra_beacon_labels,
extra_validator_labels, extra_validator_labels,
split_mode_enabled=False,
): ):
beacon_node_service_name = "{0}".format(service_name) beacon_node_service_name = "{0}".format(service_name)
validator_node_service_name = "{0}-{1}".format( validator_node_service_name = "{0}-{1}".format(
......
...@@ -97,6 +97,7 @@ def launch( ...@@ -97,6 +97,7 @@ def launch(
extra_validator_params, extra_validator_params,
extra_beacon_labels, extra_beacon_labels,
extra_validator_labels, extra_validator_labels,
split_mode_enabled=False,
): ):
beacon_node_service_name = "{0}".format(service_name) beacon_node_service_name = "{0}".format(service_name)
validator_node_service_name = "{0}-{1}".format( validator_node_service_name = "{0}-{1}".format(
......
This diff is collapsed.
...@@ -109,6 +109,7 @@ def launch( ...@@ -109,6 +109,7 @@ def launch(
extra_validator_params, extra_validator_params,
extra_beacon_labels, extra_beacon_labels,
extra_validator_labels, extra_validator_labels,
split_mode_enabled=False,
): ):
split_images = images.split(IMAGE_SEPARATOR_DELIMITER) split_images = images.split(IMAGE_SEPARATOR_DELIMITER)
if len(split_images) != EXPECTED_NUM_IMAGES: if len(split_images) != EXPECTED_NUM_IMAGES:
......
...@@ -98,6 +98,7 @@ def launch( ...@@ -98,6 +98,7 @@ def launch(
extra_validator_params, extra_validator_params,
extra_beacon_labels, extra_beacon_labels,
extra_validator_labels, extra_validator_labels,
split_mode_enabled,
): ):
log_level = input_parser.get_client_log_level_or_default( log_level = input_parser.get_client_log_level_or_default(
participant_log_level, global_log_level, TEKU_LOG_LEVELS participant_log_level, global_log_level, TEKU_LOG_LEVELS
......
...@@ -16,7 +16,7 @@ DEFAULT_EL_IMAGES = { ...@@ -16,7 +16,7 @@ DEFAULT_EL_IMAGES = {
DEFAULT_CL_IMAGES = { DEFAULT_CL_IMAGES = {
"lighthouse": "sigp/lighthouse:latest", "lighthouse": "sigp/lighthouse:latest",
"teku": "consensys/teku:latest", "teku": "consensys/teku:latest",
"nimbus": "statusim/nimbus-eth2:multiarch-latest", "nimbus": "ethpandaops/nimbus:unstable",
"prysm": "prysmaticlabs/prysm-beacon-chain:latest,prysmaticlabs/prysm-validator:latest", "prysm": "prysmaticlabs/prysm-beacon-chain:latest,prysmaticlabs/prysm-validator:latest",
"lodestar": "chainsafe/lodestar:latest", "lodestar": "chainsafe/lodestar:latest",
} }
...@@ -125,6 +125,7 @@ def input_parser(plan, input_args): ...@@ -125,6 +125,7 @@ def input_parser(plan, input_args):
cl_client_type=participant["cl_client_type"], cl_client_type=participant["cl_client_type"],
cl_client_image=participant["cl_client_image"], cl_client_image=participant["cl_client_image"],
cl_client_log_level=participant["cl_client_log_level"], cl_client_log_level=participant["cl_client_log_level"],
cl_split_mode_enabled=participant["cl_split_mode_enabled"],
beacon_extra_params=participant["beacon_extra_params"], beacon_extra_params=participant["beacon_extra_params"],
beacon_extra_labels=participant["beacon_extra_labels"], beacon_extra_labels=participant["beacon_extra_labels"],
validator_extra_params=participant["validator_extra_params"], validator_extra_params=participant["validator_extra_params"],
...@@ -252,6 +253,17 @@ def parse_network_params(input_args): ...@@ -252,6 +253,17 @@ def parse_network_params(input_args):
result["network_params"]["seconds_per_slot"] < 12 result["network_params"]["seconds_per_slot"] < 12
): ):
fail("nimbus can't be run with slot times below 12 seconds") fail("nimbus can't be run with slot times below 12 seconds")
if participant["cl_split_mode_enabled"] and cl_client_type not in (
"nimbus",
"teku",
):
fail(
"split mode is only supported for nimbus and teku clients, but you specified {0}".format(
cl_client_type
)
)
el_image = participant["el_client_image"] el_image = participant["el_client_image"]
if el_image == "": if el_image == "":
default_image = DEFAULT_EL_IMAGES.get(el_client_type, "") default_image = DEFAULT_EL_IMAGES.get(el_client_type, "")
...@@ -421,6 +433,7 @@ def default_participant(): ...@@ -421,6 +433,7 @@ def default_participant():
"cl_client_type": "lighthouse", "cl_client_type": "lighthouse",
"cl_client_image": "", "cl_client_image": "",
"cl_client_log_level": "", "cl_client_log_level": "",
"cl_split_mode_enabled": False,
"beacon_extra_params": [], "beacon_extra_params": [],
"beacon_extra_labels": {}, "beacon_extra_labels": {},
"validator_extra_params": [], "validator_extra_params": [],
......
...@@ -340,6 +340,7 @@ def launch_participant_network( ...@@ -340,6 +340,7 @@ def launch_participant_network(
participant.validator_extra_params, participant.validator_extra_params,
participant.beacon_extra_labels, participant.beacon_extra_labels,
participant.validator_extra_labels, participant.validator_extra_labels,
participant.cl_split_mode_enabled,
) )
else: else:
boot_cl_client_ctx = all_cl_client_contexts boot_cl_client_ctx = all_cl_client_contexts
...@@ -369,6 +370,7 @@ def launch_participant_network( ...@@ -369,6 +370,7 @@ def launch_participant_network(
participant.validator_extra_params, participant.validator_extra_params,
participant.beacon_extra_labels, participant.beacon_extra_labels,
participant.validator_extra_labels, participant.validator_extra_labels,
participant.cl_split_mode_enabled,
) )
# Add participant cl additional prometheus labels # Add participant cl additional prometheus labels
......
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