-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlocal-network.yml
202 lines (191 loc) · 5.46 KB
/
local-network.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
version: '3.8'
networks:
hbswap:
volumes:
mpc-bytecodes:
mpc-schedules:
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:
ethnode:
image: ethereum/client-go:latest
environment:
POADIR: /opt/poa
DATADIR: /opt/poa/data
KEYSTORE: /opt/poa/keystore/server_0
networks:
- hbswap
ports:
- "8545:8545"
- "8546:8546"
volumes:
- ./scripts/chain-latest.sh:/usr/src/chain-latest.sh
- ./poa:/opt/poa
working_dir: /usr/src/
entrypoint: ""
command: sh chain-latest.sh
deploycontract:
image: hbswap-go
build:
context: .
dockerfile: Dockerfile
target: go-deps
environment:
#POADIR: /opt/poa
POA_KEYSTORE: /opt/poa/keystore
networks:
- hbswap
working_dir: /go/src/github.com/initc3/HoneyBadgerSwap/src/go
volumes:
- ./poa/keystore:/opt/poa/keystore
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/HoneyBadgerSwap/src
entrypoint: ""
command: ["wait-for-it", "ethnode:8545", "--", "go", "run", "deploy/deploy.go", "ethnode"]
# compile MPC programs (hbswap_init, hbswap_trade_prep, hbswap_trade)
# see scripts/compile.sh for details
mpc.compile:
#image: sbellem/mpspdz:compiler
image: mpcbytecodes:local
build:
context: .
dockerfile: docker/mpspdzbuilds.Dockerfile
target: compiler
networks:
- hbswap
volumes:
- ./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"]
mpcnode0:
#image: hbswap
image: hbswap:local
build:
context: .
dockerfile: Dockerfile
environment:
NODE_ID: 0
POA_KEYSTORE: /opt/poa/keystore
ports:
- 58080:8080
networks:
- hbswap
volumes:
- mpc-bytecodes:/usr/src/hbswap/Programs/Bytecode
- mpc-schedules:/usr/src/hbswap/Programs/Schedules
- ./conf/server.toml:/opt/hbswap/conf/server.toml
- ./scripts/mpc-node.sh:/usr/src/hbswap/mpc-node.sh
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/HoneyBadgerSwap/src
- ./src/python:/usr/src/honeybadgerswap-python
- ./poa/keystore:/opt/poa/keystore
#- inputmaskshares-p0:/opt/hbswap/inputmask-shares
#- ppdata-p0:/opt/hbswap/preprocessing-data
#- persistence-p0:/usr/src/hbswap/Persistence
secrets:
- P0.key
working_dir: /usr/src/hbswap
command: ["wait-for-it", "ethnode:8545", "--", "bash", "mpc-node.sh"]
mpcnode1:
image: hbswap:local
build:
context: .
dockerfile: Dockerfile
environment:
NODE_ID: 1
POA_KEYSTORE: /opt/poa/keystore
ports:
- 58081:8080
networks:
- hbswap
volumes:
- mpc-bytecodes:/usr/src/hbswap/Programs/Bytecode
- mpc-schedules:/usr/src/hbswap/Programs/Schedules
- ./conf/server.toml:/opt/hbswap/conf/server.toml
- ./scripts/mpc-node.sh:/usr/src/hbswap/mpc-node.sh
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/HoneyBadgerSwap/src
- ./src/python:/usr/src/honeybadgerswap-python
- ./poa/keystore:/opt/poa/keystore
secrets:
- P1.key
working_dir: /usr/src/hbswap
command: ["wait-for-it", "ethnode:8545", "--", "bash", "mpc-node.sh"]
mpcnode2:
#image: hbswap
image: hbswap:local
build:
context: .
dockerfile: Dockerfile
environment:
NODE_ID: 2
POA_KEYSTORE: /opt/poa/keystore
ports:
- 58082:8080
networks:
- hbswap
volumes:
- mpc-bytecodes:/usr/src/hbswap/Programs/Bytecode
- mpc-schedules:/usr/src/hbswap/Programs/Schedules
- ./conf/server.toml:/opt/hbswap/conf/server.toml
- ./scripts/mpc-node.sh:/usr/src/hbswap/mpc-node.sh
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/HoneyBadgerSwap/src
- ./src/python:/usr/src/honeybadgerswap-python
- ./poa/keystore:/opt/poa/keystore
secrets:
- P2.key
working_dir: /usr/src/hbswap
command: ["wait-for-it", "ethnode:8545", "--", "bash", "mpc-node.sh"]
mpcnode3:
#image: hbswap
image: hbswap:local
build:
context: .
dockerfile: Dockerfile
environment:
NODE_ID: 3
POA_KEYSTORE: /opt/poa/keystore
ports:
- 58083:8080
networks:
- hbswap
volumes:
- mpc-bytecodes:/usr/src/hbswap/Programs/Bytecode
- mpc-schedules:/usr/src/hbswap/Programs/Schedules
- ./conf/server.toml:/opt/hbswap/conf/server.toml
- ./scripts/mpc-node.sh:/usr/src/hbswap/mpc-node.sh
- ./scripts/wait-for-it.sh:/usr/local/bin/wait-for-it
- ./src:/go/src/github.com/initc3/HoneyBadgerSwap/src
- ./src/python:/usr/src/honeybadgerswap-python
- ./poa/keystore:/opt/poa/keystore
secrets:
- P3.key
working_dir: /usr/src/hbswap
command: ["wait-for-it", "ethnode:8545", "--", "bash", "mpc-node.sh"]
secrets:
P0.key:
file: testkeys/secret/P0.key
P1.key:
file: testkeys/secret/P1.key
P2.key:
file: testkeys/secret/P2.key
P3.key:
file: testkeys/secret/P3.key