Commit d5ace6e0 authored by Guillaume Bouvignies's avatar Guillaume Bouvignies Committed by GitHub

Merge pull request #28 from kurtosis-tech/gbouv/remove-proto

Remove proto
parents ff21a822 54482e87
......@@ -40,12 +40,7 @@ Kurtosis will create a new enclave to house the services of the Ethereum network
Configuration
-------------
To configure the package behaviour, you can modify your `eth2-package-params.yaml` file. The full YAML schema that can be passed in is as follows with the defaults ([from here](https://github.com/kurtosis-tech/eth2-package/blob/master/types.proto) provided:
Note: Following an update starting the network post-merge, `erigon`, `nimbus` and `prysm` clients don't work anymore. Fixes are tracked in the following Github issues:
- Prysm: [#11508][prysm-issue]
- Nimbus: [#4193][nimbus-issue]
- Erigon: [#154][erigon-issue]
To configure the package behaviour, you can modify your `eth2-package-params.yaml` file. The full YAML schema that can be passed in is as follows with the defaults provided:
<details>
<summary>Click to show all configuration options</summary>
......@@ -170,6 +165,11 @@ Note: Following an update starting the network post-merge, `erigon`, `nimbus` an
```
</details>
Note: Following an update starting the network post-merge, `erigon`, `nimbus` and `prysm` clients don't work anymore. Fixes are tracked in the following Github issues:
- Prysm: [#11508][prysm-issue]
- Nimbus: [#4193][nimbus-issue]
- Erigon: [#154][erigon-issue]
You can find the latest Kiln compatible docker images here: https://notes.ethereum.org/@launchpad/kiln
Developing On This Package
......@@ -204,7 +204,7 @@ When you're happy with your changes:
<!------------------------ Only links below here -------------------------------->
[docker-installation]: https://docs.docker.com/get-docker/
[kurtosis-cli-installation]: https://docs.kurtosistech.com/installation.html
[kurtosis-cli-installation]: https://docs.kurtosis.com/install
[starlark-docs]: https://docs.kurtosis.com/reference/starlark-introduction
[using-the-cli]: https://docs.kurtosis.com/cli
[prysm-issue]: https://github.com/prysmaticlabs/prysm/issues/11508
......
# TBD
### Changes
- Repalced 'module' with 'package' where relevant
- Replaced 'module' with 'package' where relevant
- Removed protobuf types as they are now unsupported in Kurtosis.
- Renamed `kurtotis.mod` to `kurtosis.yml`
### Fixes
- Fixed a bug in `run` of `main.star` where we'd refer to `module_io` instead of `package_io`
......
......@@ -10,8 +10,6 @@ prometheus = import_module("github.com/kurtosis-tech/eth2-package/src/prometheus
grafana =import_module("github.com/kurtosis-tech/eth2-package/src/grafana/grafana_launcher.star")
testnet_verifier = import_module("github.com/kurtosis-tech/eth2-package/src/testnet_verifier/testnet_verifier.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
GRAFANA_USER = "admin"
GRAFANA_PASSWORD = "admin"
GRAFANA_DASHBOARD_PATH_URL = "/d/QdTOwy-nz/eth2-merge-kurtosis-module-dashboard?orgId=1"
......@@ -20,7 +18,8 @@ FIRST_NODE_FINALIZATION_FACT = "cl-boot-finalization-fact"
HTTP_PORT_ID_FOR_FACT = "http"
def run(input_args):
input_args_with_right_defaults = package_io.ModuleInput(parse_input.parse_input(input_args))
input_args_with_right_defaults = parse_input.parse_input(input_args)
num_participants = len(input_args_with_right_defaults.participants)
network_params = input_args_with_right_defaults.network_params
......@@ -84,12 +83,12 @@ def run(input_args):
print("First finalized epoch occurred successfully")
grafana_info = package_io.GrafanaInfo(
grafana_info = struct(
dashboard_path = GRAFANA_DASHBOARD_PATH_URL,
user = GRAFANA_USER,
password = GRAFANA_PASSWORD
)
output = package_io.ModuleOutput(grafana_info = grafana_info)
output = struct(grafana_info = grafana_info)
print(output)
return output
......
EL_CLIENT_TYPE = struct(
geth="geth",
erigon="erigon",
nethermind="nethermind",
besu="besu"
)
CL_CLIENT_TYPE = struct(
lighthouse="lighthouse",
teku="teku",
nimbus="nimbus",
prysm="prysm",
lodestar="lodestar"
)
GLOBAL_CLIENT_LOG_LEVEL = struct(
info="info",
error="error",
warn="warn",
debug="debug",
trace="trace",
)
......@@ -16,50 +16,33 @@ DEFAULT_CL_IMAGES = {
BESU_NODE_NAME = "besu"
NETHERMIND_NODE_NAME = "nethermind"
DESCRIPTOR_ATTR_NAME = "descriptor"
ATTR_TO_BE_SKIPPED_AT_ROOT = ("network_params", "participants", DESCRIPTOR_ATTR_NAME)
ENUM_TYPE = "proto.EnumValueDescriptor"
ATTR_TO_BE_SKIPPED_AT_ROOT = ("network_params", "participants")
def parse_input(input_args):
default_input = default_module_input()
result = {}
result = default_input_args()
for attr in dir(input_args):
value = getattr(input_args, attr)
# if its insterted we use the value inserted
if attr not in ATTR_TO_BE_SKIPPED_AT_ROOT and proto.has(input_args, attr):
result[attr] = get_value_or_name(value)
# if not we grab the value from the default value dictionary
elif attr not in ATTR_TO_BE_SKIPPED_AT_ROOT:
result[attr] = default_input[attr]
if attr not in ATTR_TO_BE_SKIPPED_AT_ROOT and hasattr(input_args, attr):
result[attr] = value
elif attr == "network_params":
result["network_params"] = {}
for sub_attr in dir(input_args.network_params):
sub_value = getattr(input_args.network_params, sub_attr)
# if its insterted we use the value inserted
if sub_attr not in (DESCRIPTOR_ATTR_NAME) and proto.has(input_args.network_params, sub_attr):
result["network_params"][sub_attr] = get_value_or_name(sub_value)
# if not we grab the value from the default value dictionary
elif sub_attr not in (DESCRIPTOR_ATTR_NAME):
result["network_params"][sub_attr] = default_input["network_params"][sub_attr]
# no participants are assigned at all
elif attr == "participants" and len(value) == 0:
result["participants"] = default_input["participants"]
# if its inserted we use the value inserted
if hasattr(input_args.network_params, sub_attr):
result["network_params"][sub_attr] = sub_value
elif attr == "participants":
participants = []
for participant in input_args.participants:
participant_value = {}
new_participant = default_participant()
for sub_attr in dir(participant):
sub_value = getattr(participant, sub_attr)
# if its insterted we use the value inserted
if sub_attr not in (DESCRIPTOR_ATTR_NAME) and proto.has(participant, sub_attr):
participant_value[sub_attr] = get_value_or_name(sub_value)
# if not we grab the value from the default value dictionary
elif sub_attr not in (DESCRIPTOR_ATTR_NAME):
participant_value[sub_attr] = default_input["participants"][0].get(sub_attr, None)
participants.append(participant_value)
# if its inserted we use the value inserted
if hasattr(participant, sub_attr):
new_participant[sub_attr] = sub_value
participants.append(new_participant)
result["participants"] = participants
# validation of the above defaults
for index, participant in enumerate(result["participants"]):
el_client_type = participant["el_client_type"]
......@@ -112,8 +95,33 @@ def parse_input(input_args):
if len(result["participants"]) >= 2 and result["participants"][1]["el_client_type"] == NETHERMIND_NODE_NAME:
fail("nethermind can't be the first or second node")
return result
return struct(
participants=[struct(
el_client_type=participant["el_client_type"],
el_client_image=participant["el_client_image"],
el_client_log_level=participant["el_client_log_level"],
cl_client_type=participant["cl_client_type"],
cl_client_image=participant["cl_client_image"],
cl_client_log_level=participant["cl_client_log_level"],
beacon_extra_params=participant["beacon_extra_params"],
el_extra_params=participant["el_extra_params"],
validator_extra_params=participant["validator_extra_params"],
builder_network_params=participant["builder_network_params"]
) for participant in result["participants"]],
network_params=struct(
preregistered_validator_keys_mnemonic=result["network_params"]["preregistered_validator_keys_mnemonic"],
num_validator_keys_per_node=result["network_params"]["num_validator_keys_per_node"],
network_id=result["network_params"]["network_id"],
deposit_contract_address=result["network_params"]["deposit_contract_address"],
seconds_per_slot=result["network_params"]["seconds_per_slot"],
slots_per_epoch=result["network_params"]["slots_per_epoch"],
),
launch_additional_services=result["launch_additional_services"],
wait_for_finalization=result["wait_for_finalization"],
wait_for_verifications=result["wait_for_verifications"],
verifications_epoch_limit=result["verifications_epoch_limit"],
global_client_log_level=result["global_client_log_level"]
)
def get_client_log_level_or_default(participant_log_level, global_log_level, client_log_levels):
log_level = participant_log_level
......@@ -123,16 +131,9 @@ def get_client_log_level_or_default(participant_log_level, global_log_level, cli
fail("No participant log level defined, and the client log level has no mapping for global log level '{0}'".format(global_log_level))
return log_level
def get_value_or_name(value):
if type(value) == ENUM_TYPE:
return value.name
return value
def default_module_input():
def default_input_args():
network_params = default_network_params()
participants = default_partitcipants()
participants = [default_participant()]
return {
"participants": participants,
"network_params": network_params,
......@@ -143,21 +144,19 @@ def default_module_input():
"global_client_log_level": "info"
}
def default_network_params():
# this is temporary till we get params working
return {
"preregistered_validator_keys_mnemonic" : "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete",
"num_validator_keys_per_node" : 64,
"network_id" : "3151908",
"deposit_contract_address" : "0x4242424242424242424242424242424242424242",
"seconds_per_slot" : 12,
"slots_per_epoch" : 32,
"preregistered_validator_keys_mnemonic": "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete",
"num_validator_keys_per_node": 64,
"network_id": "3151908",
"deposit_contract_address": "0x4242424242424242424242424242424242424242",
"seconds_per_slot": 12,
"slots_per_epoch": 32,
}
def default_partitcipants():
participant = {
def default_participant():
return {
"el_client_type": "geth",
"el_client_image": "",
"el_client_log_level": "",
......@@ -169,4 +168,3 @@ def default_partitcipants():
"validator_extra_params": [],
"builder_network_params": None
}
return [participant]
......@@ -4,7 +4,7 @@ cl_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/par
cl_node_metrics = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_node_metrics_info.star")
mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
LIGHTHOUSE_BINARY_COMMAND = "lighthouse"
......@@ -57,11 +57,11 @@ VALIDATOR_USED_PORTS = {
}
LIGHTHOUSE_LOG_LEVELS = {
package_io.GlobalClientLogLevel.error: "error",
package_io.GlobalClientLogLevel.warn: "warn",
package_io.GlobalClientLogLevel.info: "info",
package_io.GlobalClientLogLevel.debug: "debug",
package_io.GlobalClientLogLevel.trace: "trace",
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "error",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "info",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace",
}
BEACON_ENR_FACT_NAME = "beacon-enr-fact"
......
......@@ -4,7 +4,7 @@ cl_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/par
cl_node_metrics = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_node_metrics_info.star")
mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/consensus-data"
GENESIS_DATA_MOUNT_DIRPATH_ON_SERVICE_CONTAINER = "/genesis"
......@@ -44,11 +44,11 @@ USED_PORTS = {
LODESTAR_LOG_LEVELS = {
package_io.GlobalClientLogLevel.error: "error",
package_io.GlobalClientLogLevel.warn: "warn",
package_io.GlobalClientLogLevel.info: "info",
package_io.GlobalClientLogLevel.debug: "debug",
package_io.GlobalClientLogLevel.trace: "trace",
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "error",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "info",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace",
}
......
......@@ -3,7 +3,7 @@ parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_i
cl_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_node_metrics_info.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
GENESIS_DATA_MOUNTPOINT_ON_CLIENT = "/genesis-data"
......@@ -49,11 +49,11 @@ USED_PORTS = {
}
NIMBUS_LOG_LEVELS = {
package_io.GlobalClientLogLevel.error: "ERROR",
package_io.GlobalClientLogLevel.warn: "WARN",
package_io.GlobalClientLogLevel.info: "INFO",
package_io.GlobalClientLogLevel.debug: "DEBUG",
package_io.GlobalClientLogLevel.trace: "TRACE",
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE",
}
ENR_FACT_NAME = "enr-fact"
......
......@@ -4,7 +4,7 @@ cl_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/par
cl_node_metrics = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_node_metrics_info.star")
mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
IMAGE_SEPARATOR_DELIMITER = ","
EXPECTED_NUM_IMAGES = 2
......@@ -52,11 +52,11 @@ VALIDATOR_NODE_USED_PORTS = {
}
PRYSM_LOG_LEVELS = {
package_io.GlobalClientLogLevel.error: "error",
package_io.GlobalClientLogLevel.warn: "warn",
package_io.GlobalClientLogLevel.info: "info",
package_io.GlobalClientLogLevel.debug: "debug",
package_io.GlobalClientLogLevel.trace: "trace",
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "error",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "warn",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "info",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "debug",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace",
}
BEACON_ENR_FACT_NAME = "beacon-enr-fact"
......
......@@ -4,7 +4,7 @@ cl_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/par
cl_node_metrics = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_node_metrics_info.star")
mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
TEKU_BINARY_FILEPATH_IN_IMAGE = "/opt/teku/bin/teku"
......@@ -58,11 +58,11 @@ ENTRYPOINT_ARGS = ["sh", "-c"]
TEKU_LOG_LEVELS = {
package_io.GlobalClientLogLevel.error: "ERROR",
package_io.GlobalClientLogLevel.warn: "WARN",
package_io.GlobalClientLogLevel.info: "INFO",
package_io.GlobalClientLogLevel.debug: "DEBUG",
package_io.GlobalClientLogLevel.trace: "TRACE",
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE",
}
......
......@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u
parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
el_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/el_client_context.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
# The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/opt/besu/execution-data"
......@@ -37,11 +37,11 @@ USED_PORTS = {
ENTRYPOINT_ARGS = ["sh", "-c"]
BESU_LOG_LEVELS = {
package_io.GlobalClientLogLevel.error: "ERROR",
package_io.GlobalClientLogLevel.warn: "WARN",
package_io.GlobalClientLogLevel.info: "INFO",
package_io.GlobalClientLogLevel.debug: "DEBUG",
package_io.GlobalClientLogLevel.trace: "TRACE",
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE",
}
ENODE_FACT_NAME = "enode-fact"
......
......@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u
parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
el_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/el_client_context.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
# The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/home/erigon/execution-data"
......@@ -34,11 +34,11 @@ USED_PORTS = {
ENTRYPOINT_ARGS = ["sh", "-c"]
ERIGON_LOG_LEVELS = {
package_io.GlobalClientLogLevel.error: "1",
package_io.GlobalClientLogLevel.warn: "2",
package_io.GlobalClientLogLevel.info: "3",
package_io.GlobalClientLogLevel.debug: "4",
package_io.GlobalClientLogLevel.trace: "5",
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "1",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "2",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "3",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "4",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "5",
}
ENR_FACT_NAME = "enr-fact"
......
......@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u
parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
el_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/el_client_context.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
RPC_PORT_NUM = 8545
......@@ -48,11 +48,11 @@ ENR_FACT_NAME = "enr-fact"
ENODE_FACT_NAME = "enode-fact"
VERBOSITY_LEVELS = {
package_io.GlobalClientLogLevel.error: "1",
package_io.GlobalClientLogLevel.warn: "2",
package_io.GlobalClientLogLevel.info: "3",
package_io.GlobalClientLogLevel.debug: "4",
package_io.GlobalClientLogLevel.trace: "5",
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "1",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "2",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "3",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "4",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "5",
}
def launch(
......
......@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u
parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
el_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/el_client_context.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
# The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/execution-data"
......@@ -32,11 +32,11 @@ USED_PORTS = {
}
NETHERMIND_LOG_LEVELS = {
package_io.GlobalClientLogLevel.error: "ERROR",
package_io.GlobalClientLogLevel.warn: "WARN",
package_io.GlobalClientLogLevel.info: "INFO",
package_io.GlobalClientLogLevel.debug: "DEBUG",
package_io.GlobalClientLogLevel.trace: "TRACE",
package_io.GLOBAL_CLIENT_LOG_LEVEL.error: "ERROR",
package_io.GLOBAL_CLIENT_LOG_LEVEL.warn: "WARN",
package_io.GLOBAL_CLIENT_LOG_LEVEL.info: "INFO",
package_io.GLOBAL_CLIENT_LOG_LEVEL.debug: "DEBUG",
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE",
}
ENODE_FACT_NAME = "enode-fact"
......
......@@ -2,7 +2,7 @@ cl_validator_keystores = import_module("github.com/kurtosis-tech/eth2-package/sr
el_genesis_data_generator = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data_generator.star")
cl_genesis_data_generator = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/cl_genesis/cl_genesis_data_generator.star")
mev_boost_launcher_module = ("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_launcher.star")
mev_boost_launcher_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_launcher.star")
static_files = import_module("github.com/kurtosis-tech/eth2-package/src/static_files/static_files.star")
......@@ -21,7 +21,7 @@ teku = import_module("github.com/kurtosis-tech/eth2-package/src/participant_netw
genesis_constants = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/genesis_constants/genesis_constants.star")
participant_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/participant.star")
package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
CL_CLIENT_SERVICE_ID_PREFIX = "cl-client-"
EL_CLIENT_SERVICE_ID_PREFIX = "el-client-"
......@@ -78,10 +78,10 @@ def launch_participant_network(participants, network_params, global_log_level):
print("Uploaded GETH files succesfully, launching EL participants")
el_launchers = {
package_io.ELClientType.geth : {"launcher": geth.new_geth_launcher(network_params.network_id, el_genesis_data, geth_prefunded_keys_artifact_id, genesis_constants.PRE_FUNDED_ACCOUNTS), "launch_method": geth.launch},
package_io.ELClientType.besu : {"launcher": besu.new_besu_launcher(network_params.network_id, el_genesis_data), "launch_method": besu.launch},
package_io.ELClientType.erigon : {"launcher": erigon.new_erigon_launcher(network_params.network_id, el_genesis_data), "launch_method": erigon.launch},
package_io.ELClientType.nethermind : {"launcher": nethermind.new_nethermind_launcher(el_genesis_data), "launch_method": nethermind.launch},
package_io.EL_CLIENT_TYPE.geth : {"launcher": geth.new_geth_launcher(network_params.network_id, el_genesis_data, geth_prefunded_keys_artifact_id, genesis_constants.PRE_FUNDED_ACCOUNTS), "launch_method": geth.launch},
package_io.EL_CLIENT_TYPE.besu : {"launcher": besu.new_besu_launcher(network_params.network_id, el_genesis_data), "launch_method": besu.launch},
package_io.EL_CLIENT_TYPE.erigon : {"launcher": erigon.new_erigon_launcher(network_params.network_id, el_genesis_data), "launch_method": erigon.launch},
package_io.EL_CLIENT_TYPE.nethermind : {"launcher": nethermind.new_nethermind_launcher(el_genesis_data), "launch_method": nethermind.launch},
}
all_el_client_contexts = []
......@@ -136,11 +136,11 @@ def launch_participant_network(participants, network_params, global_log_level):
print("Launching CL network")
cl_launchers = {
package_io.CLClientType.lighthouse : {"launcher": lighthouse.new_lighthouse_launcher(cl_genesis_data), "launch_method": lighthouse.launch},
package_io.CLClientType.lodestar: {"launcher": lodestar.new_lodestar_launcher(cl_genesis_data), "launch_method": lodestar.launch},
package_io.CLClientType.nimbus: {"launcher": nimbus.new_nimbus_launcher(cl_genesis_data), "launch_method": nimbus.launch},
package_io.CLClientType.prysm: {"launcher": prysm.new_prysm_launcher(cl_genesis_data, cl_validator_data.prysm_password_relative_filepath, cl_validator_data.prysm_password_artifact_uuid), "launch_method": prysm.launch},
package_io.CLClientType.teku: {"launcher": teku.new_teku_launcher(cl_genesis_data), "launch_method": teku.launch},
package_io.CL_CLIENT_TYPE.lighthouse : {"launcher": lighthouse.new_lighthouse_launcher(cl_genesis_data), "launch_method": lighthouse.launch},
package_io.CL_CLIENT_TYPE.lodestar: {"launcher": lodestar.new_lodestar_launcher(cl_genesis_data), "launch_method": lodestar.launch},
package_io.CL_CLIENT_TYPE.nimbus: {"launcher": nimbus.new_nimbus_launcher(cl_genesis_data), "launch_method": nimbus.launch},
package_io.CL_CLIENT_TYPE.prysm: {"launcher": prysm.new_prysm_launcher(cl_genesis_data, cl_validator_data.prysm_password_relative_filepath, cl_validator_data.prysm_password_artifact_uuid), "launch_method": prysm.launch},
package_io.CL_CLIENT_TYPE.teku: {"launcher": teku.new_teku_launcher(cl_genesis_data), "launch_method": teku.launch},
}
all_cl_client_contexts = []
......@@ -162,7 +162,7 @@ def launch_participant_network(participants, network_params, global_log_level):
mev_boost_context = None
if proto.has(participant, "builder_network_params"):
if hasattr(participant, "builder_network_params") and participant.builder_network_params != None:
mev_boost_launcher = mev_boost_launcher_module.new_mev_boost_launcher(MEV_BOOST_SHOULD_CHECK_RELAY, participant.builder_network_params.relay_endpoints)
mev_boost_service_id = MEV_BOOST_SERVICE_ID_PREFIX.format(1)
mev_boost_context = mev_boost_launcher_module.launch_mevboost(mev_boost_launcher, mev_boost_service_id, network_params.network_id)
......
syntax = "proto3";
// Module Input
message ModuleInput {
// Parameters controlling the types of clients that compose the network
repeated Participant participants = 1;
// Parameters controlling the settings of the network itself
optional NetworkParams network_params = 2;
// True by defaults such that in addition to the Ethereum network:
// - A transaction spammer is launched to fake transactions sent to the network
// - Forkmon will be launched after CL genesis has happened
// - a prometheus will be started, coupled with grafana
// If set to false:
// - only Ethereum network (EL and CL nodes) will be launched. Nothing else (no transaction spammer)
// - params for the CL nodes will be ignored (e.g. CL node image, CL node extra params)
// This is a hack - it's not very elegant - but this is a commonly-requested feature
// The longterm solution is making the package trivial to decompose so we don't need flags like this; we're working
// on this at the Kurtosis product level
optional bool launch_additional_services = 3;
// If set, the package will block until a finalized epoch has occurred.
// If `waitForVerifications` is set to true, this extra wait will be skipped.
optional bool wait_for_finalization = 4;
// If set to true, the package will block until all verifications have passed
optional bool wait_for_verifications = 5;
// If set, after the merge, this will be the maximum number of epochs wait for the verifications to succeed.
optional uint64 verifications_epoch_limit = 6;
// The log level that the started clients should log at
optional GlobalClientLogLevel global_client_log_level = 7;
}
enum GlobalClientLogLevel {
info = 0;
error = 1;
warn = 2;
debug = 3;
trace = 4;
}
enum ELClientType {
geth = 0;
erigon = 1;
nethermind = 2;
besu = 3;
}
enum CLClientType {
lighthouse = 0;
teku = 1;
nimbus = 2;
prysm = 3;
lodestar = 4;
}
message BuilderNetworkParams {
// A list of endpoints to reach block builder relays
repeated string relay_endpoints = 1;
}
message Participant {
// The type of EL client that should be started
optional ELClientType el_client_type = 1;
// The Docker image that should be used for the EL client; leave blank to use the default
optional string el_client_image = 2;
// The log level string that this participant's EL 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 Geth would receive `3`, Besu would receive `INFO`, etc.)
// If this is not emptystring, then this value will override the global `logLevel` setting to allow for fine-grained control
// over a specific participant's logging
optional string el_client_log_level = 3;
// Optional extra parameters that will be passed to the EL client
repeated string el_extra_params = 4;
// The type of CL client that should be started
optional CLClientType cl_client_type = 5;
// The Docker image that should be used for the EL client; leave blank to use the default
// NOTE: Prysm is different in that it requires two images - a Beacon and a validator
// For Prysm and Prysm only, this field should contain a comma-separated string of "beacon_image,validator_image"
optional string cl_client_image = 6;
// The log level string that this participant's CL 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 Nimbus would receive `INFO`, Prysm would receive `info`, etc.)
// If this is not emptystring, then this value will override the global `logLevel` setting to allow for fine-grained control
// over a specific participant's logging
optional string cl_client_log_level = 7;
// Extra parameters that will be passed to the Beacon container (if a separate one exists), or to the combined node if
// the Beacon and validator are combined
repeated string beacon_extra_params = 8;
// Extra parameters that will be passed to the validator container (if a separate one exists), or to the combined node if
// the Beacon and validator are combined
repeated string validator_extra_params = 9;
optional BuilderNetworkParams builder_network_params = 10;
}
message NetworkParams {
// The network ID of the Eth1 network
optional string network_id = 1;
// The address of the staking contract address on the Eth1 chain
optional string deposit_contract_address = 2;
// Number of seconds per slot on the Beacon chain
optional uint32 seconds_per_slot = 3;
// Number of slots in an epoch on the Beacon chain
optional uint32 slots_per_epoch = 4;
// The number of validator keys that each CL validator node should get
optional uint32 num_validator_keys_per_node = 5;
// This menmonic will a) be used to create keystores for all the types of validators that we have and b) be used to generate a CL genesis.ssz that has the children
// validator keys already preregistered as validators
optional string preregistered_validator_keys_mnemonic = 6;
}
// Module Output
message ModuleOutput {
GrafanaInfo grafana_info = 1;
}
message GrafanaInfo {
string dashboard_path = 1;
string user = 2;
string password = 3;
}
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