forked from helium/miner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebar.config
298 lines (289 loc) · 12.7 KB
/
rebar.config
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
%% -*- erlang -*-
{erl_opts, [
debug_info,
{parse_transform, lager_transform},
{i, "./_build/default/plugins/gpb/include"}
]}.
{cover_export_enabled, true}.
{cover_enabled, true}.
{deps, [
{blockchain, {git, "https://github.com/helium/blockchain-core.git",
{branch, "master"}}},
{sibyl, {git, "https://github.com/helium/sibyl.git",
{branch, "master"}}},
{hbbft, {git, "https://github.com/helium/erlang-hbbft.git",
{branch, "master"}}},
{dkg, {git, "https://github.com/helium/erlang-dkg.git", {branch, "master"}}},
{ecc508, {git, "https://github.com/helium/ecc508.git", {branch, "master"}}},
{ebus, {git, "https://github.com/helium/ebus.git", {branch, "master"}}},
{jsx, {git, "https://github.com/talentdeficit/jsx.git", {branch, "v2.8.0"}}},
{kvc, {git, "https://github.com/etrepum/kvc", {tag, "v1.7.0"}}},
{longfi, {git, "https://github.com/helium/longfi-erlang", {tag, "0.2.0"}}},
recon,
{elli, "3.3.0"},
{jsonrpc2, {git, "https://github.com/zuiderkwast/jsonrpc2-erlang",
{branch, "master"}}}
]}.
{xref_checks, [
undefined_function_calls,
undefined_functions,
%locals_not_used,
deprecated_function_calls,
deprecated_functions
]}.
{plugins, [
{rebar3_gpb_plugin, "2.15.0"},
{rebar3_eqc, "1.3.0"}
]}.
{gpb_opts, [
{i, "src"},
{o_erl, "src/pb"},
{o_hrl, "src/pb"},
{msg_name_prefix, "miner_"},
{msg_name_suffix, "_pb"},
{module_name_suffix, "_pb"},
{strings_as_binaries, false},
type_specs
]}.
{provider_hooks, [
{pre, [
{compile, {protobuf, compile}},
{clean, {protobuf, clean}}
]}
]}.
{relx, [
{release, {'miner', git},
[miner, runtime_tools, tools, recon]},
{overlay,
[
{copy, "scripts/extensions/genesis", "bin/extensions/genesis"},
{copy, "scripts/extensions/hbbft", "bin/extensions/hbbft"},
{copy, "scripts/extensions/info", "bin/extensions/info"},
{copy, "scripts/extensions/dkg", "bin/extensions/dkg"},
{copy, "scripts/extensions/authorize", "bin/extensions/authorize"},
{copy, "scripts/extensions/print_keys", "bin/extensions/print_keys"},
{copy, "./_build/default/lib/blockchain/scripts/extensions/peer", "bin/extensions/peer"},
{copy, "./_build/default/lib/blockchain/scripts/extensions/snapshot", "bin/extensions/snapshot"},
{copy, "./_build/default/lib/blockchain/scripts/extensions/ledger", "bin/extensions/ledger"},
{copy, "./_build/default/lib/blockchain/scripts/extensions/trace", "bin/extensions/trace"},
{copy, "./_build/default/lib/blockchain/scripts/extensions/txn", "bin/extensions/txn"},
{copy, "./_build/default/lib/blockchain/scripts/extensions/repair", "bin/extensions/repair"},
{template, "config/vm.args", "{{output_dir}}/releases/{{release_version}}/vm.args"}
]},
{extended_start_script_hooks,
[
{post_start,
[
{wait_for_process, blockchain_worker}
]}
]},
{extended_start_script, true},
{extended_start_script_extensions,
[
{genesis, "extensions/genesis"},
{hbbft, "extensions/hbbft"},
{peer, "extensions/peer"},
{snapshot, "extensions/snapshot"},
{ledger, "extensions/ledger"},
{info, "extensions/info"},
{trace, "extensions/trace"},
{txn, "extensions/txn"},
{dkg, "extensions/dkg"},
{authorize, "extensions/authorize"},
{repair, "extensions/repair"},
{print_keys, "extensions/print_keys"}
]},
{dev_mode, true},
{include_erts, false}
]}.
{profiles, [
%% for test and run.sh
{testdev,
[
{relx, [
{sys_config, "./config/test.config"},
{overlay,
[{copy, "config/sys.config", "config/sys.config"}]},
{dev_mode, true},
{include_erts, false}]
}]},
%% for syncing local miners
{dev,
[
{relx, [
{release, {'miner', git},
[miner, observer, runtime_tools, tools,wx, recon]},
{sys_config, "./config/dev.config"},
{overlay,
[{copy, "config/sys.config", "config/sys.config"}]},
{dev_mode, true},
{include_erts, false}]
}]},
{aws, [
{relx, [
{sys_config, "./config/aws.config"},
{overlay,
[{copy, "config/sys.config", "config/sys.config"}]},
{dev_mode, true},
{include_erts, false}]}]
},
{seed, [
{relx, [
{sys_config, "./config/seed.config"},
{overlay,
[{copy, "config/sys.config", "config/sys.config"}]},
{dev_mode, true},
{include_erts, false}]}]
},
{docker, [
{relx, [
{release, {miner, git},
[miner,
tools,
runtime_tools,
recon]},
{sys_config, "./config/docker.config"},
{overlay,
[{copy, "config/sys.config", "config/sys.config"}]},
{dev_mode, false},
{include_src, false},
{system_libs, false},
{include_erts, false}]}]
},
{miner1, [{relx, [{release, {'miner1', git}, [miner, observer, runtime_tools, tools, wx, recon]},
{sys_config, "./config/test.config"},
{overlay,
[{template, "config/vm_dev.args",
"{{output_dir}}/releases/{{release_version}}/vm.args"}]}]}]},
{miner2, [{relx, [{release, {'miner2', git}, [miner, observer, runtime_tools, tools, wx, recon]},
{sys_config, "./config/test.config"},
{overlay,
[{template, "config/vm_dev.args",
"{{output_dir}}/releases/{{release_version}}/vm.args"}]}]}]},
{miner3, [{relx, [{release, {'miner3', git}, [miner, observer, runtime_tools, tools, wx, recon]},
{sys_config, "./config/test.config"},
{overlay,
[{template, "config/vm_dev.args",
"{{output_dir}}/releases/{{release_version}}/vm.args"}]}]}]},
{miner4, [{relx, [{release, {'miner4', git}, [miner, observer, runtime_tools, tools, wx, recon]},
{sys_config, "./config/test.config"},
{overlay,
[{template, "config/vm_dev.args",
"{{output_dir}}/releases/{{release_version}}/vm.args"}]}]}]},
{miner5, [{relx, [{release, {'miner5', git}, [miner, observer, runtime_tools, tools, wx, recon]},
{sys_config, "./config/test.config"},
{overlay,
[{template, "config/vm_dev.args",
"{{output_dir}}/releases/{{release_version}}/vm.args"}]}]}]},
{miner6, [{relx, [{release, {'miner6', git}, [miner, observer, runtime_tools, tools, wx, recon]},
{sys_config, "./config/test.config"},
{overlay,
[{template, "config/vm_dev.args",
"{{output_dir}}/releases/{{release_version}}/vm.args"}]}]}]},
{miner7, [{relx, [{release, {'miner7', git}, [miner, observer, runtime_tools, tools, wx, recon]},
{sys_config, "./config/test.config"},
{overlay,
[{template, "config/vm_dev.args",
"{{output_dir}}/releases/{{release_version}}/vm.args"}]}]}]},
{miner8, [{relx, [{release, {'miner8', git}, [miner, observer, runtime_tools, tools, wx, recon]},
{sys_config, "./config/test.config"},
{overlay,
[{template, "config/vm_dev.args",
"{{output_dir}}/releases/{{release_version}}/vm.args"}]}]}]},
{prod, [
{relx, [
{release, {miner, git},
[miner,
tools,
runtime_tools,
recon]},
{sys_config, "./config/sys.config"},
{dev_mode, false},
{include_src, false},
{system_libs, false},
{include_erts, false}]}]
},
{validator,
[
{relx,
[
{release, {miner, {semver, "validator"}},
[miner,
tools,
runtime_tools,
recon]},
{sys_config_src, "config/val.config.src"},
%% {vm_args_src, "config/vm_val.args.src"},
{overlay,
[{copy, "config/sys.config", "config/sys.config"},
{template, "config/vm_val.args", "{{output_dir}}/releases/{{release_version}}/vm.args"}]},
{dev_mode, false},
{include_erts, true},
{extended_start_script, true},
{include_src, false}]}]
},
{test_validator,
[
{relx,
[
{release, {miner, git},
[miner,
tools,
runtime_tools,
recon]},
{sys_config_src, "config/test_val.config.src"},
%% {vm_args_src, "config/vm_val.args.src"},
{overlay,
[{copy, "config/sys.config", "config/sys.config"},
{template, "config/vm_val.args", "{{output_dir}}/releases/{{release_version}}/vm.args"}]},
{dev_mode, false},
{include_erts, true},
{extended_start_script, true},
{include_src, false}]}]
},
{docker_val, [
{relx, [
{release, {miner, {semver, "validator"}},
[miner,
tools,
runtime_tools,
recon]},
{sys_config_src, "./config/docker-val.config.src"},
%% {vm_args_src, "config/vm_val.args.src"},
{overlay,
[{copy, "config/sys.config", "config/sys.config"},
{template, "config/vm_val.args", "{{output_dir}}/releases/{{release_version}}/vm.args"}]},
{dev_mode, false},
{include_src, false},
{system_libs, false},
{include_erts, false}]}]
},
{docker_testval, [
{relx, [
{release, {miner, {semver, "val"}},
[miner,
tools,
runtime_tools,
recon]},
{sys_config_src, "./config/docker-testval.config.src"},
%% {vm_args_src, "config/vm_val.args.src"},
{overlay,
[{copy, "config/sys.config", "config/sys.config"},
{template, "config/vm_val.args", "{{output_dir}}/releases/{{release_version}}/vm.args"}]},
{dev_mode, false},
{include_src, false},
{system_libs, false},
{include_erts, false}]}]
},
{test,
[
{overrides, [{add, blockchain, [{erl_opts, [{d, 'TEST'}]}]}]},
{erl_opts, [nowarn_export_all]},
{deps, [
{meck, "0.8.12"},
{grpc_client, {git, "https://github.com/Bluehouse-Technology/grpc_client.git", {branch, "master"}}}
]}
]}
]}.
{ct_opts,
[{sys_config, "config/test.config"}]}.