|
| 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 |
0 commit comments