-
Notifications
You must be signed in to change notification settings - Fork 15
/
services.yaml
206 lines (194 loc) · 7.22 KB
/
services.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
version: "3"
services:
aggregator:
image: ghcr.io/espressosystems/zkevm-node:hotshot-integration
expose:
- 50081
- 9091 # needed if metrics enabled
environment:
- ZKEVM_NODE_STATEDB_USER=state_user
- ZKEVM_NODE_STATEDB_PASSWORD=state_password
- ZKEVM_NODE_STATEDB_NAME=state_db
- ZKEVM_NODE_STATEDB_HOST=zkevm-1-state-db
volumes:
- ./zkevm-node/test/sequencer.keystore:/pk/sequencer.keystore
- ./zkevm-node/test/aggregator.keystore:/pk/aggregator.keystore
- ./zkevm-node/test/config/test.node.config.toml:/app/config.toml
- ./zkevm-node/test/config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --genesis /app/genesis.json --cfg /app/config.toml --components aggregator"
extra_hosts:
- "host.docker.internal:host-gateway"
state-db:
image: postgres:16
expose:
- 5432
volumes:
- ./zkevm-node/db/scripts/init_prover_db.sql:/docker-entrypoint-initdb.d/1.sql
- ./zkevm-node-additions/init_pool_db.sql:/docker-entrypoint-initdb.d/2.sql
environment:
- POSTGRES_USER=state_user
- POSTGRES_PASSWORD=state_password
- POSTGRES_DB=state_db
command: [ "postgres", "-N", "500" ]
healthcheck:
# Postgres can be falsely "ready" once before running init scripts.
# See https://github.com/docker-library/postgres/issues/146 for discusson.
test: "pg_isready -U state_user -d state_db && sleep 1 && pg_isready -U state_user -d state_db"
interval: 5s
timeout: 4s
retries: 20
prover:
image: hermeznetwork/zkevm-prover:88f3835
expose:
- 50052 # Mock prover
- 50061 # MT
- 50071 # Executor
command: >
zkProver -c /usr/src/app/config.json
stop_signal: SIGKILL
healthcheck:
test: timeout 1 bash -c "cat < /dev/null > /dev/tcp/localhost/50071"
interval: 5s
timeout: 4s
retries: 20
permissionless-node:
image: ghcr.io/espressosystems/zkevm-node:hotshot-integration
environment:
- ZKEVM_NODE_TRUSTED=false
- ZKEVM_NODE_STATEDB_USER=state_user
- ZKEVM_NODE_STATEDB_PASSWORD=state_password
- ZKEVM_NODE_STATEDB_NAME=state_db
- ZKEVM_NODE_POOL_DB_USER=state_user
- ZKEVM_NODE_POOL_DB_PASSWORD=state_password
- ZKEVM_NODE_POOL_DB_NAME=pool_db # different DB name to run pool migrations
volumes:
- ./zkevm-node/test/sequencer.keystore:/pk/keystore
- ./zkevm-node/test/config/test.node.config.toml:/app/config.toml
- ./zkevm-node/test/config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --genesis /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\""
healthcheck:
# curl not installed in container, but wget is
test: "wget http://localhost:$$ZKEVM_NODE_RPC_PORT -q --spider --tries 1 || exit 1"
interval: 3s
timeout: 2s
retries: 120
extra_hosts:
- "host.docker.internal:host-gateway"
eth-tx-manager:
image: ghcr.io/espressosystems/zkevm-node:hotshot-integration
environment:
- ZKEVM_NODE_STATEDB_USER=state_user
- ZKEVM_NODE_STATEDB_PASSWORD=state_password
- ZKEVM_NODE_STATEDB_NAME=state_db
- ZKEVM_NODE_ETHERMAN_POEADDR=$ESPRESSO_ZKEVM_1_ROLLUP_ADDRESS
- ZKEVM_NODE_ETHERMAN_MATICADDR=$ESPRESSO_ZKEVM_1_MATIC_ADDRESS
- ZKEVM_NODE_ETHERMAN_GLOBALEXITROOTMANAGERADDR=$ESPRESSO_ZKEVM_1_GER_ADDRESS
- ZKEVM_NODE_ETHERMAN_URL=$ESPRESSO_ZKEVM_L1_PROVIDER
- ZKEVM_NODE_ETHERMAN_HOTSHOTQUERYSERVICEURL=$ESPRESSO_ZKEVM_1_ADAPTOR_QUERY_URL
- ZKEVM_NODE_ETHERMAN_HOTSHOTADDR=$ESPRESSO_SEQUENCER_HOTSHOT_ADDRESS
- ZKEVM_NODE_MTCLIENT_URI=$ESPRESSO_ZKEVM_1_MTCLIENT_URI
- ZKEVM_NODE_EXECUTOR_URI=$ESPRESSO_ZKEVM_1_EXECUTOR_URI
- ZKEVM_NODE_ETHTXMANAGER_POLLINGINTERVAL=$ESPRESSO_ZKEVM_ETH_TX_MANAGER_POLLING_INTERVAL
volumes:
- ./zkevm-node/test/sequencer.keystore:/pk/sequencer.keystore
- ./zkevm-node/test/aggregator.keystore:/pk/aggregator.keystore
- ./zkevm-node/test/config/test.node.config.toml:/app/config.toml
- ./zkevm-node/test/config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --genesis /app/genesis.json --cfg /app/config.toml --components eth-tx-manager"
extra_hosts:
- "host.docker.internal:host-gateway"
faucet:
image: ghcr.io/espressosystems/discord-faucet:main
environment:
- ESPRESSO_DISCORD_FAUCET_DISCORD_TOKEN
- ESPRESSO_DISCORD_FAUCET_GRANT_AMOUNT_ETHERS
- ESPRESSO_DISCORD_FAUCET_MNEMONIC
- ESPRESSO_DISCORD_FAUCET_NUM_CLIENTS
- ESPRESSO_DISCORD_FAUCET_PORT
- ESPRESSO_DISCORD_FAUCET_TRANSACTION_TIMEOUT_SECS
- RUST_LOG
- RUST_LOG_FORMAT
- RUST_BACKTRACE=1
healthcheck:
test: curl --fail http://localhost:$$ESPRESSO_DISCORD_FAUCET_PORT/healthcheck || exit 1
interval: 2s
retries: 10
timeout: 1s
stop_grace_period: 1s
adaptor:
image: ghcr.io/espressosystems/espresso-polygon-zkevm-demo/polygon-zkevm-adaptor:main
environment:
- ESPRESSO_SEQUENCER_URL
- ESPRESSO_ZKEVM_L1_PROVIDER
- RUST_LOG
- RUST_LOG_FORMAT
healthcheck:
test: curl http://localhost:$$ESPRESSO_ZKEVM_ADAPTOR_QUERY_PORT
interval: 5s
timeout: 3s
retries: 120
stop_grace_period: 1s
blockscout-db:
image: postgres:14
restart: always
command: postgres -c 'max_connections=200'
environment:
POSTGRES_PASSWORD: ''
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
ports:
- "5432"
redis-db:
image: 'redis:alpine'
ports:
- "6379"
command: redis-server
blockscout:
image: ghcr.io/espressosystems/espresso-sequencer/blockscout:main
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
# The polygon fork below also works
# image: hermeznetwork/zkevm-explorer:latest
# command:
# - "/bin/sh"
# - "-c"
# - "mix do ecto.create, ecto.migrate; mix phx.server"
pull_policy: always
restart: always
stop_grace_period: 5m
env_file:
- ./blockscout/docker-compose/envs/common-blockscout.env
environment:
SUBNETWORK: 'OP Rollup 901'
ETHEREUM_JSONRPC_VARIANT: 'geth'
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
MIX_ENV: 'prod'
INDEXER_CATCHUP_BLOCK_INTERVAL: '1s'
smart-contract-verifier:
image: ghcr.io/blockscout/smart-contract-verifier:${SMART_CONTRACT_VERIFIER_DOCKER_TAG:-latest}
pull_policy: always
platform: linux/amd64
restart: always
env_file:
- ./blockscout/docker-compose/envs/common-smart-contract-verifier.env
visualizer:
image: ghcr.io/blockscout/visualizer:${VISUALIZER_DOCKER_TAG:-latest}
pull_policy: always
platform: linux/amd64
restart: always
env_file:
- ./blockscout/docker-compose/envs/common-visualizer.env
sig-provider:
image: ghcr.io/blockscout/sig-provider:${SIG_PROVIDER_DOCKER_TAG:-latest}
pull_policy: always
platform: linux/amd64
restart: always