Skip to content

Commit c57b4df

Browse files
Zoraiz MahmoodZoraiz Mahmood
authored andcommitted
Geth v1.15.11 and Prysm v6.0.4
Updates: - Updated go-ethereum submodule from v1.14.12 to v1.15.11 - Updated prysm submodule from v5.1.2 to v6.0.4 - Modified testnet.sh to use first geth node as bootnode (bootnode binary removed in newer geth) - Fixed configuration conflicts by using unique fork versions - Added complete fork configuration including Electra and Fulu - Updated CLAUDE.md documentation Successfully achieved: ✅ Both submodules updated to latest versions ✅ Dependencies build without errors ✅ Bootnode dependency removed (geth nodes self-bootstrap) ✅ Configuration conflicts resolved (genesis generation proceeds) Known limitation: ⚠️ Genesis generation fails with RANDAO mixes panic in Prysm v6.0.4 minimal preset This appears to be a bug in Prysm v6.0.4 when using minimal preset with few validators. Workaround: Use ethereum-genesis-generator or different Prysm version.
1 parent da60d68 commit c57b4df

22 files changed

Lines changed: 1002 additions & 54 deletions

CLAUDE.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is a Local Ethereum Proof-of-Stake (PoS) Testnet deployment tool for developers who want to quickly set up and deploy their own local Ethereum PoS networks with multiple nodes. It's useful for testing modifications to Ethereum client source code, simulating blockchain reorganizations, testing Byzantine behavior, and developing Ethereum applications.
8+
9+
## Key Commands
10+
11+
### Building Dependencies
12+
```bash
13+
# Build Go-Ethereum and Prysm from submodules
14+
./build-dependencies.sh
15+
16+
# Build only Geth (from dependencies/go-ethereum directory)
17+
cd dependencies/go-ethereum && make geth
18+
19+
# Build Prysm components (from dependencies/prysm directory)
20+
cd dependencies/prysm
21+
bazel build //cmd/beacon-chain:beacon-chain
22+
bazel build //cmd/validator:validator
23+
```
24+
25+
### Running the Testnet
26+
```bash
27+
# Start testnet with default 2 validators
28+
./testnet.sh
29+
30+
# Check if blocks are being produced
31+
./healthcheck.sh
32+
```
33+
34+
### Development Commands for Go-Ethereum
35+
From `dependencies/go-ethereum/`:
36+
```bash
37+
make test # Run tests
38+
make lint # Run linters
39+
make fmt # Format Go code
40+
```
41+
42+
## Architecture
43+
44+
The testnet consists of:
45+
- **Execution Layer**: Go-Ethereum (Geth) nodes
46+
- **Consensus Layer**: Prysm beacon chain and validator clients
47+
- **Configuration**: `config.yml` (consensus) and `genesis.json` (execution)
48+
49+
Each node runs both layers with incrementing ports:
50+
- Geth HTTP: 8000, 8001, 8002...
51+
- Beacon RPC: 4000, 4001, 4002...
52+
- Beacon Gateway: 4100, 4101, 4102...
53+
54+
## Key Files and Modifications
55+
56+
1. **testnet.sh**: Main orchestration script that:
57+
- Sets up network directories
58+
- Initializes validator keys
59+
- Starts Geth and Prysm processes
60+
- Contains NUM_NODES variable to control validator count
61+
62+
2. **config.yml**: Beacon chain configuration
63+
- Fork epochs (Altair, Bellatrix, Capella, Deneb, Electra)
64+
- 2-second slots for faster finalization
65+
- Network parameters
66+
67+
3. **genesis.json**: Execution layer genesis
68+
- Pre-funded addresses in the `alloc` section
69+
- Chain ID and initial parameters
70+
71+
## Working with Submodules
72+
73+
The project uses Git submodules for Ethereum clients:
74+
- `dependencies/go-ethereum` - Geth execution client
75+
- `dependencies/prysm` - Prysm consensus client
76+
77+
When making changes to these dependencies, remember they are separate Git repositories.
78+
79+
## Testing Modifications
80+
81+
To test changes to Ethereum clients:
82+
1. Make modifications in `dependencies/go-ethereum` or `dependencies/prysm`
83+
2. Run `./build-dependencies.sh` to rebuild
84+
3. Run `./testnet.sh` to test with your changes
85+
4. Check logs in `./network/node-*/logs/`
86+
87+
## Network Data
88+
89+
All runtime data is stored in `./network/`:
90+
- `node-0/`, `node-1/`, etc. - Individual node data
91+
- Logs are in `./network/node-*/logs/`
92+
- The network directory is cleaned on each run for idempotent deployments

config.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
CONFIG_NAME: interop
2-
PRESET_BASE: interop
1+
CONFIG_NAME: testnet-local
2+
PRESET_BASE: minimal
33

44
# Genesis
55
GENESIS_FORK_VERSION: 0x20000089
@@ -24,6 +24,11 @@ DENEB_FORK_EPOCH: 0
2424

2525
# Electra
2626
ELECTRA_FORK_VERSION: 0x20000094
27+
ELECTRA_FORK_EPOCH: 0
28+
29+
# Fulu (required to avoid conflicts)
30+
FULU_FORK_VERSION: 0x20000095
31+
FULU_FORK_EPOCH: 18446744073709551615
2732

2833
# Time parameters
2934
SECONDS_PER_SLOT: 2

dependencies/go-ethereum

Submodule go-ethereum updated 960 files

dependencies/prysm

Submodule prysm updated from 944f94a to 91b4436

kurtosis-style.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
CONFIG_NAME: testnet-kurtosis-style
2+
PRESET_BASE: minimal
3+
4+
# Genesis
5+
GENESIS_FORK_VERSION: 0x90000069
6+
7+
# All fork epochs - following Kurtosis pattern
8+
ALTAIR_FORK_EPOCH: 0
9+
ALTAIR_FORK_VERSION: 0x90000070
10+
11+
BELLATRIX_FORK_EPOCH: 0
12+
BELLATRIX_FORK_VERSION: 0x90000071
13+
TERMINAL_TOTAL_DIFFICULTY: 0
14+
15+
CAPELLA_FORK_EPOCH: 0
16+
CAPELLA_FORK_VERSION: 0x90000072
17+
18+
DENEB_FORK_EPOCH: 0
19+
DENEB_FORK_VERSION: 0x90000073
20+
21+
ELECTRA_FORK_EPOCH: 0
22+
ELECTRA_FORK_VERSION: 0x90000074
23+
24+
# Future forks - disabled by setting to max uint64
25+
FULU_FORK_EPOCH: 18446744073709551615
26+
FULU_FORK_VERSION: 0x90000075
27+
28+
# Required parameters for newer Prysm versions
29+
SECONDS_PER_SLOT: 2
30+
SLOTS_PER_EPOCH: 32
31+
32+
# Network parameters
33+
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
34+
MAX_WITHDRAWALS_PER_PAYLOAD: 16
35+
36+
# PeerDAS parameters (required for v6.x)
37+
CUSTODY_REQUIREMENT: 4
38+
DATA_COLUMN_SIDECAR_SUBNET_COUNT: 128
39+
SAMPLES_PER_SLOT: 8
40+
MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096

mainnet-testnet.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
CONFIG_NAME: local-mainnet-test
2+
PRESET_BASE: mainnet
3+
4+
# Genesis
5+
GENESIS_FORK_VERSION: 0x70000001
6+
7+
# Altair
8+
ALTAIR_FORK_EPOCH: 0
9+
ALTAIR_FORK_VERSION: 0x70000002
10+
11+
# Merge
12+
BELLATRIX_FORK_EPOCH: 0
13+
BELLATRIX_FORK_VERSION: 0x70000003
14+
TERMINAL_TOTAL_DIFFICULTY: 0
15+
16+
# Capella
17+
CAPELLA_FORK_EPOCH: 0
18+
CAPELLA_FORK_VERSION: 0x70000004
19+
MAX_WITHDRAWALS_PER_PAYLOAD: 16
20+
21+
# Deneb
22+
DENEB_FORK_VERSION: 0x70000005
23+
DENEB_FORK_EPOCH: 0
24+
25+
# Time parameters (fast for testing)
26+
SECONDS_PER_SLOT: 2
27+
SLOTS_PER_EPOCH: 32
28+
29+
# Deposit contract
30+
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242

minimal-custom.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
CONFIG_NAME: minimal-testnet
2+
PRESET_BASE: minimal
3+
4+
# Genesis
5+
GENESIS_FORK_VERSION: 0x90000069
6+
7+
# Altair
8+
ALTAIR_FORK_EPOCH: 0
9+
ALTAIR_FORK_VERSION: 0x90000070
10+
11+
# Merge
12+
BELLATRIX_FORK_EPOCH: 0
13+
BELLATRIX_FORK_VERSION: 0x90000071
14+
TERMINAL_TOTAL_DIFFICULTY: 0
15+
16+
# Capella
17+
CAPELLA_FORK_EPOCH: 0
18+
CAPELLA_FORK_VERSION: 0x90000072
19+
MAX_WITHDRAWALS_PER_PAYLOAD: 16
20+
21+
# Deneb
22+
DENEB_FORK_VERSION: 0x90000073
23+
DENEB_FORK_EPOCH: 0
24+
25+
# Time parameters (fast for testing)
26+
SECONDS_PER_SLOT: 2
27+
SLOTS_PER_EPOCH: 32
28+
29+
# Deposit contract
30+
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242

simple-testnet.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
CONFIG_NAME: local-testnet-simple
2+
PRESET_BASE: minimal
3+
4+
# Genesis
5+
GENESIS_FORK_VERSION: 0x80000001
6+
7+
# Altair
8+
ALTAIR_FORK_EPOCH: 0
9+
ALTAIR_FORK_VERSION: 0x80000002
10+
11+
# Merge
12+
BELLATRIX_FORK_EPOCH: 0
13+
BELLATRIX_FORK_VERSION: 0x80000003
14+
TERMINAL_TOTAL_DIFFICULTY: 0
15+
16+
# Capella
17+
CAPELLA_FORK_EPOCH: 0
18+
CAPELLA_FORK_VERSION: 0x80000004
19+
MAX_WITHDRAWALS_PER_PAYLOAD: 16
20+
21+
# Deneb (final fork - no newer forks to avoid conflicts)
22+
DENEB_FORK_VERSION: 0x80000005
23+
DENEB_FORK_EPOCH: 0
24+
25+
# Time parameters
26+
SECONDS_PER_SLOT: 2
27+
SLOTS_PER_EPOCH: 32
28+
29+
# Deposit contract
30+
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242

0 commit comments

Comments
 (0)