-
Notifications
You must be signed in to change notification settings - Fork 6
/
devnet.yml
208 lines (197 loc) · 6.33 KB
/
devnet.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
version: '3.8'
networks:
hbswap:
volumes:
mpc-bytecodes:
mpc-schedules:
public-keys:
secrets-p0:
secrets-p1:
secrets-p2:
secrets-p3:
inputmaskshares-p0:
inputmaskshares-p1:
inputmaskshares-p2:
inputmaskshares-p3:
ppdata-p0:
ppdata-p1:
ppdata-p2:
ppdata-p3:
persistence-p0:
persistence-p1:
persistence-p2:
persistence-p3:
db-p0:
db-p1:
db-p2:
db-p3:
services:
# TODO rename to eth.node
eth.chain:
image: ethereum/client-go:latest
environment:
POADIR: /opt/poa
DATADIR: /opt/poa/data
KEYSTORE: /opt/poa/keystore/server_0
networks:
- hbswap
volumes:
- ./scripts/chain-latest.sh:/usr/src/chain-latest.sh
- ./poa:/opt/poa
working_dir: /usr/src/
entrypoint: ""
command: sh chain-latest.sh
deploy.contract:
image: hbswap-go-z
build:
context: .
dockerfile: contract.Dockerfile
target: deploy
environment:
POADIR: /opt/poa
POA_KEYSTORE: /opt/poa/keystore
networks:
- hbswap
working_dir: /go/src/github.com/initc3/MP-SPDZ/Scripts/hbswap/go
volumes:
- ./poa:/opt/poa
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/MP-SPDZ/Scripts/hbswap
entrypoint: ""
command: ["wait-for-it", "eth.chain:8545", "--", "go", "run", "deploy/deploy.go", "eth.chain"]
mpc.trusted.setup:
image: hbswap-setup-z
build:
context: .
dockerfile: setup.Dockerfile
networks:
- hbswap
volumes:
- ./MP-SPDZ/Scripts/setup-ssl.sh:/usr/src/setup-ssl.sh
- ./scripts/generate-keys.sh:/usr/src/generate-keys.sh
- public-keys:/usr/src/Player-Data
- secrets-p0:/usr/src/Secrets-P0
- secrets-p1:/usr/src/Secrets-P1
- secrets-p2:/usr/src/Secrets-P2
- secrets-p3:/usr/src/Secrets-P3
#command: ["bash", "setup-ssl.sh", "4"]
working_dir: /usr/src
command: ["bash", "generate-keys.sh", "setup-ssl.sh", "4"]
# compile MPC programs (hbswap_init, hbswap_trade_prep, hbswap_trade)
# see scripts/compile.sh for details
mpc.compile:
image: python:3.8
networks:
- hbswap
volumes:
- ./MP-SPDZ/compile.py:/usr/src/compile.py
- ./MP-SPDZ/Compiler:/usr/src/Compiler
- ./src/mpc:/usr/src/Programs/Source
- ./scripts/compile.sh:/usr/src/compile.sh
- mpc-bytecodes:/usr/src/Programs/Bytecode
- mpc-schedules:/usr/src/Programs/Schedules
working_dir: /usr/src
command: ["bash", "compile.sh"]
mpc.node.0:
image: hbswap-mpc-z
build:
context: .
dockerfile: hbswap.Dockerfile
target: hbswap
environment:
POADIR: /opt/poa
POA_KEYSTORE: /opt/poa/keystore
networks:
- hbswap
volumes:
- mpc-bytecodes:/usr/src/MP-SPDZ/Programs/Bytecode
- mpc-schedules:/usr/src/MP-SPDZ/Programs/Schedules
- ./conf/server.toml:/opt/hbswap/conf/server.toml
- ./scripts/mpc-node.sh:/usr/src/MP-SPDZ/mpc-node.sh
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/MP-SPDZ/Scripts/hbswap
- public-keys:/opt/hbswap/public-keys:ro
- secrets-p0:/opt/hbswap/secrets
- ./poa:/opt/poa
#- inputmaskshares-p0:/opt/hbswap/inputmask-shares
#- ppdata-p0:/opt/hbswap/preprocessing-data
#- persistence-p0:/usr/src/MP-SPDZ/Persistence
working_dir: /usr/src/MP-SPDZ
# NOTE IMPORTANT!
# The hostname (2nd arg) must be the one of player 0, i.e. "mpc.node.0"
command: ["wait-for-it", "eth.chain:8545", "--", "bash", "mpc-node.sh", "0", "eth.chain", "mpc.node.0"]
mpc.node.1:
image: hbswap-mpc-z
build:
context: .
dockerfile: hbswap.Dockerfile
target: hbswap
environment:
POADIR: /opt/poa
POA_KEYSTORE: /opt/poa/keystore
networks:
- hbswap
volumes:
- mpc-bytecodes:/usr/src/MP-SPDZ/Programs/Bytecode
- mpc-schedules:/usr/src/MP-SPDZ/Programs/Schedules
- ./conf/server.toml:/opt/hbswap/conf/server.toml
- ./scripts/mpc-node.sh:/usr/src/MP-SPDZ/mpc-node.sh
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/MP-SPDZ/Scripts/hbswap
- public-keys:/opt/hbswap/public-keys:ro
- secrets-p1:/opt/hbswap/secrets
- ./poa:/opt/poa
working_dir: /usr/src/MP-SPDZ
# NOTE IMPORTANT!
# The hostname (2nd arg) must be the one of player 0, i.e. "mpc.node.0"
command: ["wait-for-it", "eth.chain:8545", "--", "bash", "mpc-node.sh", "1", "eth.chain", "mpc.node.0"]
mpc.node.2:
image: hbswap-mpc-z
build:
context: .
dockerfile: hbswap.Dockerfile
target: hbswap
environment:
POADIR: /opt/poa
POA_KEYSTORE: /opt/poa/keystore
networks:
- hbswap
volumes:
- mpc-bytecodes:/usr/src/MP-SPDZ/Programs/Bytecode
- mpc-schedules:/usr/src/MP-SPDZ/Programs/Schedules
- ./conf/server.toml:/opt/hbswap/conf/server.toml
- ./scripts/mpc-node.sh:/usr/src/MP-SPDZ/mpc-node.sh
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/MP-SPDZ/Scripts/hbswap
- public-keys:/opt/hbswap/public-keys:ro
- secrets-p2:/opt/hbswap/secrets
- ./poa:/opt/poa
working_dir: /usr/src/MP-SPDZ
# NOTE IMPORTANT!
# The hostname (2nd arg) must be the one of player 0, i.e. "mpc.node.0"
command: ["wait-for-it", "eth.chain:8545", "--", "bash", "mpc-node.sh", "2", "eth.chain", "mpc.node.0"]
mpc.node.3:
image: hbswap-mpc-z
build:
context: .
dockerfile: hbswap.Dockerfile
target: hbswap
environment:
POADIR: /opt/poa
POA_KEYSTORE: /opt/poa/keystore
networks:
- hbswap
volumes:
- mpc-bytecodes:/usr/src/MP-SPDZ/Programs/Bytecode
- mpc-schedules:/usr/src/MP-SPDZ/Programs/Schedules
- ./conf/server.toml:/opt/hbswap/conf/server.toml
- ./scripts/mpc-node.sh:/usr/src/MP-SPDZ/mpc-node.sh
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/MP-SPDZ/Scripts/hbswap
- public-keys:/opt/hbswap/public-keys:ro
- secrets-p3:/opt/hbswap/secrets
- ./poa:/opt/poa
working_dir: /usr/src/MP-SPDZ
# NOTE IMPORTANT!
# The hostname (2nd arg) must be the one of player 0, i.e. "mpc.node.0"
command: ["wait-for-it", "eth.chain:8545", "--", "bash", "mpc-node.sh", "3", "eth.chain", "mpc.node.0"]