Skip to content

Commit 67543e7

Browse files
committed
feat: add support for holesky-l3
1 parent 44f15ce commit 67543e7

File tree

3 files changed

+231
-2
lines changed

3 files changed

+231
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ These docker-compose files enable you to run Golem Base nodes locally in Docker
1717
To run your Golem node:
1818

1919
1. Clone this repository
20-
2. Change to the compose-file directory:
20+
2. Change to the compose-file directory of the network of choice (`l2` or `l3`):
2121
```bash
2222
cd l2-holesky
2323
```
@@ -34,4 +34,3 @@ Each docker-compose file is configured with appropriate boot nodes and network s
3434

3535
- Ensure you have enough system resources available for running the node
3636
- Check your Docker daemon is running before starting the containers
37-

l3-holesky/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Golem Base L3 Node (Holesky)
2+
3+
This repository contains the Docker Compose configuration to run a Golem Base L3 node connected to the Holesky L2 testnet.
4+
5+
## Components
6+
7+
The setup includes the following main components:
8+
- `op-geth`: The execution client for the L3 chain
9+
- `op-node`: The consensus client that connects to L2 and manages the rollup
10+
11+
## Exposed Ports
12+
13+
The following ports are exposed to your host machine:
14+
15+
- `8545`: op-geth HTTP RPC endpoint
16+
- Supports APIs: debug, eth, txpool, net, engine, web3
17+
- `8546`: op-geth WebSocket endpoint
18+
- Supports same APIs as HTTP endpoint
19+
- Allows WebSocket connections with `ws://localhost:8546`
20+
- `9545`: op-node RPC endpoint
21+
22+
## Prerequisites
23+
24+
- Docker
25+
- Docker Compose
26+
27+
## Getting Started
28+
29+
1. Clone this repository
30+
2. Navigate to the `l3-holesky` directory
31+
3. Start the node:
32+
```bash
33+
docker compose up -d
34+
```
35+
36+
The setup will automatically:
37+
- Download the necessary genesis files
38+
- Initialize the geth client
39+
- Generate required JWT secrets
40+
- Start synchronizing with the network
41+
42+
## Monitoring
43+
44+
You can monitor the sync status through the RPC endpoints:
45+
- L2 execution client: `http://localhost:8545`
46+
- L2 consensus client: `http://localhost:9545`
47+
48+
## Note
49+
50+
This node connects to Holesky L2 endpoints at:
51+
52+
- Execution: https://execution.holesky.l1.gobas.me
53+
- Consensus: https://consensus.holesky.l1.gobas.me
54+
55+
## Bridge
56+
57+
To transfer funds from Holesky L2 to our L3, send funds to the bridge address `0x54d6c1435ac7b90a5d46d01ee2f22ed6ff270ed3`

l3-holesky/docker-compose.yaml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
volumes:
2+
op_geth_data:
3+
op_node_data:
4+
jwt_shared:
5+
config_data:
6+
7+
services:
8+
9+
# ========================================
10+
# OPTIMISM NODE SERVICES
11+
# ========================================
12+
op-init:
13+
image: alpine:latest
14+
command:
15+
- sh
16+
- -c
17+
- |
18+
set -e
19+
20+
# Create config directory
21+
mkdir -p /config
22+
23+
# Download genesis.json for op-geth if it doesn't exist
24+
echo 'Checking for genesis file'
25+
if [ ! -f '/config/genesis.json' ]; then
26+
echo 'Downloading genesis file'
27+
if ! wget -O '/config/genesis.json' 'https://fsn1.your-objectstorage.com/golem-base/holesky-l3/genesis.json'; then
28+
echo 'ERROR: Failed to download genesis file'
29+
exit 1
30+
fi
31+
echo 'Genesis file downloaded successfully'
32+
else
33+
echo 'Genesis file already exists, skipping download'
34+
fi
35+
36+
# Download rollup.json for op-node if it doesn't exist
37+
echo 'Checking for rollup config'
38+
mkdir -p /op-node/rollup
39+
if [ ! -f '/op-node/rollup/rollup.json' ]; then
40+
echo 'Downloading op-node rollup config'
41+
if ! wget -O '/op-node/rollup/rollup.json' 'https://fsn1.your-objectstorage.com/golem-base/holesky-l3/rollup.json'; then
42+
echo 'ERROR: Failed to download rollup config'
43+
exit 1
44+
fi
45+
echo 'Rollup config downloaded successfully'
46+
47+
# Set proper permissions only if we downloaded new files
48+
chmod -R 777 /op-node
49+
chmod -R 777 /config
50+
else
51+
echo 'Rollup config already exists, skipping download'
52+
fi
53+
54+
# Generate JWT secret if it doesn't exist
55+
if [ ! -f '/jwt/jwt' ]; then
56+
echo 'Generating JWT secret'
57+
mkdir -p /jwt
58+
# Generate a 32-byte random hex string for JWT secret
59+
apk add --no-cache openssl
60+
openssl rand -hex 32 > /jwt/jwt
61+
chmod 666 /jwt/jwt
62+
echo 'JWT secret generated successfully'
63+
else
64+
echo 'JWT secret already exists, skipping generation'
65+
fi
66+
volumes:
67+
- op_node_data:/op-node
68+
- config_data:/config
69+
- jwt_shared:/jwt
70+
71+
op-geth-init:
72+
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101503.4
73+
depends_on:
74+
op-init:
75+
condition: service_completed_successfully
76+
entrypoint: []
77+
command:
78+
- /bin/sh
79+
- -c
80+
- |
81+
set -e
82+
if [ ! -f '/geth/geth' ]; then
83+
echo 'Initializing geth data directory with genesis block...'
84+
85+
# Use genesis file from op-init
86+
if ! geth init --state.scheme=hash --datadir='/geth' '/config/genesis.json'; then
87+
echo 'ERROR: Failed to initialize geth with genesis block'
88+
exit 1
89+
fi
90+
echo 'Geth initialized successfully with genesis block'
91+
else
92+
echo 'Geth data directory already initialized, skipping initialization'
93+
fi
94+
volumes:
95+
- op_geth_data:/geth
96+
- config_data:/config
97+
98+
op-geth:
99+
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101503.4
100+
restart: unless-stopped
101+
stop_grace_period: 5m
102+
depends_on:
103+
op-geth-init:
104+
condition: service_completed_successfully
105+
command:
106+
- --networkid=934720
107+
- --datadir=/geth
108+
- --http
109+
- --http.corsdomain=*
110+
- --http.vhosts=*
111+
- --http.addr=0.0.0.0
112+
- --http.port=8545
113+
- --http.api=debug,eth,txpool,net,engine,web3,admin
114+
- --ws
115+
- --ws.addr=0.0.0.0
116+
- --ws.port=8546
117+
- --ws.origins=*
118+
- --ws.api=debug,eth,txpool,net,engine,web3,admin
119+
- --syncmode=snap
120+
- --authrpc.vhosts=*
121+
- --authrpc.addr=0.0.0.0
122+
- --authrpc.port=8551
123+
- --authrpc.jwtsecret=/jwt/jwt
124+
- --usb=false
125+
- --state.scheme=hash
126+
- --nat=none
127+
- --bootnodes=enode://103f4ced3a120544ab1d71841907bcd21c65e5f493126355973d4667b7fec34dfe52eb6daf54ed9ab6af7cf9ab6b503d57d7f03a6c9d0f26c52bbd84bce39479@116.202.192.224:31304,enode://e55aabe7ff58866b76fe76e81002d858735e9694f5b44a632f046060c8821dce096c9875fff4b09581a6b10da3bc63caa1a723fa877efc8c4f100e56ac65a845@116.202.192.224:31306,enode://53f9c31cf73bc77fec567ee2e3a8dc2891b72b877b31bcb2acd3261b2541f7512e25769c9d43ef44c07d87fa6437377506f00ea33c15ea66afe76b7dd8328c86@116.202.192.224:31308
128+
ports:
129+
- 8545:8545
130+
- 8546:8546
131+
volumes:
132+
- op_geth_data:/geth
133+
- jwt_shared:/jwt
134+
135+
op-node:
136+
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.13.0
137+
restart: unless-stopped
138+
stop_grace_period: 5m
139+
depends_on:
140+
op-init:
141+
condition: service_completed_successfully
142+
op-geth:
143+
condition: service_started
144+
command:
145+
- op-node
146+
- --l1=https://execution.holesky.l2.gobas.me
147+
- --l1.beacon.ignore=true
148+
- --l1.rpckind=standard
149+
- --l1.trustrpc
150+
- --l1.epoch-poll-interval=2s
151+
- --l1.http-poll-interval=2s
152+
- --l2=http://op-geth:8551
153+
- --l2.enginekind=geth
154+
- --l2.jwt-secret=/jwt/jwt
155+
- --rpc.addr=0.0.0.0
156+
- --rpc.port=9545
157+
- --rpc.enable-admin
158+
- --p2p.nat=true
159+
- --p2p.ban.peers=false
160+
- --p2p.bootnodes=enr:-J64QJ9dFRfUfGy7I5fRfiAkr9lH4HJkZCu2_3A4SjAxo8yxGb14H5CKvWn_Bk69pSd0XgtvE9C4Vw2Ur2aBwZk-qIyGAZaGnOm5gmlkgnY0gmlwhHTKwOCHb3BzdGFja4TAhjkAiXNlY3AyNTZrMaECuyXO9hy1FGAZUcj3x9VToEQxPkhcPT5wBJBz2Aw-wdaDdGNwgnpJg3VkcIJ6SQ,enr:-J64QDbbEonmsiJBHbo5Y-NL9VTHGZmKpyzSvWEpqQUIzXUEaoiv3ntWvF_bDsxWdPNYcAzdvZMB-OfwK_-OcNqi2LyGAZagH_yBgmlkgnY0gmlwhHTKwOCHb3BzdGFja4TAhjkAiXNlY3AyNTZrMaECkwhhwgjUkq1XqNc7226XyJeARd-VbxT2WCAlqZp7v4GDdGNwgnpLg3VkcIJ6Sw,enr:-J64QOkE89qfCn0wzgXCFf01qhU45pGWIolX1EknGLacz8qtPx5rp18JBoCR8S-CM2_BKCyKiXfoBLffdDDrpqtV25OGAZagPRpfgmlkgnY0gmlwhHTKwOCHb3BzdGFja4TAhjkAiXNlY3AyNTZrMaECAr1qM6RXFbVDyfe41Jn9YZhaaEogtw2aW5Ze-xtVXVaDdGNwgnpNg3VkcIJ6TQ
161+
- --p2p.listen.tcp=9222
162+
- --p2p.listen.udp=9222
163+
- --metrics.enabled
164+
- --metrics.addr=0.0.0.0
165+
- --metrics.port=7300
166+
- --syncmode=execution-layer
167+
- --rollup.config=/op-node/rollup/rollup.json
168+
- --log.level=info
169+
ports:
170+
- 9545:9545
171+
volumes:
172+
- jwt_shared:/jwt
173+
- op_node_data:/op-node

0 commit comments

Comments
 (0)