Skip to content

Commit 8b03317

Browse files
author
Nicolas Tallar
committed
[ETCM-121] Refactor configs
1 parent 4684082 commit 8b03317

34 files changed

+83
-400
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Universal / mappings += (resourceDirectory in Compile).value / "logback.xml" ->
126126

127127
val sep = java.io.File.separator
128128
jdkPackagerJVMArgs := Seq(
129-
"-Dconfig.file=." + sep + "conf" + sep + "mantis.conf",
129+
"-Dconfig.file=." + sep + "conf" + sep + "app.conf",
130130
"-Dlogback.configurationFile=." + sep + "conf" + sep + "logback.xml",
131131
"-Xss10M"
132132
)

src/main/resources/application.conf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,17 @@ mantis {
255255
blockchains {
256256
network = "etc"
257257

258-
etc { include "chains/etc.conf" }
258+
etc { include "chains/etc-chain.conf"}
259259

260-
eth { include "chains/eth.conf" }
260+
eth { include "chains/eth-chain.conf"}
261261

262-
mordor { include "chains/mordor.conf"}
262+
mordor { include "chains/mordor-chain.conf"}
263263

264-
ropsten { include "chains/ropsten.conf" }
264+
ropsten { include "chains/ropsten-chain.conf"}
265265

266-
test { include "chains/test.conf" }
266+
test { include "chains/test-chain.conf"}
267267

268-
private { include "chains/private.conf" }
268+
testnet-internal { include "chains/testnet-internal-chain.conf"}
269269
}
270270

271271
sync {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ include "base-chain.conf"}

src/main/resources/chains/etc.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/main/resources/chains/eth.conf renamed to src/main/resources/chains/eth-chain.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
include "etc.conf"
2+
include "base-chain.conf"
33

44
eip150-block-number = "2463000"
55
eip155-block-number = "2675000"

src/main/resources/chains/mordor.conf renamed to src/main/resources/chains/mordor-chain.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191
# Custom genesis JSON file path
9292
# null value indicates using default genesis definition that matches the main network
93-
custom-genesis-file = "chains/mordor.json"
93+
custom-genesis-file = "chains/mordor-genesis.json"
9494

9595
# Monetary policy parameters
9696
# Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md

src/main/resources/chains/ropsten.conf renamed to src/main/resources/chains/ropsten-chain.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
include "base.conf"
2+
include "base-chain.conf"
33

44
frontier-block-number = "0"
55
homestead-block-number = "0"
@@ -48,7 +48,7 @@
4848

4949
network-id = 3
5050

51-
custom-genesis-file = "chains/ropsten.json"
51+
custom-genesis-file = "chains/ropsten-genesis.json"
5252

5353
bootstrap-nodes = [
5454
"enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
include "base.conf"
2+
include "base-chain.conf"
33
eip160-block-number = "0"
44
bootstrap-nodes = []
55
}

src/main/resources/chains/private.conf renamed to src/main/resources/chains/testnet-internal-chain.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
include "base.conf"
2+
include "base-chain.conf"
33
frontier-block-number = "0"
44
homestead-block-number = "0"
55
eip150-block-number = "0"
@@ -14,7 +14,7 @@
1414

1515
chain-id = "0x2A"
1616
network-id = 42
17-
custom-genesis-file = "chains/private.json"
17+
custom-genesis-file = "chains/testnet-internal-genesis.json"
1818
dao = null
1919
bootstrap-nodes = []
2020
}

src/rpcTest/resources/privateNetConfig/conf/rpc-test-private.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include "mantis.conf"
1+
include "app.conf"
22

33
mantis {
44

src/universal/bin/mantis-etc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
./bin/mantis -Dmantis.blockchains.network=etc "$@"
3+
./bin/mantis -Dconfig.file=./conf/etc.conf "$@"

src/universal/bin/mantis-eth

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
./bin/mantis -Dmantis.blockchains.network=eth -Dmantis.pruning.mode=inmemory -Dmantis.pruning.history=64 "$@"
3+
./bin/mantis -Dconfig.file=./conf/eth.conf "$@"

src/universal/bin/mantis-mordor

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
./bin/mantis -Dconfig.file=./conf/mordor.conf "$@"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
./bin/mantis -Dconfig.file=./conf/testnet-internal.conf "$@"

src/universal/conf/app.conf

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This is the base configuration file for the Mantis ETC client.
2+
3+
# This where all the default settings are defined (this file is packaged within the executable).
4+
# It should always go at the top.
5+
include "application.conf"
6+
7+
# Enable HTTPS
8+
mantis {
9+
network {
10+
rpc {
11+
http {
12+
mode = "https"
13+
14+
certificate-keystore-path = "conf/mantis.jks"
15+
16+
certificate-keystore-type = "jks"
17+
18+
certificate-password-file = "conf/nopassword"
19+
20+
}
21+
}
22+
}
23+
}

src/universal/conf/application.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-Dconfig.file=./conf/mantis.conf -Dlogback.configurationFile=./conf/logback.xml -J-Xmx4g -J-Xss10M
1+
-Dconfig.file=./conf/app.conf -Dlogback.configurationFile=./conf/logback.xml -J-Xmx4g -J-Xss10M

src/universal/conf/blockchains.conf

Lines changed: 0 additions & 115 deletions
This file was deleted.

src/universal/conf/consensus.conf

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/universal/conf/etc.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include "app.conf"
2+
3+
mantis {
4+
blockchains {
5+
network = "etc"
6+
}
7+
}

src/universal/conf/eth.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
include "app.conf"
2+
3+
mantis {
4+
blockchains {
5+
network = "eth"
6+
}
7+
8+
9+
pruning {
10+
mode = "inmemory"
11+
12+
history = 64
13+
}
14+
}

src/universal/conf/logging.conf

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/universal/conf/mantis.conf

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/universal/conf/metrics.conf

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/universal/conf/misc.conf

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/universal/conf/mordor.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include "app.conf"
2+
3+
mantis {
4+
blockchains {
5+
network = "mordor"
6+
}
7+
}

0 commit comments

Comments
 (0)