Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from kurtosis-tech/derek/use-alterantive-node-n…
Browse files Browse the repository at this point in the history
…ames

Derek/use alterantive node names
  • Loading branch information
barnabasbusa authored Jul 10, 2023
2 parents 1a65fac + 5b37191 commit 4ba5bed
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ For example, this `eth-network-params.json` adds a second node, running a differ
"network_id": "3151908",
"deposit_contract_address": "0x4242424242424242424242424242424242424242",
"seconds_per_slot": 12,
"slots_per_epoch": 32,
"genesis_delay": 120,
"deneb_fork_epoch": 5
"deneb_fork_epoch": 500
},
"global_client_log_level": "info"
}
Expand Down
2 changes: 1 addition & 1 deletion default-network-params.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
"deneb_fork_epoch": 5
},
"global_client_log_level": "info"
}
}
7 changes: 6 additions & 1 deletion package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ DEFAULT_CL_IMAGES = {

BESU_NODE_NAME = "besu"
NETHERMIND_NODE_NAME = "nethermind"
NIMBUS_NODE_NAME = "nimbus"

ATTR_TO_BE_SKIPPED_AT_ROOT = ("network_params", "participants")

Expand Down Expand Up @@ -46,6 +47,8 @@ def parse_input(input_args):

if index == 0 and el_client_type in (BESU_NODE_NAME, NETHERMIND_NODE_NAME):
fail("besu/nethermind cant be the first participant")
if cl_client_type in (NIMBUS_NODE_NAME) and (result["network_params"]["seconds_per_slot"] < 12):
fail("nimbus can't be run with slot times below 12 seconds")
el_image = participant["el_client_image"]
if el_image == "":
default_image = DEFAULT_EL_IMAGES.get(el_client_type, "")
Expand Down Expand Up @@ -155,7 +158,9 @@ def default_network_params():
"seconds_per_slot": 12,
"slots_per_epoch": 32,
"genesis_delay": 120,
"deneb_fork_epoch": 5,
# arbitrarily large while we sort out https://github.com/kurtosis-tech/eth-network-package/issues/42
# this will take 53~ hoours for now
"deneb_fork_epoch": 500,
}

def default_participant():
Expand Down
8 changes: 3 additions & 5 deletions src/participant_network.star
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ participant_module = import_module("github.com/barnabasbusa/eth-network-package/

package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")

CL_CLIENT_SERVICE_NAME_PREFIX = "cl-client-"
EL_CLIENT_SERVICE_NAME_PREFIX = "el-client-"

BOOT_PARTICIPANT_INDEX = 0

# The time that the CL genesis generation step takes to complete, based off what we've seen
Expand Down Expand Up @@ -91,7 +88,8 @@ def launch_participant_network(plan, participants, network_params, global_log_le
fail("Unsupported launcher '{0}', need one of '{1}'".format(el_client_type, ",".join([el.name for el in el_launchers.keys()])))

el_launcher, launch_method = el_launchers[el_client_type]["launcher"], el_launchers[el_client_type]["launch_method"]
el_service_name = "{0}{1}".format(EL_CLIENT_SERVICE_NAME_PREFIX, index)
el_service_name = "{0}-{1}-{2}".format(el_client_type, participant.cl_client_type, index)


el_client_context = launch_method(
plan,
Expand Down Expand Up @@ -151,7 +149,7 @@ def launch_participant_network(plan, participants, network_params, global_log_le
fail("Unsupported launcher '{0}', need one of '{1}'".format(cl_client_type, ",".join([cl.name for cl in cl_launchers.keys()])))

cl_launcher, launch_method = cl_launchers[cl_client_type]["launcher"], cl_launchers[cl_client_type]["launch_method"]
cl_service_name = "{0}{1}".format(CL_CLIENT_SERVICE_NAME_PREFIX, index)
cl_service_name = "{0}-{1}-{2}".format(cl_client_type, participant.el_client_type, index)

new_cl_node_validator_keystores = preregistered_validator_keys_for_nodes[index]

Expand Down

0 comments on commit 4ba5bed

Please sign in to comment.