Commit 34ce039e authored by Gyanendra Mishra's avatar Gyanendra Mishra Committed by GitHub

Merge pull request #26 from kurtosis-tech/gyani/package-module

convert module -> package
parents 6f89561f 4cbebcbc
Ethereum Module Ethereum Package
======================= =======================
This is a [Kurtosis Starlark module][starlark-docs] that will: This is a [Kurtosis Starlark Package][starlark-docs] that will:
1. Generate EL & CL genesis information using [this genesis generator](https://github.com/skylenet/ethereum-genesis-generator) 1. Generate EL & CL genesis information using [this genesis generator](https://github.com/skylenet/ethereum-genesis-generator)
1. Spin up a network of mining Eth1 clients 1. Spin up a network of mining Eth1 clients
...@@ -21,15 +21,15 @@ Quickstart ...@@ -21,15 +21,15 @@ Quickstart
```bash ```bash
docker image ls docker image ls
``` ```
1. Create a file in your home directory `eth2-module-params.json` with the following contents: 1. Create a file in your home directory `eth2-package-params.json` with the following contents:
```yaml ```yaml
global_client_log_level: "info" global_client_log_level: "info"
``` ```
1. Execute the module, passing in the params from the file: 1. Run the package, passing in the params from the file:
```bash ```bash
kurtosis exec --enclave-id eth2 github.com/kurtosis-tech/eth2-module --args "$(cat ~/eth2-module-params.json)" kurtosis run --enclave-id eth2 github.com/kurtosis-tech/eth2-package --args "$(cat ~/eth2-package-params.json)"
``` ```
Management Management
...@@ -40,7 +40,7 @@ Kurtosis will create a new enclave to house the services of the Ethereum network ...@@ -40,7 +40,7 @@ Kurtosis will create a new enclave to house the services of the Ethereum network
Configuration Configuration
------------- -------------
To configure the module behaviour, you can modify your `eth2-module-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-module/blob/master/types.proto) provided: 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: 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] - Prysm: [#11508][prysm-issue]
...@@ -152,11 +152,11 @@ Note: Following an update starting the network post-merge, `erigon`, `nimbus` an ...@@ -152,11 +152,11 @@ Note: Following an update starting the network post-merge, `erigon`, `nimbus` an
// - params for the CL nodes will be ignored (e.g. CL node image, CL node extra params) // - params for the CL nodes will be ignored (e.g. CL node image, CL node extra params)
"launch_additional_services": true, "launch_additional_services": true,
// If set, the module will block until a finalized epoch has occurred. // If set, the package will block until a finalized epoch has occurred.
// If `waitForVerifications` is set to true, this extra wait will be skipped. // If `waitForVerifications` is set to true, this extra wait will be skipped.
"wait_for_finalization": false, "wait_for_finalization": false,
// If set to true, the module will block until all verifications have passed // If set to true, the package will block until all verifications have passed
"wait_for_verifications": false, "wait_for_verifications": false,
// If set, after the merge, this will be the maximum number of epochs wait for the verifications to succeed. // If set, after the merge, this will be the maximum number of epochs wait for the verifications to succeed.
...@@ -172,21 +172,21 @@ Note: Following an update starting the network post-merge, `erigon`, `nimbus` an ...@@ -172,21 +172,21 @@ Note: Following an update starting the network post-merge, `erigon`, `nimbus` an
You can find the latest Kiln compatible docker images here: https://notes.ethereum.org/@launchpad/kiln You can find the latest Kiln compatible docker images here: https://notes.ethereum.org/@launchpad/kiln
Developing On This Module Developing On This Package
------------------------- -------------------------
First, install prerequisites: First, install prerequisites:
1. [Install Kurtosis itself][kurtosis-cli-installation] 1. [Install Kurtosis itself][kurtosis-cli-installation]
Then, run the dev loop: Then, run the dev loop:
1. Make your code changes 1. Make your code changes
1. Rebuild and re-execute the module by running the following from the root of the repo: 1. Rebuild and re-run the package by running the following from the root of the repo:
```bash ```bash
kurtosis exec . --args "{}" kurtosis run . --args "{}"
``` ```
NOTE 1: You can change the value of the `--args` flag to pass in extra configuration to the module per the "Configuration" section above! NOTE 1: You can change the value of the `--args` flag to pass in extra configuration to the package per the "Configuration" section above!
NOTE 2: The `--args` flag accepts JSON. NOTE 2: The `--args` flag accepts JSON.
To get detailed information about the structure of the module, visit [the architecture docs](./docs/architecture.md). To get detailed information about the structure of the package, visit [the architecture docs](./docs/architecture.md).
When you're happy with your changes: When you're happy with your changes:
- Add an entry to `docs/changelog.md` under the `# TBD` header describing your changes (this is required for CI checks to pass!) - Add an entry to `docs/changelog.md` under the `# TBD` header describing your changes (this is required for CI checks to pass!)
...@@ -200,7 +200,7 @@ When you're happy with your changes: ...@@ -200,7 +200,7 @@ When you're happy with your changes:
## Known Bugs ## Known Bugs
`wait_for_epoch_finalization` - doesn't work as expected, as Starlark doesn't have ways to do assertions on facts just yet. The [issue](https://github.com/kurtosis-tech/eth2-module/issues/15) tracks this. `wait_for_epoch_finalization` - doesn't work as expected, as Starlark doesn't have ways to do assertions on facts just yet. The [issue](https://github.com/kurtosis-tech/eth2-package/issues/15) tracks this.
<!------------------------ Only links below here --------------------------------> <!------------------------ Only links below here -------------------------------->
[docker-installation]: https://docs.docker.com/get-docker/ [docker-installation]: https://docs.docker.com/get-docker/
......
# TBD # TBD
### Changes
- Repalced 'module' with 'package' where relevant
# 0.0.2 # 0.0.2
### Features ### Features
......
module: module:
name: "github.com/kurtosis-tech/eth2-module" name: "github.com/kurtosis-tech/eth2-package"
participant_network = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/participant_network.star") participant_network = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/participant_network.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
static_files = import_module("github.com/kurtosis-tech/eth2-module/src/static_files/static_files.star") static_files = import_module("github.com/kurtosis-tech/eth2-package/src/static_files/static_files.star")
genesis_constants = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/genesis_constants/genesis_constants.star") genesis_constants = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/genesis_constants/genesis_constants.star")
transaction_spammer = import_module("github.com/kurtosis-tech/eth2-module/src/transaction_spammer/transaction_spammer.star") transaction_spammer = import_module("github.com/kurtosis-tech/eth2-package/src/transaction_spammer/transaction_spammer.star")
forkmon = import_module("github.com/kurtosis-tech/eth2-module/src/forkmon/forkmon_launcher.star") forkmon = import_module("github.com/kurtosis-tech/eth2-package/src/forkmon/forkmon_launcher.star")
prometheus = import_module("github.com/kurtosis-tech/eth2-module/src/prometheus/prometheus_launcher.star") prometheus = import_module("github.com/kurtosis-tech/eth2-package/src/prometheus/prometheus_launcher.star")
grafana =import_module("github.com/kurtosis-tech/eth2-module/src/grafana/grafana_launcher.star") grafana =import_module("github.com/kurtosis-tech/eth2-package/src/grafana/grafana_launcher.star")
testnet_verifier = import_module("github.com/kurtosis-tech/eth2-module/src/testnet_verifier/testnet_verifier.star") testnet_verifier = import_module("github.com/kurtosis-tech/eth2-package/src/testnet_verifier/testnet_verifier.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
GRAFANA_USER = "admin" GRAFANA_USER = "admin"
GRAFANA_PASSWORD = "admin" GRAFANA_PASSWORD = "admin"
...@@ -84,12 +84,12 @@ def run(input_args): ...@@ -84,12 +84,12 @@ def run(input_args):
print("First finalized epoch occurred successfully") print("First finalized epoch occurred successfully")
grafana_info = module_io.GrafanaInfo( grafana_info = package_io.GrafanaInfo(
dashboard_path = GRAFANA_DASHBOARD_PATH_URL, dashboard_path = GRAFANA_DASHBOARD_PATH_URL,
user = GRAFANA_USER, user = GRAFANA_USER,
password = GRAFANA_PASSWORD password = GRAFANA_PASSWORD
) )
output = module_io.ModuleOutput(grafana_info = grafana_info) output = package_io.ModuleOutput(grafana_info = grafana_info)
print(output) print(output)
return output return output
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
SERVICE_ID = "forkmon" SERVICE_ID = "forkmon"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
static_files = import_module("github.com/kurtosis-tech/eth2-module/src/static_files/static_files.star") static_files = import_module("github.com/kurtosis-tech/eth2-package/src/static_files/static_files.star")
SERVICE_ID = "grafana" SERVICE_ID = "grafana"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/cl_client_context.star") 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-module/src/participant_network/cl/cl_node_metrics_info.star") 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-module/src/participant_network/mev_boost/mev_boost_context.star") mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
LIGHTHOUSE_BINARY_COMMAND = "lighthouse" LIGHTHOUSE_BINARY_COMMAND = "lighthouse"
...@@ -57,11 +57,11 @@ VALIDATOR_USED_PORTS = { ...@@ -57,11 +57,11 @@ VALIDATOR_USED_PORTS = {
} }
LIGHTHOUSE_LOG_LEVELS = { LIGHTHOUSE_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "error", package_io.GlobalClientLogLevel.error: "error",
module_io.GlobalClientLogLevel.warn: "warn", package_io.GlobalClientLogLevel.warn: "warn",
module_io.GlobalClientLogLevel.info: "info", package_io.GlobalClientLogLevel.info: "info",
module_io.GlobalClientLogLevel.debug: "debug", package_io.GlobalClientLogLevel.debug: "debug",
module_io.GlobalClientLogLevel.trace: "trace", package_io.GlobalClientLogLevel.trace: "trace",
} }
BEACON_ENR_FACT_NAME = "beacon-enr-fact" BEACON_ENR_FACT_NAME = "beacon-enr-fact"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/cl_client_context.star") 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-module/src/participant_network/cl/cl_node_metrics_info.star") 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-module/src/participant_network/mev_boost/mev_boost_context.star") mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/consensus-data" CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/consensus-data"
GENESIS_DATA_MOUNT_DIRPATH_ON_SERVICE_CONTAINER = "/genesis" GENESIS_DATA_MOUNT_DIRPATH_ON_SERVICE_CONTAINER = "/genesis"
...@@ -44,11 +44,11 @@ USED_PORTS = { ...@@ -44,11 +44,11 @@ USED_PORTS = {
LODESTAR_LOG_LEVELS = { LODESTAR_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "error", package_io.GlobalClientLogLevel.error: "error",
module_io.GlobalClientLogLevel.warn: "warn", package_io.GlobalClientLogLevel.warn: "warn",
module_io.GlobalClientLogLevel.info: "info", package_io.GlobalClientLogLevel.info: "info",
module_io.GlobalClientLogLevel.debug: "debug", package_io.GlobalClientLogLevel.debug: "debug",
module_io.GlobalClientLogLevel.trace: "trace", package_io.GlobalClientLogLevel.trace: "trace",
} }
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/cl_client_context.star") 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-module/src/participant_network/cl/cl_node_metrics_info.star") cl_node_metrics = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_node_metrics_info.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
GENESIS_DATA_MOUNTPOINT_ON_CLIENT = "/genesis-data" GENESIS_DATA_MOUNTPOINT_ON_CLIENT = "/genesis-data"
...@@ -49,11 +49,11 @@ USED_PORTS = { ...@@ -49,11 +49,11 @@ USED_PORTS = {
} }
NIMBUS_LOG_LEVELS = { NIMBUS_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "ERROR", package_io.GlobalClientLogLevel.error: "ERROR",
module_io.GlobalClientLogLevel.warn: "WARN", package_io.GlobalClientLogLevel.warn: "WARN",
module_io.GlobalClientLogLevel.info: "INFO", package_io.GlobalClientLogLevel.info: "INFO",
module_io.GlobalClientLogLevel.debug: "DEBUG", package_io.GlobalClientLogLevel.debug: "DEBUG",
module_io.GlobalClientLogLevel.trace: "TRACE", package_io.GlobalClientLogLevel.trace: "TRACE",
} }
ENR_FACT_NAME = "enr-fact" ENR_FACT_NAME = "enr-fact"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/cl_client_context.star") 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-module/src/participant_network/cl/cl_node_metrics_info.star") 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-module/src/participant_network/mev_boost/mev_boost_context.star") mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
IMAGE_SEPARATOR_DELIMITER = "," IMAGE_SEPARATOR_DELIMITER = ","
EXPECTED_NUM_IMAGES = 2 EXPECTED_NUM_IMAGES = 2
...@@ -52,11 +52,11 @@ VALIDATOR_NODE_USED_PORTS = { ...@@ -52,11 +52,11 @@ VALIDATOR_NODE_USED_PORTS = {
} }
PRYSM_LOG_LEVELS = { PRYSM_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "error", package_io.GlobalClientLogLevel.error: "error",
module_io.GlobalClientLogLevel.warn: "warn", package_io.GlobalClientLogLevel.warn: "warn",
module_io.GlobalClientLogLevel.info: "info", package_io.GlobalClientLogLevel.info: "info",
module_io.GlobalClientLogLevel.debug: "debug", package_io.GlobalClientLogLevel.debug: "debug",
module_io.GlobalClientLogLevel.trace: "trace", package_io.GlobalClientLogLevel.trace: "trace",
} }
BEACON_ENR_FACT_NAME = "beacon-enr-fact" BEACON_ENR_FACT_NAME = "beacon-enr-fact"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/cl_client_context.star") 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-module/src/participant_network/cl/cl_node_metrics_info.star") 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-module/src/participant_network/mev_boost/mev_boost_context.star") mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
TEKU_BINARY_FILEPATH_IN_IMAGE = "/opt/teku/bin/teku" TEKU_BINARY_FILEPATH_IN_IMAGE = "/opt/teku/bin/teku"
...@@ -58,11 +58,11 @@ ENTRYPOINT_ARGS = ["sh", "-c"] ...@@ -58,11 +58,11 @@ ENTRYPOINT_ARGS = ["sh", "-c"]
TEKU_LOG_LEVELS = { TEKU_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "ERROR", package_io.GlobalClientLogLevel.error: "ERROR",
module_io.GlobalClientLogLevel.warn: "WARN", package_io.GlobalClientLogLevel.warn: "WARN",
module_io.GlobalClientLogLevel.info: "INFO", package_io.GlobalClientLogLevel.info: "INFO",
module_io.GlobalClientLogLevel.debug: "DEBUG", package_io.GlobalClientLogLevel.debug: "DEBUG",
module_io.GlobalClientLogLevel.trace: "TRACE", package_io.GlobalClientLogLevel.trace: "TRACE",
} }
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") 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-module/src/participant_network/el/el_client_context.star") el_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/el_client_context.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
# 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"
...@@ -37,11 +37,11 @@ USED_PORTS = { ...@@ -37,11 +37,11 @@ USED_PORTS = {
ENTRYPOINT_ARGS = ["sh", "-c"] ENTRYPOINT_ARGS = ["sh", "-c"]
BESU_LOG_LEVELS = { BESU_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "ERROR", package_io.GlobalClientLogLevel.error: "ERROR",
module_io.GlobalClientLogLevel.warn: "WARN", package_io.GlobalClientLogLevel.warn: "WARN",
module_io.GlobalClientLogLevel.info: "INFO", package_io.GlobalClientLogLevel.info: "INFO",
module_io.GlobalClientLogLevel.debug: "DEBUG", package_io.GlobalClientLogLevel.debug: "DEBUG",
module_io.GlobalClientLogLevel.trace: "TRACE", package_io.GlobalClientLogLevel.trace: "TRACE",
} }
ENODE_FACT_NAME = "enode-fact" ENODE_FACT_NAME = "enode-fact"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") 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-module/src/participant_network/el/el_client_context.star") el_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/el_client_context.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
# 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"
...@@ -34,11 +34,11 @@ USED_PORTS = { ...@@ -34,11 +34,11 @@ USED_PORTS = {
ENTRYPOINT_ARGS = ["sh", "-c"] ENTRYPOINT_ARGS = ["sh", "-c"]
ERIGON_LOG_LEVELS = { ERIGON_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "1", package_io.GlobalClientLogLevel.error: "1",
module_io.GlobalClientLogLevel.warn: "2", package_io.GlobalClientLogLevel.warn: "2",
module_io.GlobalClientLogLevel.info: "3", package_io.GlobalClientLogLevel.info: "3",
module_io.GlobalClientLogLevel.debug: "4", package_io.GlobalClientLogLevel.debug: "4",
module_io.GlobalClientLogLevel.trace: "5", package_io.GlobalClientLogLevel.trace: "5",
} }
ENR_FACT_NAME = "enr-fact" ENR_FACT_NAME = "enr-fact"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") 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-module/src/participant_network/el/el_client_context.star") el_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/el_client_context.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
RPC_PORT_NUM = 8545 RPC_PORT_NUM = 8545
...@@ -48,11 +48,11 @@ ENR_FACT_NAME = "enr-fact" ...@@ -48,11 +48,11 @@ ENR_FACT_NAME = "enr-fact"
ENODE_FACT_NAME = "enode-fact" ENODE_FACT_NAME = "enode-fact"
VERBOSITY_LEVELS = { VERBOSITY_LEVELS = {
module_io.GlobalClientLogLevel.error: "1", package_io.GlobalClientLogLevel.error: "1",
module_io.GlobalClientLogLevel.warn: "2", package_io.GlobalClientLogLevel.warn: "2",
module_io.GlobalClientLogLevel.info: "3", package_io.GlobalClientLogLevel.info: "3",
module_io.GlobalClientLogLevel.debug: "4", package_io.GlobalClientLogLevel.debug: "4",
module_io.GlobalClientLogLevel.trace: "5", package_io.GlobalClientLogLevel.trace: "5",
} }
def launch( def launch(
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star") 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-module/src/participant_network/el/el_client_context.star") el_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/el_client_context.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
# 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"
...@@ -32,11 +32,11 @@ USED_PORTS = { ...@@ -32,11 +32,11 @@ USED_PORTS = {
} }
NETHERMIND_LOG_LEVELS = { NETHERMIND_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "ERROR", package_io.GlobalClientLogLevel.error: "ERROR",
module_io.GlobalClientLogLevel.warn: "WARN", package_io.GlobalClientLogLevel.warn: "WARN",
module_io.GlobalClientLogLevel.info: "INFO", package_io.GlobalClientLogLevel.info: "INFO",
module_io.GlobalClientLogLevel.debug: "DEBUG", package_io.GlobalClientLogLevel.debug: "DEBUG",
module_io.GlobalClientLogLevel.trace: "TRACE", package_io.GlobalClientLogLevel.trace: "TRACE",
} }
ENODE_FACT_NAME = "enode-fact" ENODE_FACT_NAME = "enode-fact"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
mev_boost_context = ("github.com/kurtosis-tech/eth2-module/src/participant_network/mev_boost/mev_boost_context.star") mev_boost_context = ("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
FLASHBOTS_MEV_BOOST_IMAGE = "flashbots/mev-boost" FLASHBOTS_MEV_BOOST_IMAGE = "flashbots/mev-boost"
FLASHBOTS_MEV_BOOST_PORT = 18550 FLASHBOTS_MEV_BOOST_PORT = 18550
......
cl_validator_keystores = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/cl_validator_keystores/cl_validator_keystore_generator.star") cl_validator_keystores = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/cl_validator_keystores/cl_validator_keystore_generator.star")
el_genesis_data_generator = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data_generator.star") 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-module/src/participant_network/prelaunch_data_generator/cl_genesis/cl_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-module/src/participant_network/mev_boost/mev_boost_launcher.star") mev_boost_launcher_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-module/src/static_files/static_files.star") static_files = import_module("github.com/kurtosis-tech/eth2-package/src/static_files/static_files.star")
geth = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/el/geth/geth_launcher.star") geth = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/geth/geth_launcher.star")
besu = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/el/besu/besu_launcher.star") besu = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/besu/besu_launcher.star")
erigon = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/el/erigon/erigon_launcher.star") erigon = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/erigon/erigon_launcher.star")
nethermind = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/el/nethermind/nethermind_launcher.star") nethermind = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/el/nethermind/nethermind_launcher.star")
lighthouse = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/lighthouse/lighthouse_launcher.star") lighthouse = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/lighthouse/lighthouse_launcher.star")
lodestar = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/lodestar/lodestar_launcher.star") lodestar = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/lodestar/lodestar_launcher.star")
nimbus = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/nimbus/nimbus_launcher.star") nimbus = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/nimbus/nimbus_launcher.star")
prysm = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/prysm/prysm_launcher.star") prysm = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/prysm/prysm_launcher.star")
teku = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/teku/teku_launcher.star") teku = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/teku/teku_launcher.star")
genesis_constants = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/genesis_constants/genesis_constants.star") 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-module/src/participant_network/participant.star") participant_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/participant.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") package_io = import_types("github.com/kurtosis-tech/eth2-package/types.proto")
CL_CLIENT_SERVICE_ID_PREFIX = "cl-client-" CL_CLIENT_SERVICE_ID_PREFIX = "cl-client-"
EL_CLIENT_SERVICE_ID_PREFIX = "el-client-" EL_CLIENT_SERVICE_ID_PREFIX = "el-client-"
...@@ -78,10 +78,10 @@ def launch_participant_network(participants, network_params, global_log_level): ...@@ -78,10 +78,10 @@ def launch_participant_network(participants, network_params, global_log_level):
print("Uploaded GETH files succesfully, launching EL participants") print("Uploaded GETH files succesfully, launching EL participants")
el_launchers = { el_launchers = {
module_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.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},
module_io.ELClientType.besu : {"launcher": besu.new_besu_launcher(network_params.network_id, el_genesis_data), "launch_method": besu.launch}, package_io.ELClientType.besu : {"launcher": besu.new_besu_launcher(network_params.network_id, el_genesis_data), "launch_method": besu.launch},
module_io.ELClientType.erigon : {"launcher": erigon.new_erigon_launcher(network_params.network_id, el_genesis_data), "launch_method": erigon.launch}, package_io.ELClientType.erigon : {"launcher": erigon.new_erigon_launcher(network_params.network_id, el_genesis_data), "launch_method": erigon.launch},
module_io.ELClientType.nethermind : {"launcher": nethermind.new_nethermind_launcher(el_genesis_data), "launch_method": nethermind.launch}, package_io.ELClientType.nethermind : {"launcher": nethermind.new_nethermind_launcher(el_genesis_data), "launch_method": nethermind.launch},
} }
all_el_client_contexts = [] all_el_client_contexts = []
...@@ -136,11 +136,11 @@ def launch_participant_network(participants, network_params, global_log_level): ...@@ -136,11 +136,11 @@ def launch_participant_network(participants, network_params, global_log_level):
print("Launching CL network") print("Launching CL network")
cl_launchers = { cl_launchers = {
module_io.CLClientType.lighthouse : {"launcher": lighthouse.new_lighthouse_launcher(cl_genesis_data), "launch_method": lighthouse.launch}, package_io.CLClientType.lighthouse : {"launcher": lighthouse.new_lighthouse_launcher(cl_genesis_data), "launch_method": lighthouse.launch},
module_io.CLClientType.lodestar: {"launcher": lodestar.new_lodestar_launcher(cl_genesis_data), "launch_method": lodestar.launch}, package_io.CLClientType.lodestar: {"launcher": lodestar.new_lodestar_launcher(cl_genesis_data), "launch_method": lodestar.launch},
module_io.CLClientType.nimbus: {"launcher": nimbus.new_nimbus_launcher(cl_genesis_data), "launch_method": nimbus.launch}, package_io.CLClientType.nimbus: {"launcher": nimbus.new_nimbus_launcher(cl_genesis_data), "launch_method": nimbus.launch},
module_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.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},
module_io.CLClientType.teku: {"launcher": teku.new_teku_launcher(cl_genesis_data), "launch_method": teku.launch}, package_io.CLClientType.teku: {"launcher": teku.new_teku_launcher(cl_genesis_data), "launch_method": teku.launch},
} }
all_cl_client_contexts = [] all_cl_client_contexts = []
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
cl_genesis_data = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/cl_genesis/cl_genesis_data.star") cl_genesis_data = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/cl_genesis/cl_genesis_data.star")
prelaunch_data_generator_launcher = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.star") prelaunch_data_generator_launcher = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.star")
# Needed to copy the JWT secret and the EL genesis.json file # Needed to copy the JWT secret and the EL genesis.json file
......
prelaunch_data_generator_launcher = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.star") prelaunch_data_generator_launcher = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.star")
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
keystore_files_module = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/cl_validator_keystores/keystore_files.star") keystore_files_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/cl_validator_keystores/keystore_files.star")
keystores_result = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/cl_validator_keystores/generate_keystores_result.star") keystores_result = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/cl_validator_keystores/generate_keystores_result.star")
NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR = "/node-{0}-keystores" NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR = "/node-{0}-keystores"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
el_genesis = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data.star") el_genesis = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data.star")
prelaunch_data_generator_launcher = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.star") prelaunch_data_generator_launcher = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.star")
CONFIG_DIRPATH_ON_GENERATOR = "/config" CONFIG_DIRPATH_ON_GENERATOR = "/config"
GENESIS_CONFIG_FILENAME = "genesis-config.yaml" GENESIS_CONFIG_FILENAME = "genesis-config.yaml"
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star") shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
SERVICE_ID = "prometheus" SERVICE_ID = "prometheus"
......
# The path on the module container where static files are housed # The path on the module container where static files are housed
STATIC_FILES_DIRPATH = "github.com/kurtosis-tech/eth2-module/static_files" STATIC_FILES_DIRPATH = "github.com/kurtosis-tech/eth2-package/static_files"
# Geth + CL genesis generation # Geth + CL genesis generation
GENESIS_GENERATION_CONFIG_DIRPATH = STATIC_FILES_DIRPATH + "/genesis-generation-config" GENESIS_GENERATION_CONFIG_DIRPATH = STATIC_FILES_DIRPATH + "/genesis-generation-config"
......
...@@ -16,15 +16,15 @@ message ModuleInput { ...@@ -16,15 +16,15 @@ message ModuleInput {
// - only Ethereum network (EL and CL nodes) will be launched. Nothing else (no transaction spammer) // - 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) // - 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 // This is a hack - it's not very elegant - but this is a commonly-requested feature
// The longterm solution is making the module trivial to decompose so we don't need flags like this; we're working // 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 // on this at the Kurtosis product level
optional bool launch_additional_services = 3; optional bool launch_additional_services = 3;
// If set, the module will block until a finalized epoch has occurred. // If set, the package will block until a finalized epoch has occurred.
// If `waitForVerifications` is set to true, this extra wait will be skipped. // If `waitForVerifications` is set to true, this extra wait will be skipped.
optional bool wait_for_finalization = 4; optional bool wait_for_finalization = 4;
// If set to true, the module will block until all verifications have passed // If set to true, the package will block until all verifications have passed
optional bool wait_for_verifications = 5; 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. // If set, after the merge, this will be the maximum number of epochs wait for the verifications to succeed.
......
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