Skip to content

Commit

Permalink
refactor!: rename the package to ethereum-package (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
h4ck3rk3y authored Sep 27, 2023
1 parent 4555e42 commit 23e4d5e
Show file tree
Hide file tree
Showing 33 changed files with 243 additions and 243 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ executors:
image: ubuntu-2004:202201-02

parameters:
# To enable/disabled the check_latest_version workflow execution which will be triggered by this scheduled pipeline: https://app.circleci.com/settings/project/github/kurtosis-tech/eth2-package/triggers
# To enable/disabled the check_latest_version workflow execution which will be triggered by this scheduled pipeline: https://app.circleci.com/settings/project/github/kurtosis-tech/ethereum-package/triggers
# TODO revert this - setting this to true to get all existing tests to run on CI during merge
should-enable-check-latest-version-workflow:
type: boolean
Expand Down Expand Up @@ -226,7 +226,7 @@ workflows:
{
"ignorePatterns": [
{
"pattern": "https://github.com/kurtosis-tech/eth2-package"
"pattern": "https://github.com/kurtosis-tech/ethereum-package"
}
]
}
Expand Down
174 changes: 87 additions & 87 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Optional features (enabled via flags or parameter files at runtime):
2. [Install the Kurtosis CLI, or upgrade it to the latest version if it's already installed][kurtosis-cli-installation]
3. Run the package with default configurations from the command line:
```bash
kurtosis run --enclave my-testnet github.com/kurtosis-tech/eth2-package
kurtosis run --enclave my-testnet github.com/kurtosis-tech/ethereum-package
```

#### Run with your own configuration
Kurtosis packages are parameterizable, meaning you can customize your network and its behavior to suit your needs by storing parameters in a file that you can pass in at runtime like so:
```bash
kurtosis run --enclave my-testnet github.com/kurtosis-tech/eth2-package "$(cat ~/network_params.json)"
kurtosis run --enclave my-testnet github.com/kurtosis-tech/ethereum-package "$(cat ~/network_params.json)"
```

Where `network_params.json` contains the parameters for your network in your home directory.
Expand Down Expand Up @@ -421,7 +421,7 @@ To configure the package behaviour, you can modify your `network_params.json` fi
## Proposer Builder Separation (PBS) emulation
To spin up the network of Ethereum nodes with an external block building network (using Flashbot's `mev-boost` protocol), simply use:
```
kurtosis run github.com/kurtosis-tech/eth2-package '{"mev_type": "full"}'
kurtosis run github.com/kurtosis-tech/ethereum-package '{"mev_type": "full"}'
```

Starting your network up with `"mev_type": "full"` will instantiate and connect the following infrastructure to your network:
Expand Down
30 changes: 15 additions & 15 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,36 +57,36 @@ We'll explain these phases one by one.

All EL clients require both a genesis file and a JWT secret. The exact format of the genesis file differs per client, so we first leverage [a Docker image containing tools for generating this genesis data][ethereum-genesis-generator] to create the actual files that the EL clients-to-be will need. This is accomplished by filling in several genesis generation config files found in [the `static_files` directory][static-files].

The generated output files then get stored in the Kurtosis enclave, ready for use when we start the EL clients. The information about these stored files is tracked in [the `el_genesis_data` struct](https://github.com/kurtosis-tech/eth2-package/blob/main/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data.star).
The generated output files then get stored in the Kurtosis enclave, ready for use when we start the EL clients. The information about these stored files is tracked in [the `el_genesis_data` struct](https://github.com/kurtosis-tech/ethereum-package/blob/main/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data.star).

### Starting EL clients

Next, we plug the generated genesis data [into EL client "launchers"](https://github.com/kurtosis-tech/eth2-package/tree/main/src/participant_network/el) to start a mining network of EL nodes. The launchers come with a `launch` function that consumes EL genesis data and produces information about the running EL client node. Running EL node information is represented by [an `el_client_context` struct](https://github.com/kurtosis-tech/eth2-package/blob/main/src/participant_network/el/el_client_context.star). Each EL client type has its own launcher (e.g. [Geth](https://github.com/kurtosis-tech/eth2-package/tree/main/src/participant_network/el/geth), [Besu](https://github.com/kurtosis-tech/eth2-package/tree/main/src/participant_network/el/besu)) because each EL client will require different environment variables and flags to be set when launching the client's container.
Next, we plug the generated genesis data [into EL client "launchers"](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/participant_network/el) to start a mining network of EL nodes. The launchers come with a `launch` function that consumes EL genesis data and produces information about the running EL client node. Running EL node information is represented by [an `el_client_context` struct](https://github.com/kurtosis-tech/ethereum-package/blob/main/src/participant_network/el/el_client_context.star). Each EL client type has its own launcher (e.g. [Geth](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/participant_network/el/geth), [Besu](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/participant_network/el/besu)) because each EL client will require different environment variables and flags to be set when launching the client's container.

### Generating CL client data

CL clients, like EL clients, also have genesis and config files that they need. We use [the same Docker image with tools for generating genesis data][ethereum-genesis-generator] to create the necessary CL files, we provide the genesis generation config using templates in [the `static_files` directory][static-files], and we store the generated output files in the Kurtosis enclave in the same way as the EL client genesis files. Like with EL nodes, CL genesis data information is tracked in [the `cl_client_context` struct](https://github.com/kurtosis-tech/eth2-package/blob/main/src/participant_network/el/el_client_context.star).
CL clients, like EL clients, also have genesis and config files that they need. We use [the same Docker image with tools for generating genesis data][ethereum-genesis-generator] to create the necessary CL files, we provide the genesis generation config using templates in [the `static_files` directory][static-files], and we store the generated output files in the Kurtosis enclave in the same way as the EL client genesis files. Like with EL nodes, CL genesis data information is tracked in [the `cl_client_context` struct](https://github.com/kurtosis-tech/ethereum-package/blob/main/src/participant_network/el/el_client_context.star).

The major difference with CL clients is that CL clients have validator keys, so we need to generate keys for the CL clients to use during validation. The generation happens using [the same genesis-generating Docker image][ethereum-genesis-generator], but via a call to [a different tool bundled inside the Docker image](https://github.com/protolambda/eth2-val-tools).

### Starting CL clients

Once CL genesis data and keys have been created, the CL client nodes are started via [the CL client launchers](https://github.com/kurtosis-tech/eth2-package/tree/main/src/participant_network/cl). Just as with EL clients:
Once CL genesis data and keys have been created, the CL client nodes are started via [the CL client launchers](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/participant_network/cl). Just as with EL clients:

- CL client launchers implement come with a `launch` method
- One CL client launcher exists per client type (e.g. [Nimbus](https://github.com/kurtosis-tech/eth2-package/tree/main/src/participant_network/cl/nimbus), [Lighthouse](https://github.com/kurtosis-tech/eth2-package/tree/main/src/participant_network/cl/lighthouse))
- Launched CL node information is tracked in [a `cl_client_context` struct](https://github.com/kurtosis-tech/eth2-package/blob/main/src/participant_network/cl/cl_client_context.star)
- One CL client launcher exists per client type (e.g. [Nimbus](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/participant_network/cl/nimbus), [Lighthouse](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/participant_network/cl/lighthouse))
- Launched CL node information is tracked in [a `cl_client_context` struct](https://github.com/kurtosis-tech/ethereum-package/blob/main/src/participant_network/cl/cl_client_context.star)

There are only two major difference between CL client and EL client launchers. First, the `cl_client_launcher.launch` method also consumes an `el_client_context`, because each CL client is connected in a 1:1 relationship with an EL client. Second, because CL clients have keys, the keystore files are passed in to the `launch` function as well.

## Auxiliary Services

After the Ethereum network is up and running, this package starts several auxiliary containers to make it easier to work with the Ethereum network. At time of writing, these are:

- [Forkmon](https://github.com/kurtosis-tech/eth2-package/tree/main/src/forkmon), a "fork monitor" web UI for visualizing the CL clients' forks
- [Prometheus](https://github.com/kurtosis-tech/eth2-package/tree/main/src/prometheus) for collecting client node metrics
- [Grafana](https://github.com/kurtosis-tech/eth2-package/tree/main/src/grafana) for visualizing client node metrics
- [An ETH transaction spammer](https://github.com/kurtosis-tech/eth2-package/tree/main/src/transaction_spammer), which [has been forked off](https://github.com/kurtosis-tech/tx-fuzz) of [Marius' transaction spammer code](https://github.com/MariusVanDerWijden/tx-fuzz) so that it can run as a container
- [Forkmon](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/forkmon), a "fork monitor" web UI for visualizing the CL clients' forks
- [Prometheus](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/prometheus) for collecting client node metrics
- [Grafana](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/grafana) for visualizing client node metrics
- [An ETH transaction spammer](https://github.com/kurtosis-tech/ethereum-package/tree/main/src/transaction_spammer), which [has been forked off](https://github.com/kurtosis-tech/tx-fuzz) of [Marius' transaction spammer code](https://github.com/MariusVanDerWijden/tx-fuzz) so that it can run as a container

## [Testnet Verifier][testnet-verifier]

Expand All @@ -95,10 +95,10 @@ Once the Ethereum network is up and running, verification logic will be run to e
<!------------------------ Only links below here -------------------------------->

[enclave-context]: https://docs.kurtosistech.com/kurtosis/core-lib-documentation#enclavecontext
[main-function]: https://github.com/kurtosis-tech/eth2-package/blob/main/main.star#22
[package-io]: https://github.com/kurtosis-tech/eth2-package/tree/main/src/package_io
[participant-network]: https://github.com/kurtosis-tech/eth2-package/tree/main/src/participant_network
[main-function]: https://github.com/kurtosis-tech/ethereum-package/blob/main/main.star#22
[package-io]: https://github.com/kurtosis-tech/ethereum-package/tree/main/src/package_io
[participant-network]: https://github.com/kurtosis-tech/ethereum-package/tree/main/src/participant_network
[ethereum-genesis-generator]: https://github.com/ethpandaops/ethereum-genesis-generator
[static-files]: https://github.com/kurtosis-tech/eth2-package/tree/main/static_files
[testnet-verifier]: https://github.com/kurtosis-tech/eth2-package/tree/main/src/testnet_verifier
[static-files]: https://github.com/kurtosis-tech/ethereum-package/tree/main/static_files
[testnet-verifier]: https://github.com/kurtosis-tech/ethereum-package/tree/main/src/testnet_verifier
[auxiliary-services]: #auxiliary-services
2 changes: 1 addition & 1 deletion kurtosis.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
name: "github.com/kurtosis-tech/eth2-package"
name: "github.com/kurtosis-tech/ethereum-package"
34 changes: 17 additions & 17 deletions main.star
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
parse_input = import_module(
"github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star"
"github.com/kurtosis-tech/ethereum-package/src/package_io/parse_input.star"
)

participant_network = import_module(
"github.com/kurtosis-tech/eth2-package/src/participant_network.star"
"github.com/kurtosis-tech/ethereum-package/src/participant_network.star"
)

static_files = import_module(
"github.com/kurtosis-tech/eth2-package/src/static_files/static_files.star"
"github.com/kurtosis-tech/ethereum-package/src/static_files/static_files.star"
)
genesis_constants = import_module(
"github.com/kurtosis-tech/eth2-package/src/prelaunch_data_generator/genesis_constants/genesis_constants.star"
"github.com/kurtosis-tech/ethereum-package/src/prelaunch_data_generator/genesis_constants/genesis_constants.star"
)

transaction_spammer = import_module(
"github.com/kurtosis-tech/eth2-package/src/transaction_spammer/transaction_spammer.star"
"github.com/kurtosis-tech/ethereum-package/src/transaction_spammer/transaction_spammer.star"
)
blob_spammer = import_module(
"github.com/kurtosis-tech/eth2-package/src/blob_spammer/blob_spammer.star"
"github.com/kurtosis-tech/ethereum-package/src/blob_spammer/blob_spammer.star"
)
cl_forkmon = import_module(
"github.com/kurtosis-tech/eth2-package/src/cl_forkmon/cl_forkmon_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/cl_forkmon/cl_forkmon_launcher.star"
)
el_forkmon = import_module(
"github.com/kurtosis-tech/eth2-package/src/el_forkmon/el_forkmon_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/el_forkmon/el_forkmon_launcher.star"
)
beacon_metrics_gazer = import_module(
"github.com/kurtosis-tech/eth2-package/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star"
)
light_beaconchain_explorer = import_module(
"github.com/kurtosis-tech/eth2-package/src/light_beaconchain/light_beaconchain_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/light_beaconchain/light_beaconchain_launcher.star"
)
prometheus = import_module(
"github.com/kurtosis-tech/eth2-package/src/prometheus/prometheus_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/prometheus/prometheus_launcher.star"
)
grafana = import_module(
"github.com/kurtosis-tech/eth2-package/src/grafana/grafana_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/grafana/grafana_launcher.star"
)
mev_boost_launcher_module = import_module(
"github.com/kurtosis-tech/eth2-package/src/mev_boost/mev_boost_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/mev_boost/mev_boost_launcher.star"
)
mock_mev_launcher_module = import_module(
"github.com/kurtosis-tech/eth2-package/src/mock_mev/mock_mev_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/mock_mev/mock_mev_launcher.star"
)
mev_relay_launcher_module = import_module(
"github.com/kurtosis-tech/eth2-package/src/mev_relay/mev_relay_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/mev_relay/mev_relay_launcher.star"
)
mev_flood_module = import_module(
"github.com/kurtosis-tech/eth2-package/src/mev_flood/mev_flood_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/mev_flood/mev_flood_launcher.star"
)
mev_custom_flood_module = import_module(
"github.com/kurtosis-tech/eth2-package/src/mev_custom_flood/mev_custom_flood_launcher.star"
"github.com/kurtosis-tech/ethereum-package/src/mev_custom_flood/mev_custom_flood_launcher.star"
)

GRAFANA_USER = "admin"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
shared_utils = import_module(
"github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star"
"github.com/kurtosis-tech/ethereum-package/src/shared_utils/shared_utils.star"
)


Expand Down
10 changes: 5 additions & 5 deletions src/cl/lighthouse/lighthouse_launcher.star
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
shared_utils = import_module(
"github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star"
"github.com/kurtosis-tech/ethereum-package/src/shared_utils/shared_utils.star"
)
input_parser = import_module(
"github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star"
"github.com/kurtosis-tech/ethereum-package/src/package_io/parse_input.star"
)
cl_client_context = import_module(
"github.com/kurtosis-tech/eth2-package/src/cl/cl_client_context.star"
"github.com/kurtosis-tech/ethereum-package/src/cl/cl_client_context.star"
)
node_metrics = import_module(
"github.com/kurtosis-tech/eth2-package/src/node_metrics_info.star"
"github.com/kurtosis-tech/ethereum-package/src/node_metrics_info.star"
)

package_io = import_module(
"github.com/kurtosis-tech/eth2-package/src/package_io/constants.star"
"github.com/kurtosis-tech/ethereum-package/src/package_io/constants.star"
)

LIGHTHOUSE_BINARY_COMMAND = "lighthouse"
Expand Down
12 changes: 6 additions & 6 deletions src/cl/lodestar/lodestar_launcher.star
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
shared_utils = import_module(
"github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star"
"github.com/kurtosis-tech/ethereum-package/src/shared_utils/shared_utils.star"
)
input_parser = import_module(
"github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star"
"github.com/kurtosis-tech/ethereum-package/src/package_io/parse_input.star"
)
cl_client_context = import_module(
"github.com/kurtosis-tech/eth2-package/src/cl/cl_client_context.star"
"github.com/kurtosis-tech/ethereum-package/src/cl/cl_client_context.star"
)
node_metrics = import_module(
"github.com/kurtosis-tech/eth2-package/src/node_metrics_info.star"
"github.com/kurtosis-tech/ethereum-package/src/node_metrics_info.star"
)
cl_node_ready_conditions = import_module(
"github.com/kurtosis-tech/eth2-package/src/cl/cl_node_ready_conditions.star"
"github.com/kurtosis-tech/ethereum-package/src/cl/cl_node_ready_conditions.star"
)

package_io = import_module(
"github.com/kurtosis-tech/eth2-package/src/package_io/constants.star"
"github.com/kurtosis-tech/ethereum-package/src/package_io/constants.star"
)

GENESIS_DATA_MOUNT_DIRPATH_ON_SERVICE_CONTAINER = "/genesis"
Expand Down
12 changes: 6 additions & 6 deletions src/cl/nimbus/nimbus_launcher.star
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
shared_utils = import_module(
"github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star"
"github.com/kurtosis-tech/ethereum-package/src/shared_utils/shared_utils.star"
)
input_parser = import_module(
"github.com/kurtosis-tech/eth2-package/src/package_io/parse_input.star"
"github.com/kurtosis-tech/ethereum-package/src/package_io/parse_input.star"
)
cl_client_context = import_module(
"github.com/kurtosis-tech/eth2-package/src/cl/cl_client_context.star"
"github.com/kurtosis-tech/ethereum-package/src/cl/cl_client_context.star"
)
node_metrics = import_module(
"github.com/kurtosis-tech/eth2-package/src/node_metrics_info.star"
"github.com/kurtosis-tech/ethereum-package/src/node_metrics_info.star"
)
cl_node_ready_conditions = import_module(
"github.com/kurtosis-tech/eth2-package/src/cl/cl_node_ready_conditions.star"
"github.com/kurtosis-tech/ethereum-package/src/cl/cl_node_ready_conditions.star"
)

package_io = import_module(
"github.com/kurtosis-tech/eth2-package/src/package_io/constants.star"
"github.com/kurtosis-tech/ethereum-package/src/package_io/constants.star"
)

GENESIS_DATA_MOUNTPOINT_ON_CLIENT = "/genesis-data"
Expand Down
Loading

0 comments on commit 23e4d5e

Please sign in to comment.