-
Notifications
You must be signed in to change notification settings - Fork 241
/
docker-compose.yml
131 lines (124 loc) · 4.95 KB
/
docker-compose.yml
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
name: aztec-devnet
services:
pxe:
image: aztecprotocol/aztec${AZTEC_DOCKER_TAG:-@sha256:03feac60e91f1aabf678cecbcd13271dda229120ec6007f2c1bac718ff550c70}
# need to run bb for proofs and bb is only built for x86
platform: linux/amd64
environment:
LOG_LEVEL: ${LOG_LEVEL:-info}
DEBUG: ${DEBUG:-aztec:*,-json-rpc:*,-aztec:circuits:artifact_hash,-aztec:randomness_singleton}
DEBUG_COLORS: 1
L1_CHAIN_ID: 31337
VERSION: 1
PXE_PROVER_ENABLED: ${PXE_PROVER_ENABLED:-1}
PXE_DATA_DIRECTORY: /var/lib/aztec/pxe
NODE_NO_WARNINGS: 1
AZTEC_PORT: 8080
MNEMONIC: "test test test test test test test test test test test junk"
entrypoint: >
sh -c '
export AZTEC_NODE_URL=$$(cat /var/run/secrets/aztec-node-url);
while ! curl --head --silent $AZTEC_NODE_URL > /dev/null; do echo "Node $$AZTEC_NODE_URL not up. Retrying after 1s"; sleep 1; done;
node /usr/src/yarn-project/aztec/dest/bin/index.js start --pxe
'
secrets:
- aztec-node-url
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- aztec:/var/lib/aztec
ports:
- 8080:8080/tcp
profiles:
- pxe
node:
image: aztecprotocol/aztec${AZTEC_DOCKER_TAG:-@sha256:03feac60e91f1aabf678cecbcd13271dda229120ec6007f2c1bac718ff550c70}
# need to run bb for proofs and bb is only built for x86
platform: linux/amd64
environment:
LOG_LEVEL: ${LOG_LEVEL:-info}
DEBUG: ${DEBUG:-aztec:*,-json-rpc:*,-aztec:circuits:artifact_hash,-aztec:randomness_singleton,-aztec:avm_simulator:*}
DEBUG_COLORS: 1
L1_CHAIN_ID: 31337
VERSION: 1
NODE_NO_WARNINGS: 1
PROVER_REAL_PROOFS: ${PROVER_REAL_PROOFS:-1}
DATA_DIRECTORY: /var/lib/aztec
PROVER_AGENT_ENABLED: 0
ROLLUP_CONTRACT_ADDRESS: "0x4ef7ca89e724a75ccca5dde7fb98075a388c2c91"
REGISTRY_CONTRACT_ADDRESS: "0x589a9634c1d00c62e47b3b7a790c8dc986b3d40d"
INBOX_CONTRACT_ADDRESS: "0x12d9b5effc69bf5c0c29c8258c6b6fa95a08de74"
OUTBOX_CONTRACT_ADDRESS: "0x3ec4b6c68a8c2ce4c78cdd465b3019b11a568d1d"
FEE_JUICE_CONTRACT_ADDRESS: "0x73c43b919973711e096bfc04c9d4b3be511ffc0b"
FEE_JUICE_PORTAL_CONTRACT_ADDRESS: "0xdf25b0a34dbee9f25518f7a4d63bab8b3bb3e496"
ETHEREUM_HOST:
P2P_TCP_LISTEN_ADDR: "0.0.0.0:9000"
P2P_UDP_LISTEN_ADDR: "0.0.0.0:9001"
P2P_TCP_ANNOUNCE_ADDR: ":9000"
P2P_UDP_ANNOUNCE_ADDR: ":9001"
P2P_QUERY_FOR_IP: true
P2P_ENABLED: true
PEER_ID_PRIVATE_KEY:
AZTEC_PORT: 8999
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: ${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-http://otel-collector:4318/v1/metrics}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-http://otel-collector:4318/v1/traces}
secrets:
- ethereum-host
- p2p-boot-node
entrypoint: |
/bin/sh -c '
export ETHEREUM_HOST=$$(cat /var/run/secrets/ethereum-host)
export BOOTSTRAP_NODES=$$(cat /var/run/secrets/p2p-boot-node)
test -z "$$PEER_ID_PRIVATE_KEY" -a ! -f /var/lib/aztec/p2p-private-key && node /usr/src/yarn-project/cli/dest/bin/index.js generate-p2p-private-key | head -1 | cut -d" " -f 3 | tee /var/lib/aztec/p2p-private-key || echo "Re-using existing P2P private key"
test -z "$$PEER_ID_PRIVATE_KEY" && export PEER_ID_PRIVATE_KEY=$$(cat /var/lib/aztec/p2p-private-key)
# if the stack is started with --profile metrics --profile node, give the collector a chance to start before the node
i=0
max=3
while ! curl --head --silent $$OTEL_EXPORTER_OTLP_METRICS_ENDPOINT > /dev/null; do
echo "OpenTelemetry collector not up. Retrying after 1s";
sleep 1;
i=$$((i+1));
if [ $$i -eq $$max ]; then
echo "OpenTelemetry collector at $$OTEL_EXPORTER_METRICS_ENDPOINT not up after $${max}s. Running without metrics";
unset OTEL_EXPORTER_METRICS_ENDPOINT;
unset OTEL_EXPORTER_TRACES_ENDPOINT;
break
fi;
done;
node /usr/src/yarn-project/aztec/dest/bin/index.js start --node --archiver
'
volumes:
- aztec:/var/lib/aztec
profiles:
- node
ports:
# the RPC endpoint - expose it on a different port to avoid conflicting with PXE
- 8999:8999/tcp
- 9000:9000/tcp
- 9001:9001/udp
cli:
image: aztecprotocol/aztec${AZTEC_DOCKER_TAG:-@sha256:03feac60e91f1aabf678cecbcd13271dda229120ec6007f2c1bac718ff550c70}
# run the same image as pxe
platform: linux/amd64
environment:
PXE_URL: http://pxe:8080
NODE_NO_WARNINGS: 1
SECRET_KEY:
ETHEREUM_HOST:
profiles:
- cli
otel-lgtm:
profiles:
- metrics
image: grafana/otel-lgtm
ports:
- 4318:4318 # otel collector http
- 4317:4317 # otel grpc
- 3000:3000 # grafana
secrets:
aztec-node-url:
environment: AZTEC_NODE_URL
ethereum-host:
environment: ETHEREUM_HOST
p2p-boot-node:
environment: BOOTSTRAP_NODES