Skip to content

Commit

Permalink
fix!: remove vc_count (#844)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa authored Dec 4, 2024
1 parent 3bb88e0 commit b61a128
Show file tree
Hide file tree
Showing 14 changed files with 238 additions and 301 deletions.
File renamed without changes.
1 change: 0 additions & 1 deletion .github/tests/mev-commit-boost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ additional_services:
- prometheus_grafana
mev_params:
mev_boost_image: ghcr.io/commit-boost/pbs:latest
mev_relay_image: flashbots/mev-boost-relay:latest
network_params:
seconds_per_slot: 3
1 change: 1 addition & 0 deletions .github/tests/mix-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ participants:
cl_type: grandine
additional_services:
- assertoor
- dora
assertoor_params:
run_stability_check: false
run_block_proposal_check: true
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,6 @@ participants:
# - vero: ghcr.io/serenita-org/vero:master
vc_image: ""

# The number of validator clients to run for this participant
# Defaults to 1
vc_count: 1

# The log level string that this participant's validator client should log at
# If this is emptystring then the global `logLevel` parameter's value will be translated into a string appropriate for the client (e.g. if
# global `logLevel` = `info` then Teku would receive `INFO`, Prysm would receive `info`, etc.)
Expand Down
5 changes: 4 additions & 1 deletion main.star
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ def run(plan, args={}):
args_with_right_defaults.mev_params.mev_builder_extra_data,
global_node_selectors,
)
elif args_with_right_defaults.mev_type == constants.FLASHBOTS_MEV_TYPE:
elif (
args_with_right_defaults.mev_type == constants.FLASHBOTS_MEV_TYPE
or args_with_right_defaults.mev_type == constants.COMMIT_BOOST_MEV_TYPE
):
plan.print("Generating flashbots builder config file")
flashbots_builder_config_file = flashbots_mev_rbuilder.new_builder_config(
plan,
Expand Down
1 change: 0 additions & 1 deletion network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ participants:
vc_type: lighthouse
vc_image: sigp/lighthouse:latest-unstable
vc_log_level: ""
vc_count: 1
vc_extra_env_vars: {}
vc_extra_labels: {}
vc_extra_params: []
Expand Down
14 changes: 7 additions & 7 deletions src/cl/cl_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def launch(

cl_service_name = "cl-{0}-{1}-{2}".format(index_str, cl_type, el_type)
new_cl_node_validator_keystores = None
if participant.validator_count != 0 and participant.vc_count != 0:
if participant.validator_count != 0:
new_cl_node_validator_keystores = preregistered_validator_keys_for_nodes[
index
]
Expand All @@ -145,16 +145,16 @@ def launch(
snooper_engine_context
)
)

checkpoint_sync_url = args_with_right_defaults.checkpoint_sync_url
if args_with_right_defaults.checkpoint_sync_enabled:
if args_with_right_defaults.checkpoint_sync_url == "":
if (
network_params.network in constants.PUBLIC_NETWORKS
or network_params.network == constants.NETWORK_NAME.ephemery
):
args_with_right_defaults.checkpoint_sync_url = (
constants.CHECKPOINT_SYNC_URL[network_params.network]
)
checkpoint_sync_url = constants.CHECKPOINT_SYNC_URL[
network_params.network
]
else:
fail(
"Checkpoint sync URL is required if you enabled checkpoint_sync for custom networks. Please provide a valid URL."
Expand All @@ -178,7 +178,7 @@ def launch(
tolerations,
node_selectors,
args_with_right_defaults.checkpoint_sync_enabled,
args_with_right_defaults.checkpoint_sync_url,
checkpoint_sync_url,
args_with_right_defaults.port_publisher,
index,
)
Expand All @@ -199,7 +199,7 @@ def launch(
tolerations,
node_selectors,
args_with_right_defaults.checkpoint_sync_enabled,
args_with_right_defaults.checkpoint_sync_url,
checkpoint_sync_url,
args_with_right_defaults.port_publisher,
index,
)
Expand Down
17 changes: 13 additions & 4 deletions src/el/reth/reth_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ def get_config(
constants.METRICS_PORT_ID: METRICS_PORT_NUM,
}

if launcher.builder_type == "flashbots":
if (
launcher.builder_type == constants.FLASHBOTS_MEV_TYPE
or launcher.builder_type == constants.COMMIT_BOOST_MEV_TYPE
):
used_port_assignments[constants.RBUILDER_PORT_ID] = RBUILDER_PORT_NUM

used_ports = shared_utils.get_port_specs(used_port_assignments)
Expand All @@ -161,7 +164,10 @@ def get_config(
"--http.addr=0.0.0.0",
"--http.corsdomain=*",
"--http.api=admin,net,eth,web3,debug,txpool,trace{0}".format(
",flashbots" if launcher.builder_type == "flashbots" else ""
",flashbots"
if launcher.builder_type == constants.FLASHBOTS_MEV_TYPE
or launcher.builder_type == constants.COMMIT_BOOST_MEV_TYPE
else ""
),
"--ws",
"--ws.addr=0.0.0.0",
Expand Down Expand Up @@ -220,11 +226,14 @@ def get_config(
)
env_vars = {}
image = participant.el_image
if launcher.builder_type == "mev-rs":
if launcher.builder_type == constants.MEV_RS_MEV_TYPE:
files[
mev_rs_builder.MEV_BUILDER_MOUNT_DIRPATH_ON_SERVICE
] = mev_rs_builder.MEV_BUILDER_FILES_ARTIFACT_NAME
elif launcher.builder_type == "flashbots":
elif (
launcher.builder_type == constants.FLASHBOTS_MEV_TYPE
or launcher.builder_type == constants.COMMIT_BOOST_MEV_TYPE
):
image = constants.DEFAULT_FLASHBOTS_BUILDER_IMAGE
cl_client_name = service_name.split("-")[4]
cmd.append("--engine.experimental")
Expand Down
26 changes: 0 additions & 26 deletions src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ def input_parser(plan, input_args):
vc_type=participant["vc_type"],
vc_image=participant["vc_image"],
vc_log_level=participant["vc_log_level"],
vc_count=participant["vc_count"],
vc_tolerations=participant["vc_tolerations"],
cl_extra_params=participant["cl_extra_params"],
cl_extra_labels=participant["cl_extra_labels"],
Expand Down Expand Up @@ -642,30 +641,6 @@ def parse_network_params(plan, input_args):
remote_signer_type, ""
)

if result["parallel_keystore_generation"] and participant["vc_count"] != 1:
fail(
"parallel_keystore_generation is only supported for 1 validator client per participant (for now)"
)

# If the num validator keys per node is not divisible by vc_count of a participant, fail
if (
participant["vc_count"] > 0
and result["network_params"]["num_validator_keys_per_node"]
% participant["vc_count"]
!= 0
):
fail(
"num_validator_keys_per_node: {0} is not divisible by vc_count: {1} for participant: {2}".format(
result["network_params"]["num_validator_keys_per_node"],
participant["vc_count"],
str(index + 1)
+ "-"
+ participant["el_type"]
+ "-"
+ participant["cl_type"],
)
)

snooper_enabled = participant["snooper_enabled"]
if snooper_enabled == None:
participant["snooper_enabled"] = result["snooper_enabled"]
Expand Down Expand Up @@ -972,7 +947,6 @@ def default_participant():
"vc_type": "",
"vc_image": "",
"vc_log_level": "",
"vc_count": 1,
"vc_extra_env_vars": {},
"vc_extra_labels": {},
"vc_extra_params": [],
Expand Down
3 changes: 0 additions & 3 deletions src/package_io/sanity_check.star
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ PARTICIPANT_CATEGORIES = {
"use_separate_vc",
"vc_type",
"vc_image",
"vc_count",
"vc_log_level",
"vc_extra_env_vars",
"vc_extra_labels",
Expand Down Expand Up @@ -96,7 +95,6 @@ PARTICIPANT_MATRIX_PARAMS = {
"use_separate_vc",
"vc_type",
"vc_image",
"vc_count",
"vc_log_level",
"vc_extra_env_vars",
"vc_extra_labels",
Expand All @@ -112,7 +110,6 @@ PARTICIPANT_MATRIX_PARAMS = {
"vc": [
"vc_type",
"vc_image",
"vc_count",
"vc_log_level",
"vc_extra_env_vars",
"vc_extra_labels",
Expand Down
Loading

0 comments on commit b61a128

Please sign in to comment.