Skip to content

Commit

Permalink
feat(grimsvotn): add DISABLE_P2P_SYNC option (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored Jun 9, 2023
1 parent c1b5cd0 commit 55cc163
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ BOOT_NODES=enode://4efd43b7fef961cb3853dbafa89f07406ad59e3b4fb9e01bd2e191da0350a
TAIKO_L1_ADDRESS=0x6375394335f34848b850114b66A49D6F47f2cdA8
TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001

# P2P
DISABLE_P2P_SYNC=false

############################### REQUIRED #####################################
# L1 Sepolia RPC endpoints (you will need an RPC provider such as Infura or Alchemy, or run a full Sepolia node yourself)
L1_ENDPOINT_HTTP=
Expand Down
26 changes: 7 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,15 @@ services:
pull_policy: always
depends_on:
- l2_execution_engine
env_file:
- .env
volumes:
- l2_execution_engine_data:/data/taiko-geth
command:
- driver
- --l1.ws
- ${L1_ENDPOINT_WS}
- --l2.ws
- ws://l2_execution_engine:8546
- --l2.auth
- http://l2_execution_engine:8551
- --taikoL1
- ${TAIKO_L1_ADDRESS}
- --taikoL2
- ${TAIKO_L2_ADDRESS}
- --jwtSecret
- /data/taiko-geth/geth/jwtsecret
- --p2p.syncVerifiedBlocks
- --p2p.checkPointSyncUrl
- https://rpc.test.taiko.xyz
- --p2p.syncTimeout
- "120"
- ./script:/script
entrypoint:
- /bin/sh
- -c
- "/script/start-driver.sh"
<<: *logging

taiko_client_prover_relayer:
Expand Down
24 changes: 24 additions & 0 deletions script/start-driver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

set -eou pipefail

if [ "$DISABLE_P2P_SYNC" == "false" ]; then
taiko-client driver \
--l1.ws ${L1_ENDPOINT_WS} \
--l2.ws ws://l2_execution_engine:8546 \
--l2.auth http://l2_execution_engine:8551 \
--taikoL1 ${TAIKO_L1_ADDRESS} \
--taikoL2 ${TAIKO_L2_ADDRESS} \
--jwtSecret /data/taiko-geth/geth/jwtsecret \
--p2p.syncVerifiedBlocks \
--p2p.checkPointSyncUrl https://rpc.test.taiko.xyz \
--p2p.syncTimeout "120"
else
taiko-client driver \
--l1.ws ${L1_ENDPOINT_WS} \
--l2.ws ws://l2_execution_engine:8546 \
--l2.auth http://l2_execution_engine:8551 \
--taikoL1 ${TAIKO_L1_ADDRESS} \
--taikoL2 ${TAIKO_L2_ADDRESS} \
--jwtSecret /data/taiko-geth/geth/jwtsecret
fi

0 comments on commit 55cc163

Please sign in to comment.