Skip to content

Commit 7496f01

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-compute-commitment-integrity-check
2 parents 3b393f0 + b73882f commit 7496f01

File tree

236 files changed

+7825
-3115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+7825
-3115
lines changed
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
name: launch-bal-devnet-2
3+
description: Launch erigon + Lighthouse on the bal-devnet-2 ethpandaops devnet (EIP-7928 Block Access Lists). Manages start/stop of both EL and CL clients with proper port offsets and JWT auth.
4+
allowed-tools: Bash, Read, Write, Edit, Glob
5+
allowed-prompts:
6+
- tool: Bash
7+
prompt: start, stop, and manage erigon and lighthouse processes for bal-devnet-2
8+
---
9+
10+
# Launch bal-devnet-2 (EIP-7928 BAL Devnet)
11+
12+
Run erigon (EL) + Lighthouse (CL) on the bal-devnet-2 ethpandaops devnet for testing EIP-7928 Block Access Lists.
13+
14+
## Network Details
15+
16+
| Parameter | Value |
17+
|-----------|-------|
18+
| Chain ID | 7033429093 |
19+
| Genesis timestamp | 1770388190 |
20+
| Amsterdam timestamp | 1770400508 (epoch 32) |
21+
| Lighthouse image | `ethpandaops/lighthouse:bal-devnet-2-65bb283` |
22+
| Lighthouse version | v8.0.1 (commit 65bb283, branch bal-devnet-2) |
23+
| Explorer | https://explorer.bal-devnet-2.ethpandaops.io |
24+
| Faucet | https://faucet.bal-devnet-2.ethpandaops.io |
25+
| RPC | https://rpc.bal-devnet-2.ethpandaops.io |
26+
| Checkpoint sync | https://checkpoint-sync.bal-devnet-2.ethpandaops.io |
27+
28+
## Working Directory
29+
30+
Ask the user where they want the working directory. Default suggestion: `~/bal-devnet-2/`.
31+
Use `$WORKDIR` throughout to refer to the chosen path.
32+
33+
```
34+
$WORKDIR/
35+
├── genesis.json # EL genesis
36+
├── config.yaml # CL beacon config
37+
├── genesis.ssz # CL genesis state
38+
├── testnet-config/ # Lighthouse testnet dir (config.yaml + genesis.ssz + deploy files)
39+
├── start-erigon.sh # Erigon start script (run FIRST)
40+
├── start-lighthouse.sh # Lighthouse start script (run SECOND)
41+
├── stop.sh # Stop both erigon + Lighthouse
42+
├── clean.sh # Stop, wipe data, re-init genesis
43+
├── erigon-data/ # Erigon datadir (contains jwt.hex)
44+
├── lighthouse-data/ # Lighthouse datadir
45+
├── erigon-console.log # Erigon stdout/stderr
46+
└── lighthouse-console.log # Lighthouse stdout/stderr
47+
```
48+
49+
## Port Assignments (offset +100)
50+
51+
| Service | Port | Protocol |
52+
|---------|------|----------|
53+
| Erigon HTTP RPC | 8645 | TCP |
54+
| Erigon Engine API (authrpc) | 8651 | TCP |
55+
| Erigon WebSocket | 8646 | TCP |
56+
| Erigon P2P | 30403 | TCP+UDP |
57+
| Erigon gRPC | 9190 | TCP |
58+
| Erigon Torrent | 42169 | TCP+UDP |
59+
| Erigon pprof | 6160 | TCP |
60+
| Erigon metrics | 6161 | TCP |
61+
| Lighthouse P2P | 9100 | TCP+UDP |
62+
| Lighthouse QUIC | 9101 | UDP |
63+
| Lighthouse HTTP API | 5152 | TCP |
64+
| Lighthouse metrics | 5264 | TCP |
65+
66+
## Workflow
67+
68+
### Step 1: Check Prerequisites
69+
70+
1. Verify erigon binary exists at `./build/bin/erigon`. If not, invoke `/erigon-build`.
71+
2. Verify the Lighthouse Docker image is available:
72+
```bash
73+
docker image inspect ethpandaops/lighthouse:bal-devnet-2-65bb283 > /dev/null 2>&1
74+
```
75+
If not, pull it:
76+
```bash
77+
docker pull ethpandaops/lighthouse:bal-devnet-2-65bb283
78+
```
79+
3. Verify config files exist in `$WORKDIR` (genesis.json, testnet-config/).
80+
If not, download them:
81+
```bash
82+
mkdir -p $WORKDIR/testnet-config
83+
curl -sL -o $WORKDIR/genesis.json https://config.bal-devnet-2.ethpandaops.io/el/genesis.json
84+
curl -sL -o $WORKDIR/testnet-config/config.yaml https://config.bal-devnet-2.ethpandaops.io/cl/config.yaml
85+
curl -sL -o $WORKDIR/testnet-config/genesis.ssz https://config.bal-devnet-2.ethpandaops.io/cl/genesis.ssz
86+
echo "0" > $WORKDIR/testnet-config/deposit_contract_block.txt
87+
echo "0" > $WORKDIR/testnet-config/deploy_block.txt
88+
```
89+
90+
### Step 2: Initialize Datadir (first run only)
91+
92+
If `$WORKDIR/erigon-data/chaindata` does not exist:
93+
```bash
94+
./build/bin/erigon init --datadir $WORKDIR/erigon-data $WORKDIR/genesis.json
95+
```
96+
97+
### Step 3: Create Scripts (first run only)
98+
99+
If the start/stop/clean scripts don't exist yet, generate them. The scripts must use absolute paths based on `$WORKDIR`. Key details:
100+
101+
**start-erigon.sh** — Runs erigon with `--externalcl`. Must start FIRST (creates JWT secret).
102+
- Env vars: `ERIGON_EXEC3_PARALLEL=true`, `ERIGON_ASSERT=true`, `ERIGON_EXEC3_WORKERS=12`, `LOG_HASH_MISMATCH_REASON=true`
103+
- Flags: `--datadir=$WORKDIR/erigon-data`, `--externalcl`, `--networkid=7033429093`, all 16 EL bootnodes, erigon static peers, `--prune.mode=minimal`, all offset ports (see port table), `--http.api=eth,erigon,engine,debug`, `--pprof`, `--metrics`
104+
- EL bootnodes: fetch from `https://config.bal-devnet-2.ethpandaops.io/api/v1/nodes/inventory` (extract enode URLs from `execution.enode` fields)
105+
106+
**start-lighthouse.sh** — Runs Lighthouse via Docker with `--network=host`. Must start SECOND.
107+
- Checks JWT exists at `$WORKDIR/erigon-data/jwt.hex`
108+
- Docker container name: `bal-devnet-2-lighthouse`
109+
- Mounts: `$WORKDIR/testnet-config:/config:ro`, `$WORKDIR/lighthouse-data:/data`, JWT as `/jwt.hex:ro`
110+
- Flags: `--testnet-dir=/config`, `--execution-endpoint=http://127.0.0.1:8651`, `--execution-jwt=/jwt.hex`, all 15 CL ENR bootnodes, offset ports, `--checkpoint-sync-url=https://checkpoint-sync.bal-devnet-2.ethpandaops.io`
111+
- CL bootnodes: fetch from same inventory URL (extract ENR entries from `consensus.enr` fields)
112+
113+
**stop.sh** — Stops Lighthouse (`docker stop bal-devnet-2-lighthouse`) then erigon (`pkill -f "datadir.*bal-devnet-2/erigon-data"`).
114+
115+
**clean.sh** — Runs `stop.sh`, removes erigon chain data (chaindata, snapshots, txpool, nodes, temp) and lighthouse data, re-initializes genesis.
116+
117+
### Step 4: Start Erigon (FIRST)
118+
119+
Erigon must start first because it creates the JWT secret that Lighthouse needs.
120+
121+
```bash
122+
cd $WORKDIR && nohup bash start-erigon.sh > erigon-console.log 2>&1 &
123+
```
124+
125+
Verify it started:
126+
- Check `tail $WORKDIR/erigon-console.log` for startup messages
127+
- Check JWT exists: `ls $WORKDIR/erigon-data/jwt.hex`
128+
- Check port binding: `ss -tlnp | grep 8651`
129+
130+
### Step 5: Start Lighthouse (SECOND)
131+
132+
After erigon is running and JWT exists:
133+
134+
```bash
135+
cd $WORKDIR && nohup bash start-lighthouse.sh > lighthouse-console.log 2>&1 &
136+
```
137+
138+
Verify it started:
139+
- Check `tail $WORKDIR/lighthouse-console.log` for "Lighthouse started"
140+
- Look for "Loaded checkpoint block and state" (checkpoint sync)
141+
- Look for `peers: "N"` showing peer connections
142+
143+
### Step 6: Monitor
144+
145+
```bash
146+
# Erigon sync progress
147+
tail -f $WORKDIR/erigon-console.log
148+
149+
# Lighthouse sync progress
150+
tail -f $WORKDIR/lighthouse-console.log
151+
152+
# Check erigon block height via RPC
153+
curl -s http://localhost:8645 -X POST -H "Content-Type: application/json" \
154+
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | python3 -m json.tool
155+
156+
# Check lighthouse sync status
157+
curl -s http://localhost:5152/eth/v1/node/syncing | python3 -m json.tool
158+
```
159+
160+
### Step 7: Stop
161+
162+
```bash
163+
bash $WORKDIR/stop.sh
164+
```
165+
166+
This stops Lighthouse (via `docker stop`) then erigon (via `pkill`).
167+
168+
### Step 8: Clean (wipe data and re-init)
169+
170+
```bash
171+
bash $WORKDIR/clean.sh
172+
```
173+
174+
This runs `stop.sh`, removes erigon chain data (chaindata, snapshots, txpool, nodes, temp) and lighthouse data, then re-initializes genesis. After clean, start again with Steps 4-5.
175+
176+
## Troubleshooting
177+
178+
| Problem | Solution |
179+
|---------|----------|
180+
| JWT auth fails | Ensure erigon started first and `jwt.hex` exists. Lighthouse must mount the same file. |
181+
| No EL peers | Check firewall allows port 30403. Try adding `--nat=extip:<your-ip>`. |
182+
| No CL peers | Check firewall allows port 9100/9101. ENR bootnodes may have changed — re-fetch from inventory. |
183+
| "Head is optimistic" | Normal during initial sync. Erigon is behind Lighthouse. Will resolve as erigon catches up. |
184+
| Engine API timeout | Check erigon is running and authrpc port 8651 is accessible. |
185+
| Port conflict | Check `ss -tlnp | grep <port>`. Kill conflicting process or use higher offset. |

.github/workflows/qa-rpc-integration-tests-latest.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
working-directory: ${{ github.workspace }}
5757

5858
- name: Wait for current Erigon instance to reach the tip
59+
id: preparing_step
5960
run: |
6061
ERIGON_PID=$(pgrep -x erigon | head -1)
6162
if [ -z "$ERIGON_PID" ]; then
@@ -68,6 +69,13 @@ jobs:
6869
--erigon-pid=$ERIGON_PID
6970
fi
7071
72+
- name: Upload preparing-step logs on failure
73+
if: failure() && steps.preparing_step.outcome == 'failure'
74+
uses: actions/upload-artifact@v6
75+
with:
76+
name: preparing-step-logs
77+
path: ${{ env.ERIGON_REFERENCE_DATA_DIR }}/logs/
78+
7179
- name: Pause the Erigon instance dedicated to db maintenance
7280
run: |
7381
python3 $ERIGON_QA_PATH/test_system/db-producer/pause_production.py || true

.github/workflows/test-all-erigon.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363

6464
steps:
6565
- name: Cleanup space on Linux runner
66-
if: runner.os == 'Linux' && needs.source-of-changes.outputs.changed_files != 'true'
66+
if: needs.source-of-changes.outputs.changed_files != 'true'
6767
run: |
6868
rm -fr /opt/az \
6969
/opt/microsoft \
@@ -127,14 +127,16 @@ jobs:
127127
strategy:
128128
matrix:
129129
os: [ windows-2025 ]
130-
runs-on: ${{ matrix.os }}
130+
runs-on:
131+
group: "selfhosted-win"
131132

132133
steps:
133-
- name: Configure Pagefile
134-
uses: al-cheb/configure-pagefile-action@v1.5
135-
with:
136-
minimum-size: 8GB
137-
disk-root: "C:"
134+
# not needed on self-hosted runner. already configured.
135+
#- name: Configure Pagefile
136+
# uses: al-cheb/configure-pagefile-action@v1.5
137+
# with:
138+
# minimum-size: 8GB
139+
# disk-root: "C:"
138140

139141
- name: "Checkout code with submodules and large files (lfs) on ${{ matrix.os }}"
140142
if: needs.source-of-changes.outputs.changed_files != 'true'
@@ -143,22 +145,32 @@ jobs:
143145
fetch-depth: 1
144146
submodules: recursive
145147
lfs: true
148+
clean: true
146149

147150
- name: Setup Go environment on ${{ matrix.os }}
148151
if: needs.source-of-changes.outputs.changed_files != 'true'
149152
uses: actions/setup-go@v6
150153
with:
151-
go-version: '1.25'
152-
cache: true
154+
go-version: '>=1.25'
155+
cache: false
153156

154-
- name: Install make
155-
run: choco install make -y
157+
# "make" already preinstalled:
158+
#- name: Install make
159+
# run: choco install make -y
156160

157161
- name: Run all tests on ${{ matrix.os }}
158162
if: needs.source-of-changes.outputs.changed_files != 'true'
159163
shell: bash
164+
env:
165+
GOMODCACHE: C:\go-cache\mod
166+
GOCACHE: C:\go-cache\build
160167
run: make test-all
161168

169+
- name: Cleanup
170+
if: always()
171+
run: |
172+
Remove-Item -Path "$env:TEMP\*" -Recurse -Force -ErrorAction SilentlyContinue
173+
162174
- name: This ${{ matrix.os }} check does not make sense for changes within out-of-scope directories
163175
if: needs.source-of-changes.outputs.changed_files == 'true'
164176
run: echo "This check does not make sense for changes within out-of-scope directories"

.github/workflows/test-hive-eest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ jobs:
6161
# Only login if we can. Workflow works without it but we want to avoid
6262
# rate limiting by Docker Hub when possible. External repos don't
6363
# have access to our Docker secrets.
64+
# continue-on-error: transient Docker Hub network timeouts should not
65+
# abort the entire workflow — the run proceeds without login (unlogged pull).
6466
if: |
6567
github.repository == 'erigontech/erigon' &&
6668
github.actor != 'dependabot[bot]' &&
6769
(github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork)
70+
continue-on-error: true
6871
uses: docker/login-action@v3
6972
with:
7073
username: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}

.github/workflows/test-hive.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ jobs:
8383
# Only login if we can. Workflow works without it but we want to avoid
8484
# rate limiting by Docker Hub when possible. External repos don't
8585
# have access to our Docker secrets.
86+
# continue-on-error: transient Docker Hub network timeouts should not
87+
# abort the entire workflow — the run proceeds without login (unlogged pull).
8688
if: |
8789
github.repository == 'erigontech/erigon' &&
8890
github.actor != 'dependabot[bot]' &&
8991
(github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork)
92+
continue-on-error: true
9093
uses: docker/login-action@v3
9194
with:
9295
username: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}

0 commit comments

Comments
 (0)