Ethereum Package

This is a [Kurtosis][kurtosis-repo] package that will spin up a private Ethereum testnet over Docker or Kubernetes with multi-client support, Flashbots’ mev-boost infrastructure for PBS-related testing/validation, and other useful network tools (transaction spammer, monitoring tools, etc). Kurtosis packages are entirely reproducible and composable, so this will work the same way over Docker or Kubernetes, in the cloud or locally on your machine.
You now have the ability to spin up a private Ethereum testnet or public network (e.g. mainnet, sepolia, hoodi) with a single command. This package is designed to be used for testing, validation, and development of Ethereum clients, and is not intended for production use. For more details check network_params.network in the configuration section.
Specifically, this [package][package-reference] will:
- Generate Execution Layer (EL) & Consensus Layer (CL) genesis information using the Ethereum genesis generator.
- Configure & bootstrap a network of Ethereum nodes of n size using the genesis data generated above
- Spin up a transaction spammer to send fake transactions to the network
- Spin up a Grafana and Prometheus instance to observe the network
- Spin up a Blobscan instance to analyze blob transactions (EIP-4844)
Optional features (enabled via flags or parameter files at runtime):
- Block until the Beacon nodes finalize an epoch (i.e. finalized_epoch > 0)
- Spin up & configure parameters for the infrastructure behind PBS (Proposer-Builder Separation) using
mev-boost, with support for multiple relay implementations:
flashbots - Full Flashbots MEV infrastructure
helix - High-performance Helix relay with TimescaleDB backend
mev-rs - Alternative relay implementation
commit-boost - Commit-boost based infrastructure
mock - Mock builder for testing
- More details on PBS implementation.
- Spin up and connect a JSON RPC Snooper to the network to log responses & requests between the EL engine API and the CL client.
- Specify extra parameters to be passed in for any of the CL client Beacon, CL client validator, and/or EL client containers
- Specify the required parameters for the nodes to reach an external block building network
- Generate keystores for each node in parallel
- Spin up TrueBlocks (
chifra daemon) to serve the chifra REST API on port 8080 (/status, /blocks, /list, /chunks, etc.). The scraper isn’t started automatically; POST /scrape (or run chifra scrape against the same data dir) when you want to build the local Unchained Index. Auto-tunes scrape parameters for devnets vs public networks.
- Ship traces from every EL/CL/VC to the engine-level Kurtosis OTel stack started with
kurtosis otel start by adding otel to additional_services. Traces land in the shared ClickHouse tenanted by enclave; requires the Docker backend.
Quickstart
-
[Install Docker & start the Docker Daemon if you haven’t done so already][docker-installation]
-
[Install the Kurtosis CLI, or upgrade it to the latest version if it’s already installed][kurtosis-cli-installation]. This package requires Kurtosis 1.23.0 or newer.
-
Run the package with default configurations from the command line:
kurtosis run --enclave my-testnet github.com/ethpandaops/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:
kurtosis run --enclave my-testnet github.com/ethpandaops/ethereum-package --args-file network_params.yaml
Where network_params.yaml contains the parameters for your network in your home directory.
Run on Kubernetes
Kurtosis packages work the same way over Docker or on Kubernetes. Please visit our Kubernetes docs to learn how to spin up a private testnet on a Kubernetes cluster.
Considerations for Running on a Public Testnet with a Cloud Provider
When running on a public testnet using a cloud provider’s Kubernetes cluster, there are a few important factors to consider:
-
State Growth: The growth of the state might be faster than anticipated. This could potentially lead to issues if the default parameters become insufficient over time. It’s important to monitor state growth and adjust parameters as necessary.
-
Persistent Storage Speed: Most cloud providers provision their Kubernetes clusters with relatively slow persistent storage by default. This can cause performance issues, particularly with Execution Layer (EL) clients.
-
Network Syncing: The disk speed provided by cloud providers may not be sufficient to sync with networks that have high demands, such as the mainnet. This could lead to syncing issues and delays.
To mitigate these issues, you can use the el_volume_size and cl_volume_size flags to override the default settings locally. This allows you to allocate more storage to the EL and CL clients, which can help accommodate faster state growth and improve syncing performance. However, keep in mind that increasing the volume size may also increase your cloud provider costs. Always monitor your usage and adjust as necessary to balance performance and cost.
For optimal performance, we recommend using a cloud provider that allows you to provision Kubernetes clusters with fast persistent storage or self-hosting your own Kubernetes cluster with fast persistent storage.
Shadowforking
In order to enable shadowfork capabilities, you can use the network_params.network flag. The expected value is the name of the network you want to shadowfork followed by -shadowfork. Please note that the persistent configuration parameter has to be enabled for shadowforks to work! The current limitation on k8s is that it only works on a single-node cluster. For example, to shadowfork the Hoodi testnet, you can use the following command:
...
network_params:
network: "hoodi-shadowfork"
persistent: true
...
Taints and tolerations
It is possible to run the package on a Kubernetes cluster with taints and tolerations. This is done by adding the tolerations to the tolerations field in the network_params.yaml file. For example:
participants:
- el_type: reth
cl_type: teku
global_tolerations:
- key: "node-role.kubernetes.io/master6"
value: "true"
operator: "Equal"
effect: "NoSchedule"
It is possible to define toleration globally, per participant or per container. The order of precedence is as follows:
- Container (
el_tolerations, cl_tolerations, vc_tolerations)
- Participant (
tolerations)
- Global (
global_tolerations)
This feature is only available for Kubernetes. To learn more about taints and tolerations, please visit the Kubernetes documentation.
Tear down
The testnet will reside in an [enclave][enclave] - an isolated, ephemeral environment. The enclave and its contents (e.g. running containers, files artifacts, etc) will persist until torn down. You can remove an enclave and its contents with:
kurtosis enclave rm -f my-testnet
Management
The Kurtosis CLI can be used to inspect and interact with the network.
For example, if you need shell access, simply run:
kurtosis service shell my-testnet $SERVICE_NAME
And if you need the logs for a service, simply run:
kurtosis service logs my-testnet $SERVICE_NAME
Check out the full list of Kurtosis CLI commands
Debugging
To grab the genesis files for the network, simply run:
kurtosis files download my-testnet $FILE_NAME $OUTPUT_DIRECTORY
For example, to retrieve the Execution Layer (EL) genesis data, run:
kurtosis files download my-testnet el-genesis-data ~/Downloads
Basic file sharing
Nginx is included in the package to allow for basic file sharing. The nginx service is started when additional services are enabled. It exposes the contents of the network-configs directory at the URL root, including the canonical metadata files used by the bal-devnets layout:
/enodes.txt — newline-separated EL enodes
/bootstrap_nodes.txt — newline-separated CL ENRs
/bootstrap_nodes.yaml — same ENRs as a YAML list
/network-config.tar — full genesis bundle (config.yaml, genesis.ssz, genesis.json, etc.) plus the three files above
additional_services:
- nginx
Syncing one enclave from another
You can have a target enclave (B) sync from a running source enclave (A). Source A runs nginx and publishes its enodes/ENRs/genesis bundle; target B sets network: kt-<A-host>:<A-nginx-port> and bootstraps off A.
Source enclave A — must publish EL/CL ports with a routable NAT IP, otherwise the published enodes advertise unreachable docker-internal IPs:
participants:
- el_type: geth
cl_type: lighthouse
- el_type: reth
cl_type: teku
# nginx_port defaults to 9090 — set it here only if you want a different port
port_publisher:
nat_exit_ip: <A-routable-host-ip> # or "auto"
el:
enabled: true
cl:
enabled: true
additional_services:
- nginx
Target enclave B — point network at A’s nginx:
participants:
- el_type: geth
cl_type: lighthouse
el_extra_params:
- --syncmode=full # see caveat below
network_params:
network: kt-<A-host>:9090
Validator counts are auto-zeroed for kt- networks, so B is observer-mode by default.
Geth’s snap-sync wedges with missing trie node ... layer stale when joining a fresh devnet that’s still building state. Either set el_extra_params: [--syncmode=full] on the target, or wait until the source has finalized at least one epoch before launching the target.
How it works
The flow is intentionally a thin wrapper around the existing devnet-sync path:
- Source A’s nginx mounts the
el_cl_genesis_data artifact at /network-configs/, generates enodes.txt / bootstrap_nodes.txt / bootstrap_nodes.yaml from the live EL/CL contexts at startup (so the addresses inside reflect the actual NAT IPs and published ports), bundles everything into network-config.tar, and serves the tar plus the three loose files from the nginx root URL.
- Source A’s EL clients advertise their enodes using
port_publisher.el.nat_exit_ip (e.g. geth --nat=extip:<ip>). That’s why the warning fires when nat_exit_ip is unset: without it, every enode in enodes.txt points at a docker-internal address that nobody else can reach.
- Target B’s network launcher sees
network: kt-<host>:<port>, curls http://<host>:<port>/network-config.tar, and extracts it into the same el_cl_genesis_data files artifact name the other launchers use. From here, B’s EL/CL launchers fall through to the existing devnet code paths — they read /network-configs/enodes.txt and /network-configs/bootstrap_nodes.txt to populate --bootnodes / --boot-nodes flags on the clients. No client launcher code is aware of cross-enclave sync.
- Validator counts are zeroed on B by the existing logic that already excludes non-
kurtosis/shadowfork networks from validator key generation, so B starts as an observer.
In effect, A’s nginx plays the same role for B that the GitHub-hosted network-configs/<devnet>/metadata directory plays for a normal network: foo-devnet-N config — it’s the canonical bundle of “everything you need to join this network.”
What gets reused vs. what’s new
- Reused: EL/CL bootnode wiring (
shared_utils.get_devnet_enodes / get_devnet_enrs_list), genesis-bundle file layout, port publishing, NAT-IP enode advertisement.
- New:
kt-<host>:<port> parsing (src/network_launcher/remote_enclave.star), nginx file naming + URL layout match the bal-devnets metadata convention.
Limits / gotchas
- The two enclaves must reside on a network where B’s curl/discovery containers can reach A’s published nginx port and EL/CL public ports. With
port_publisher enabled, the package publishes A’s nginx port and its EL/CL P2P ports on all host interfaces for this; every other port is published on 127.0.0.1 only, and without port_publisher so is nginx. Same-host works through the host’s own address; cross-host works as long as the NAT IP set on A is routable from B.
- A’s nginx snapshot is taken at A’s startup. If A restarts and gets new node identities, B must be torn down and redeployed against the new bundle.
- Geth snap-sync brittleness applies as noted above; CL sync is unaffected.
More config examples
Looking for ready-to-run YAML configs beyond the snippets above?
.github/tests/ — every config in this directory is exercised by CI (per-pr.yml / nightly.yml), so they’re the broadest source of known-working examples (single-client, MEV, mix-with-tools, persistence, shadowforks, etc.).
.github/tests/examples/ — opt-in examples that CI does not auto-run (large GPU configs, mainnet/shadowfork setups, the source-enclave-nginx.yaml / remote-enclave-nginx.yaml pair from the section above).
Copy any of them to your local working directory and run with kurtosis run --enclave <name> . --args-file <path>.
Disruptoor example
Use .github/tests/examples/disruptoor.yaml to launch a small two-node network with Disruptoor and Dora. The example applies a CL partition between node 1 and node 2 at startup, then adds latency and jitter to every component on node 1.
kurtosis run --enclave disruptoor-example . --args-file .github/tests/examples/disruptoor.yaml --privileged --verbosity detailed
Disruptoor is Docker-only. The package fails early on Kubernetes because Disruptoor needs privileged mode, /var/run/docker.sock, and the host PID namespace to shape peer traffic. The --privileged run flag is required so Kurtosis allows those Docker-only service settings.
The friendly Disruptoor config in disruptoor_params uses ethereum-package participant numbers. participants: [1] targets the first configured node, participants: [2] targets the second, and participants: all targets all nodes. components can be el, cl, vc, or all; components: all expands to all three and cannot be mixed with other component names. The example enables port_publisher.additional_services so kurtosis enclave inspect disruptoor-example shows forwarded HTTP ports for additional services such as Disruptoor and Dora.
partitions split selected peer traffic into isolated groups. In the example, the partition targets only components: [cl], so the beacon-node P2P traffic for node 1 and node 2 is separated while their EL and VC services are not part of that partition. If no explicit scope is provided, the package derives the partition scope from the selected EL/CL components (el_p2p and/or cl_p2p). VC-only partitions need an explicit native scope because validators do not add a default P2P partition scope.
shaping changes network conditions for selected services without fully disconnecting them. A shaping rule can add delay, add jitter when delay is set, inject loss, cap bandwidth, and optionally set direction. In the example, components: all selects node 1’s EL, CL, and VC services, then adds 50ms of delay plus 10ms of jitter to matching traffic.
include_control: true tells the friendly config translator to include Disruptoor’s control/acknowledgement traffic in the generated shaping scope. Disruptoor v0 shaping requires that control traffic so the shaper can apply and acknowledge the rule.
Common issues:
unknown flag: --privileged or ServiceConfig: unexpected keyword argument "privileged": upgrade both the Kurtosis CLI and engine to a build that supports privileged runs for Docker-only services.
disruptoor requires Kurtosis' Docker backend: switch Kurtosis to the Docker backend and rerun the package.
- Shaping rules fail with
include_control must be true: add include_control: true, or set scope explicitly with include_control included.
disruptoor_params.config cannot be used together with disruptoor_params.partitions or disruptoor_params.shaping: use either native Disruptoor state under config or the friendly partitions / shaping fields, not both.
- A partition using only
components: [vc] fails unless you set scope explicitly; the default partition scope is derived from EL/CL P2P traffic.
Configuration
To configure the package behaviour, you can modify your network_params.yaml file. The full YAML schema that can be passed in is as follows with the defaults provided:
# Specification of the participants in the network
participants:
# EL(Execution Layer) Specific flags
# The type of EL client that should be started
# Valid values are geth, nethermind, erigon, besu, ethereumjs, reth, nimbus-eth1, ethrex, None
# Use el_type: None to run the participant without an execution client (CL-only; execution-endpoint and JWT secret are omitted)
- el_type: geth
# The Docker image that should be used for the EL client; leave blank to use the default for the client type
# Defaults by client:
# - geth: ethereum/client-go:latest
# - erigon: erigontech/erigon:latest
# - nethermind: ethpandaops/nethermind:master
# - besu: hyperledger/besu:latest
# - reth: ghcr.io/paradigmxyz/reth
# - ethereumjs: ethpandaops/ethereumjs:master
# - nimbus-eth1: statusim/nimbus-eth1:master
# - ethrex: ethpandaops/ethrex:main
el_image: ""
# Path to a local EL binary to inject into the container (Docker only)
# When set, the binary will be uploaded and mounted into the container,
# replacing the default binary from the Docker image
# Useful for rapid debugging with locally compiled binaries
# IMPORTANT: el_force_restart must be set to true when using this option
# IMPORTANT: The binary file must live inside the ethereum-package directory
# Build the client in its own repo, then copy ONLY the binary to ethereum-package
# Do not run builds inside ethereum-package or copy build dependencies - only the final binary
# IMPORTANT: The binary must be compiled on a Linux system with compatible libraries
# matching those in the client's Dockerfile to avoid dependency issues
# Example workflow (from reth repo):
# cargo build --release --bin reth && cp target/release/reth ../ethereum-package/binaries/
# Then set: el_binary_path: "./binaries/reth"
el_binary_path: ""
# The log level string that this participant's EL client should log at
# If this is an empty string 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 an empty string, then this value will override the global `logLevel` setting to allow for fine-grained control
# over a specific participant's logging
# Set to "custom" (Besu only) to disable global logging settings and leave it up to the client configuration,
# for example, when using a custom log4j2.xml file
el_log_level: ""
# The storage type for the EL client: "full" or "archive"
# IMPORTANT: Consider updating el_volume_size if you set this
# If this is an empty string, each client will use its default behavior:
# - reth, erigon: default to archive (use "full" to save space)
# - geth, besu, nethermind: default to full (use "archive" to keep historical data)
# - ethereumjs, ethrex, nimbus-eth1: unused (full only?)
# Example: el_storage_type: "full" or "archive"
el_storage_type: ""
# A list of optional extra env_vars the el container should spin up with
el_extra_env_vars: {}
# A list of optional extra labels the el container should spin up with
# Example: el_extra_labels: {"ethereum-package.partition": "1"}
el_extra_labels: {}
# A list of optional extra params that will be passed to the EL client container for modifying its behaviour
el_extra_params: []
# A list of optional extra mount points that will be passed to the EL client container
# Key is the mount path (becomes a directory), value MUST reference a key from extra_files
# The file will be available at <mount_path>/<extra_files_key>
# Example: el_extra_mounts: {"/config": "my_config_file"} # Creates /config/my_config_file
el_extra_mounts: {}
# A list of host devices to mount into the EL client container
# Useful for hardware device access like TPM, HSM, etc.
# Example: el_devices: ["/dev/tpm0"]
# Defaults to empty list
el_devices: []
# A list of tolerations that will be passed to the EL client container
# Only works with Kubernetes
# Example: el_tolerations:
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"
# toleration_seconds: 3600
# Defaults to empty
el_tolerations: []
# Persistent storage size for the EL client container (in MB)
# IMPORTANT: Consider setting this if you are setting el_storage_type
# Defaults to 0, which means that the default size for the client will be used
# Default values can be found in /src/package_io/constants.star VOLUME_SIZE
el_volume_size: 0
# Resource management for el containers
# CPU is millicores
# RAM is in MB
# Defaults to 0, which results in no resource limits
el_min_cpu: 0
el_max_cpu: 0
el_min_mem: 0
el_max_mem: 0
# Force container recreation on next run (Dock
提示:代码过长已自动截断
评论