Skip to content
This repository was archived by the owner on May 11, 2024. It is now read-only.

Commit f8e5b36

Browse files
authored
enable blob docker (#542)
2 parents f725fc1 + d6523d6 commit f8e5b36

14 files changed

+330
-80
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
with:
4646
repository: taikoxyz/taiko-mono
4747
path: ${{ env.TAIKO_MONO_DIR }}
48-
ref: alpha-6
48+
ref: alpha-6_eip4844
4949

5050
- name: Install Foundry
5151
uses: foundry-rs/foundry-toolchain@v1

internal/docker/.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
consensus/beacondata
2+
consensus/genesis.ssz
3+
consensus/validatordata
4+
execution/geth
5+
execution/geth.ipc
6+
execution/genesis.json
7+
taikogeth/taiko-geth

internal/docker/consensus/config.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
CONFIG_NAME: interop
2+
PRESET_BASE: interop
3+
4+
# Genesis
5+
GENESIS_FORK_VERSION: 0x20000089
6+
7+
# Altair
8+
ALTAIR_FORK_EPOCH: 0
9+
ALTAIR_FORK_VERSION: 0x20000090
10+
11+
# Merge
12+
BELLATRIX_FORK_EPOCH: 0
13+
BELLATRIX_FORK_VERSION: 0x20000091
14+
TERMINAL_TOTAL_DIFFICULTY: 0
15+
16+
# Capella
17+
CAPELLA_FORK_EPOCH: 0
18+
CAPELLA_FORK_VERSION: 0x20000092
19+
MAX_WITHDRAWALS_PER_PAYLOAD: 16
20+
21+
DENEB_FORK_EPOCH: 0
22+
DENEB_FORK_VERSION: 0x20000093
23+
24+
# Time parameters
25+
SECONDS_PER_SLOT: 3
26+
SLOTS_PER_EPOCH: 3
27+
28+
# Deposit contract
29+
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242

internal/docker/docker-compose.yml

+186
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
version: "3.9"
2+
3+
services:
4+
# Creates a genesis state for the beacon chain using a YAML configuration file and
5+
# a deterministic set of 64 validators.
6+
create-beacon-chain-genesis:
7+
image: "gcr.io/prysmaticlabs/prysm/cmd/prysmctl:latest"
8+
command:
9+
- testnet
10+
- generate-genesis
11+
- --fork=deneb
12+
- --num-validators=64
13+
- --genesis-time-delay=15
14+
- --output-ssz=/consensus/genesis.ssz
15+
- --chain-config-file=/consensus/config.yml
16+
- --geth-genesis-json-in=/execution/genesis.json
17+
- --geth-genesis-json-out=/execution/genesis.json
18+
volumes:
19+
- ./consensus:/consensus
20+
- ./execution:/execution
21+
22+
# Removes the database of the go-ethereum execution client to ensure we start from a clean state.
23+
# (geth has a `removedb` option, but it asks for a keyboard confirmation, so we use this instead)
24+
geth-remove-db:
25+
image: "alpine:latest"
26+
command: rm -rf /execution/geth
27+
volumes:
28+
- ./execution:/execution
29+
30+
# Sets up the genesis configuration for the go-ethereum client from a JSON file.
31+
geth-genesis:
32+
image: "ethereum/client-go:v1.13.11"
33+
command: --datadir=/execution init /execution/genesis.json
34+
volumes:
35+
- ./execution:/execution
36+
- ./execution/genesis.json:/execution/genesis.json
37+
depends_on:
38+
create-beacon-chain-genesis:
39+
condition: service_completed_successfully
40+
geth-remove-db:
41+
condition: service_completed_successfully
42+
43+
# Runs a Prysm beacon chain from a specified genesis state created in the previous step
44+
# and connects to go-ethereum in the same network as the execution client.
45+
# The account used in go-ethereum is set as the suggested fee recipient for transactions
46+
# proposed via the validators attached to the beacon node.
47+
beacon-chain:
48+
image: "gcr.io/prysmaticlabs/prysm/beacon-chain:stable"
49+
container_name: beacon-chain
50+
command:
51+
- --datadir=/consensus/beacondata
52+
# No peers to sync with in this testnet, so setting to 0
53+
- --min-sync-peers=0
54+
- --genesis-state=/consensus/genesis.ssz
55+
- --bootstrap-node=
56+
- --interop-eth1data-votes
57+
# The chain configuration file used for setting up Prysm
58+
- --chain-config-file=/consensus/config.yml
59+
# We specify the chain id used by our execution client
60+
- --contract-deployment-block=0
61+
- --chain-id=${CHAIN_ID:-32382}
62+
- --rpc-host=0.0.0.0
63+
- --grpc-gateway-host=0.0.0.0
64+
- --execution-endpoint=http://geth:8551
65+
- --accept-terms-of-use
66+
- --jwt-secret=/execution/jwtsecret
67+
- --suggested-fee-recipient=0x123463a4b065722e99115d6c222f267d9cabb524
68+
- --minimum-peers-per-subnet=0
69+
- --enable-debug-rpc-endpoints
70+
- --force-clear-db
71+
depends_on:
72+
create-beacon-chain-genesis:
73+
condition: service_completed_successfully
74+
ports:
75+
- "4000"
76+
volumes:
77+
- ./consensus:/consensus
78+
- ./execution:/execution
79+
- ./execution/jwtsecret:/execution/jwtsecret
80+
81+
# Runs the go-ethereum execution client with the specified, unlocked account and necessary
82+
# APIs to allow for proof-of-stake consensus via Prysm.
83+
geth:
84+
image: "ethereum/client-go:v1.13.11"
85+
container_name: geth
86+
command:
87+
- --http
88+
- --http.api=eth,net,web3
89+
- --http.addr=0.0.0.0
90+
- --http.corsdomain=*
91+
- --ws
92+
- --ws.api=eth,net,web3
93+
- --ws.addr=0.0.0.0
94+
- --ws.origins=*
95+
- --authrpc.vhosts=*
96+
- --authrpc.addr=0.0.0.0
97+
- --authrpc.jwtsecret=/execution/jwtsecret
98+
- --datadir=/execution
99+
- --allow-insecure-unlock
100+
- --unlock=0x123463a4b065722e99115d6c222f267d9cabb524
101+
- --password=/execution/geth_password.txt
102+
- --nodiscover
103+
- --syncmode=full
104+
ports:
105+
- "8545"
106+
- "8546"
107+
depends_on:
108+
geth-genesis:
109+
condition: service_completed_successfully
110+
beacon-chain:
111+
condition: service_started
112+
volumes:
113+
- ./execution:/execution
114+
- ./execution/jwtsecret:/execution/jwtsecret
115+
- ./execution/geth_password.txt:/execution/geth_password.txt
116+
117+
# We run a validator client with 64, deterministically-generated keys that match
118+
# The validator keys present in the beacon chain genesis state generated a few steps above.
119+
validator:
120+
image: "gcr.io/prysmaticlabs/prysm/validator:stable"
121+
container_name: validator
122+
command:
123+
- --beacon-rpc-provider=beacon-chain:4000
124+
- --datadir=/consensus/validatordata
125+
- --accept-terms-of-use
126+
- --interop-num-validators=64
127+
- --interop-start-index=0
128+
- --chain-config-file=/consensus/config.yml
129+
- --force-clear-db
130+
depends_on:
131+
beacon-chain:
132+
condition: service_started
133+
volumes:
134+
- ./consensus:/consensus
135+
136+
l2_execution_engine:
137+
container_name: l2_node
138+
image: gcr.dockerproxy.com/evmchain/taiko-geth:taiko
139+
restart: unless-stopped
140+
pull_policy: always
141+
volumes:
142+
- ./taikogeth:/host
143+
ports:
144+
- "8545"
145+
- "8546"
146+
- "8551"
147+
command:
148+
- --nodiscover
149+
- --gcmode
150+
- archive
151+
- --syncmode
152+
- full
153+
- --datadir
154+
- /host/taiko-geth
155+
- --networkid
156+
- "167001"
157+
- --metrics
158+
- --metrics.expensive
159+
- --metrics.addr
160+
- "0.0.0.0"
161+
- --http
162+
- --http.addr
163+
- "0.0.0.0"
164+
- --http.vhosts
165+
- "*"
166+
- --http.corsdomain
167+
- "*"
168+
- --ws
169+
- --ws.addr
170+
- "0.0.0.0"
171+
- --ws.origins
172+
- "*"
173+
- --authrpc.addr
174+
- "0.0.0.0"
175+
- --authrpc.port
176+
- "8551"
177+
- --authrpc.vhosts
178+
- "*"
179+
- --authrpc.jwtsecret
180+
- /host/jwt.hex
181+
- --allow-insecure-unlock
182+
- --http.api
183+
- admin,debug,eth,net,web3,txpool,miner,taiko
184+
- --ws.api
185+
- admin,debug,eth,net,web3,txpool,miner,taiko
186+
- --taiko

internal/docker/docker_env.sh

+10-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44

55
# check until L1 chain is ready
6-
L1_PROBE_URL=http://localhost:$(docker port l1_node | grep '0.0.0.0' | awk -F ':' '{print $2}')
6+
L1_PROBE_URL=http://localhost:$(docker port geth | grep '0.0.0.0' | awk -F ':' 'NR==1 {print $2}')
77
until cast chain-id --rpc-url "$L1_PROBE_URL" 2> /dev/null; do
88
sleep 1
99
done
@@ -15,20 +15,23 @@ until cast chain-id --rpc-url "$L2_PROBE_URL" 2> /dev/null; do
1515
done
1616

1717

18-
L1_NODE_PORT=$(docker port l1_node | grep '0.0.0.0' | awk -F ':' '{print $2}')
19-
export L1_NODE_HTTP_ENDPOINT=http://localhost:$L1_NODE_PORT
20-
export L1_NODE_WS_ENDPOINT=ws://localhost:$L1_NODE_PORT
18+
L1_BEACON_PORT=$(docker port beacon-chain | grep '0.0.0.0' | awk -F ':' '{print $2}')
19+
export L1_BEACON_HTTP_ENDPOINT=http://localhost:$L1_BEACON_PORT
20+
export L1_NODE_HTTP_ENDPOINT=http://localhost:$(docker port geth | grep '0.0.0.0' | awk -F ':' 'NR==1 {print $2}')
21+
export L1_NODE_WS_ENDPOINT=ws://localhost:$(docker port geth | grep '0.0.0.0' | awk -F ':' 'NR==2 {print $2}')
2122

2223
export L2_EXECUTION_ENGINE_HTTP_ENDPOINT=http://localhost:$(docker port l2_node | grep "0.0.0.0" | awk -F ':' 'NR==1 {print $2}')
2324
export L2_EXECUTION_ENGINE_WS_ENDPOINT=ws://localhost:$(docker port l2_node | grep "0.0.0.0" | awk -F ':' 'NR==2 {print $2}')
2425
export L2_EXECUTION_ENGINE_AUTH_ENDPOINT=http://localhost:$(docker port l2_node | grep "0.0.0.0" | awk -F ':' 'NR==3 {print $2}')
2526
export JWT_SECRET=$DIR/nodes/jwt.hex
2627

27-
echo -e "L1_NODE PORTS: \n$(docker port l1_node)"
28-
echo -e "L2_NODE PORTS: \n$(docker port l2_node)"
29-
28+
echo
29+
echo -e "L1_NODE PORTS: \n$(docker port geth)"
30+
echo "L1_BEACON_HTTP_ENDPOINT: $L1_BEACON_HTTP_ENDPOINT"
3031
echo "L1_NODE_HTTP_ENDPOINT: $L1_NODE_HTTP_ENDPOINT"
3132
echo "L1_NODE_WS_ENDPOINT: $L1_NODE_WS_ENDPOINT"
33+
echo
34+
echo -e "L2_NODE PORTS: \n$(docker port l2_node)"
3235
echo "L2_EXECUTION_ENGINE_HTTP_ENDPOINT: $L2_EXECUTION_ENGINE_HTTP_ENDPOINT"
3336
echo "L2_EXECUTION_ENGINE_WS_ENDPOINT: $L2_EXECUTION_ENGINE_WS_ENDPOINT"
3437
echo "L2_EXECUTION_ENGINE_AUTH_ENDPOINT: $L2_EXECUTION_ENGINE_AUTH_ENDPOINT"

0 commit comments

Comments
 (0)