chore: update private-testnet.md (#9389)

This commit is contained in:
Barnabas Busa
2024-07-09 12:19:27 +02:00
committed by GitHub
parent 67478b7a58
commit e4d16eb1ab

View File

@ -13,85 +13,76 @@ To see all possible configurations and flags you can use, including metrics and
Genesis data will be generated using this [genesis-generator](https://github.com/ethpandaops/ethereum-genesis-generator) to be used to bootstrap the EL and CL clients for each node. The end result will be a private testnet with nodes deployed as Docker containers in an ephemeral, isolated environment on your machine called an [enclave](https://docs.kurtosis.com/advanced-concepts/enclaves/). Read more about how the `ethereum-package` works by going [here](https://github.com/ethpandaops/ethereum-package/). Genesis data will be generated using this [genesis-generator](https://github.com/ethpandaops/ethereum-genesis-generator) to be used to bootstrap the EL and CL clients for each node. The end result will be a private testnet with nodes deployed as Docker containers in an ephemeral, isolated environment on your machine called an [enclave](https://docs.kurtosis.com/advanced-concepts/enclaves/). Read more about how the `ethereum-package` works by going [here](https://github.com/ethpandaops/ethereum-package/).
### Step 1: Define the parameters and shape of your private network ### Step 1: Define the parameters and shape of your private network
First, in your home directory, create a file with the name `network_params.json` with the following contents: First, in your home directory, create a file with the name `network_params.yaml` with the following contents:
```json ```yaml
{ participants:
"participants": [ - el_type: reth
{ el_image: ghcr.io/paradigmxyz/reth
"el_type": "reth", cl_type: lighthouse
"el_image": "ghcr.io/paradigmxyz/reth", cl_image: sigp/lighthouse:latest
"cl_type": "lighthouse", - el_type: reth
"cl_image": "sigp/lighthouse:latest", el_image: ghcr.io/paradigmxyz/reth
"count": 1 cl_type: teku
}, cl_image: consensys/teku:latest
{
"el_type": "reth",
"el_image": "ghcr.io/paradigmxyz/reth",
"cl_type": "teku",
"cl_image": "consensys/teku:latest",
"count": 1
}
],
"launch_additional_services": false
}
``` ```
> [!TIP] > [!TIP]
> If you would like to use a modified reth node, you can build an image locally with a custom tag. The tag can then be used in the `el_image` field in the `network_params.json` file. > If you would like to use a modified reth node, you can build an image locally with a custom tag. The tag can then be used in the `el_image` field in the `network_params.yaml` file.
### Step 2: Spin up your network ### Step 2: Spin up your network
Next, run the following command from your command line: Next, run the following command from your command line:
```bash ```bash
kurtosis run github.com/ethpandaops/ethereum-package --args-file ~/network_params.json kurtosis run github.com/ethpandaops/ethereum-package --args-file ~/network_params.yaml --image-download always
``` ```
Kurtosis will spin up an [enclave](https://docs.kurtosis.com/advanced-concepts/enclaves/) (i.e an ephemeral, isolated environment) and begin to configure and instantiate the nodes in your network. In the end, Kurtosis will print the services running in your enclave that form your private testnet alongside all the container ports and files that were generated & used to start up the private testnet. Here is a sample output: Kurtosis will spin up an [enclave](https://docs.kurtosis.com/advanced-concepts/enclaves/) (i.e an ephemeral, isolated environment) and begin to configure and instantiate the nodes in your network. In the end, Kurtosis will print the services running in your enclave that form your private testnet alongside all the container ports and files that were generated & used to start up the private testnet. Here is a sample output:
```console ```console
INFO[2023-08-21T18:22:18-04:00] ==================================================== INFO[2024-07-09T12:01:35+02:00] ========================================================
INFO[2023-08-21T18:22:18-04:00] || Created enclave: silky-swamp || INFO[2024-07-09T12:01:35+02:00] || Created enclave: silent-mountain ||
INFO[2023-08-21T18:22:18-04:00] ==================================================== INFO[2024-07-09T12:01:35+02:00] ========================================================
Name: silky-swamp Name: silent-mountain
UUID: 3df730c66123 UUID: cb5d0a7d0e7c
Status: RUNNING Status: RUNNING
Creation Time: Mon, 21 Aug 2023 18:21:32 EDT Creation Time: Tue, 09 Jul 2024 12:00:03 CEST
Flags:
========================================= Files Artifacts ========================================= ========================================= Files Artifacts =========================================
UUID Name UUID Name
c168ec4468f6 1-lighthouse-reth-0-63 414a075a37aa 1-lighthouse-reth-0-63-0
61f821e2cfd5 2-teku-reth-64-127 34d0b9ff906b 2-teku-reth-64-127-0
e6f94fdac1b8 cl-genesis-data dffa1bcd1da1 el_cl_genesis_data
e6b57828d099 el-genesis-data fdb202429b26 final-genesis-timestamp
1fb632573a2e genesis-generation-config-cl da0d9d24b340 genesis-el-cl-env-file
b8917e497980 genesis-generation-config-el 55c46a6555ad genesis_validators_root
6fd8c5be336a geth-prefunded-keys ba79dbd109dd jwt_file
6ab83723b4bd prysm-password 04948fd8b1e3 keymanager_file
538211b6b7d7 prysm-password
ed75fe7d5293 validator-ranges
========================================== User Services ========================================== ========================================== User Services ==========================================
UUID Name Ports Status UUID Name Ports Status
95386198d3f9 cl-1-lighthouse-reth http: 4000/tcp -> http://127.0.0.1:64947 RUNNING 0853f809c300 cl-1-lighthouse-reth http: 4000/tcp -> http://127.0.0.1:32811 RUNNING
metrics: 5054/tcp -> http://127.0.0.1:64948 metrics: 5054/tcp -> http://127.0.0.1:32812
tcp-discovery: 9000/tcp -> 127.0.0.1:64949 tcp-discovery: 9000/tcp -> 127.0.0.1:32813
udp-discovery: 9000/udp -> 127.0.0.1:60303 udp-discovery: 9000/udp -> 127.0.0.1:32776
5f5cc4cf639a cl-1-lighthouse-reth-validator http: 5042/tcp -> 127.0.0.1:64950 RUNNING f81cd467efe3 cl-2-teku-reth http: 4000/tcp -> http://127.0.0.1:32814 RUNNING
metrics: 5064/tcp -> http://127.0.0.1:64951 metrics: 8008/tcp -> http://127.0.0.1:32815
27e1cfaddc72 cl-2-teku-reth http: 4000/tcp -> 127.0.0.1:64954 RUNNING tcp-discovery: 9000/tcp -> 127.0.0.1:32816
metrics: 8008/tcp -> 127.0.0.1:64952 udp-discovery: 9000/udp -> 127.0.0.1:32777
tcp-discovery: 9000/tcp -> 127.0.0.1:64953 f21d5ca3061f el-1-reth-lighthouse engine-rpc: 8551/tcp -> 127.0.0.1:32803 RUNNING
udp-discovery: 9000/udp -> 127.0.0.1:53749 metrics: 9001/tcp -> http://127.0.0.1:32804
b454497fbec8 el-1-reth-lighthouse engine-rpc: 8551/tcp -> 127.0.0.1:64941 RUNNING rpc: 8545/tcp -> 127.0.0.1:32801
metrics: 9001/tcp -> 127.0.0.1:64937 tcp-discovery: 30303/tcp -> 127.0.0.1:32805
rpc: 8545/tcp -> 127.0.0.1:64939 udp-discovery: 30303/udp -> 127.0.0.1:32774
tcp-discovery: 30303/tcp -> 127.0.0.1:64938 ws: 8546/tcp -> 127.0.0.1:32802
udp-discovery: 30303/udp -> 127.0.0.1:55861 e234b3b4a440 el-2-reth-teku engine-rpc: 8551/tcp -> 127.0.0.1:32808 RUNNING
ws: 8546/tcp -> 127.0.0.1:64940 metrics: 9001/tcp -> http://127.0.0.1:32809
03a2ef13c99b el-2-reth-teku engine-rpc: 8551/tcp -> 127.0.0.1:64945 RUNNING rpc: 8545/tcp -> 127.0.0.1:32806
metrics: 9001/tcp -> 127.0.0.1:64946 tcp-discovery: 30303/tcp -> 127.0.0.1:32810
rpc: 8545/tcp -> 127.0.0.1:64943 udp-discovery: 30303/udp -> 127.0.0.1:32775
tcp-discovery: 30303/tcp -> 127.0.0.1:64942 ws: 8546/tcp -> 127.0.0.1:32807
udp-discovery: 30303/udp -> 127.0.0.1:64186 92dd5a0599dc validator-key-generation-cl-validator-keystore <none> RUNNING
ws: 8546/tcp -> 127.0.0.1:64944 f0a7d5343346 vc-1-reth-lighthouse metrics: 8080/tcp -> http://127.0.0.1:32817 RUNNING
5c199b334236 prelaunch-data-generator-cl-genesis-data <none> RUNNING
46829c4bd8b0 prelaunch-data-generator-el-genesis-data <none> RUNNING
``` ```
Great! You now have a private network with 2 full Ethereum nodes on your local machine over Docker - one that is a Reth/Lighthouse pair and another that is Reth/Teku. Check out the [Kurtosis docs](https://docs.kurtosis.com/cli) to learn about the various ways you can interact with and inspect your network. Great! You now have a private network with 2 full Ethereum nodes on your local machine over Docker - one that is a Reth/Lighthouse pair and another that is Reth/Teku. Check out the [Kurtosis docs](https://docs.kurtosis.com/cli) to learn about the various ways you can interact with and inspect your network.