-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
217 lines (208 loc) · 6.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
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
207
208
209
210
211
212
213
214
215
216
217
version: '3.9'
services:
searcher:
image: sting-searcher
build:
context: ./
dockerfile: searcher.Dockerfile
args:
SGX: "${SGX-1}"
DEBUG: "${DEBUG-1}"
RA_TYPE: "${RA_TYPE-dcap}"
RA_CLIENT_SPID: $RA_CLIENT_SPID
RA_CLIENT_LINKABLE: $RA_CLIENT_LINKABLE
GRAMINE_IMG_TAG: $GRAMINE_IMG_TAG
depends_on:
aesmd:
condition: service_started
# builder:
# condition: service_healthy
extends:
file: sgx-driver.yml
service: ${SGX_DRIVER}-enclave-devices
environment:
SEPOLIA: "0"
LOCALNET: "1"
STINGER_PK: "0x0763770ef43a3bb2314d0be24c98da346f695d96e6632646915f94ab7aafd04a"
POF_KEYS: $POF_KEYS
TLS: 1
SGX: "${SGX-1}"
DEBUG: "${DEBUG-1}"
RA_TLS_EPID_API_KEY: $RA_TLS_EPID_API_KEY
RA_CLIENT_SPID: $RA_CLIENT_SPID
RA_CLIENT_LINKABLE: $RA_CLIENT_LINKABLE
# all of should be for builder's configuration
RA_TYPE: "${RA_TYPE-dcap}"
RA_TLS_ALLOW_DEBUG_ENCLAVE_INSECURE: 1
RA_TLS_ALLOW_OUTDATED_TCB_INSECURE: 1
RA_TLS_MRSIGNER: any
RA_TLS_ISV_SVN: any
RA_TLS_ISV_PROD_ID: any
volumes:
- aesmd-socket:/var/run/aesmd
- ./chain/solidity/:/Sting-Flashbots/searcher/solidity/
- ./searcher/src/enclave:/Sting-Flashbots/searcher/src/enclave
- ./searcher/src/setup_bounty.py:/Sting-Flashbots/searcher/src/setup_bounty.py
- ./searcher/src/run.sh:/Sting-Flashbots/searcher/src/run.sh
- shared:/shared
- cert:/cert/
working_dir: /Sting-Flashbots/searcher/src
command: ./run.sh
builder:
# image: ghcr.io/initc3/geth-sgx-builder:481f1c3c2
image: geth-sgx-builder:local
build:
context: ./
dockerfile: builder.Dockerfile
args:
ENCLAVE_SIZE: "${ENCLAVE_SIZE-4G}"
SEPOLIA: "0"
LOCALNET: "1"
RA_CLIENT_SPID: $RA_CLIENT_SPID
RA_CLIENT_LINKABLE: $RA_CLIENT_LINKABLE
SGX: "${SGX-1}"
RA_TYPE: "${RA_TYPE-dcap}"
GETH_COMMIT: 481f1c3c23b51aa39822b3ba40cfafc653a451b8
GRAMINE_IMG_TAG: $GRAMINE_IMG_TAG
ports:
- 28545:28545
- 8551:8551
- 8545:8545
depends_on:
aesmd:
condition: service_started
geth-genesis:
condition: service_completed_successfully
# NOTE set SGX_DRIVER in your .env file to "oot" or "inkernel"
# see README for more details
extends:
file: sgx-driver.yml
service: ${SGX_DRIVER}-enclave-devices
environment:
SUBV_DIR: "/shared/"
SUBV_ADDRESS: "0x4588765017b315E1d190f46B8f1911F49D918bc4"
RA_CLIENT_SPID: $RA_CLIENT_SPID
RA_CLIENT_LINKABLE: $RA_CLIENT_LINKABLE
RA_TLS_EPID_API_KEY: $RA_TLS_EPID_API_KEY
SGX: "${SGX-1}"
DEBUG: "${DEBUG-1}"
RELAY_SECRET_KEY: "0x2e0834786285daccd064ca17f1654f67b4aef298acbb82cef9ec422fb4975622"
BUILDER_SECRET_KEY: "0x2e0834786285daccd064ca17f1654f67b4aef298acbb82cef9ec422fb4975622"
BUILDER_TX_SIGNING_KEY: "0x2e0834786285daccd064ca17f1654f67b4aef298acbb82cef9ec422fb4975622"
volumes:
- aesmd-socket:/var/run/aesmd
- ./chain/execution/keystore/:/etc/keystore
- ./chain/execution/geth_password.txt:/etc/geth_password.txt
- ./chain/execution/jwtsecret:/etc/jwt.hex
# - ./chain/execution/genesis-out/:/etc/genesis/
- genesis:/etc/genesis/
- shared:/shared
- data:/data
- cert:/cert
# - ./chain/consensus/data:/data
aesmd:
image: ghcr.io/initc3/sgx-aesm:2.19-buster-81eb0d3
volumes:
- aesmd-socket:/var/run/aesmd
# NOTE set SGX_DRIVER in your .env file to "oot" or "inkernel"
# see README for more details
extends:
file: sgx-driver.yml
service: ${SGX_DRIVER}-aesmd-devices
#configration based on https://github.com/avalonche/eth-pos-devnet/blob/master/docker-compose.yml
geth-genesis:
image: "ethereum/client-go:v1.11.6"
command: --datadir=/data init /genesis/genesis.json
depends_on:
create-beacon-chain-genesis:
condition: service_completed_successfully
volumes:
# - ./chain/execution/genesis-out/:/genesis/
- genesis:/genesis
- data:/data
create-beacon-chain-genesis:
image: "gcr.io/prysmaticlabs/prysm/cmd/prysmctl:HEAD-5b8084"
command:
- testnet
- generate-genesis
- --fork=bellatrix
- --num-validators=64
- --output-ssz=/genesis/genesis.ssz
- --chain-config-file=/consensus/config.yml
- --geth-genesis-json-in=/execution/genesis.json
- --geth-genesis-json-out=/genesis/genesis.json
volumes:
- ./chain/consensus/config.yml:/consensus/config.yml
- ./chain/execution/genesis.json:/execution/genesis.json
# - ./chain/execution/:/execution/
- genesis:/genesis/
# - ./chain/execution/genesis-out/:/genesis/
beacon-chain:
image: ghcr.io/initc3/flashbots-prysm:cecd2d9cb
# image: flashbots-prysm:local
# build:
# context: ./
# dockerfile: beacon.Dockerfile
# args:
# COMMIT: cecd2d9cbb9bd32187dcdc8167fe72b77d48eebe
command:
- --datadir=/beacondata
# No peers to sync with in this testnet, so setting to 0
- --min-sync-peers=0
- --genesis-state=/genesis/genesis.ssz
- --interop-eth1data-votes
- --bootstrap-node=
# The chain configuration file used for setting up Prysm
- --chain-config-file=/consensus/config.yml
# We specify the chain id used by our execution client
- --chain-id=32382
- --rpc-host=0.0.0.0
- --grpc-gateway-host=0.0.0.0
- --execution-endpoint=http://builder:8551
- --accept-terms-of-use
- --jwt-secret=/execution/jwtsecret
- --suggested-fee-recipient=0x123463a4b065722e99115d6c222f267d9cabb524
- --http-mev-relay=http://builder:28545
depends_on:
builder:
condition: service_started
create-beacon-chain-genesis:
condition: service_completed_successfully
ports:
- 4000:4000
- 3500:3500
- 8080:8080
volumes:
- ./chain/consensus/config.yml:/consensus/config.yml
- ./chain/execution/jwtsecret:/execution/jwtsecret
# - ./chain/execution/genesis-out/:/execution/
- genesis:/genesis/
# - ./chain/consensus/beacondata:/beacondata
validator:
image: "gcr.io/prysmaticlabs/prysm/validator:HEAD-e4e8a0"
command:
- --beacon-rpc-provider=beacon-chain:4000
- --datadir=/validatordata
- --accept-terms-of-use
- --interop-num-validators=64
- --interop-start-index=0
- --chain-config-file=/consensus/config.yml
- --suggested-fee-recipient=0x123463a4b065722e99115d6c222f267d9cabb524
- --enable-builder
depends_on:
beacon-chain:
condition: service_started
volumes:
- ./chain/consensus/config.yml:/consensus/config.yml
# - ./chain/consensus/validatordata:/validatordata
volumes:
aesmd-socket:
driver: local
driver_opts:
type: "tmpfs"
device: "tmpfs"
o: "rw"
genesis:
data:
shared:
cert: