Skip to content

Commit 7329ff7

Browse files
author
Nicolas Tallar
committed
[ETCM-121] Refactor configs
1 parent 68dfe36 commit 7329ff7

33 files changed

+72
-401
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 + "base-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 "etc-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 "base-app.conf"
22

33
mantis {
44

src/universal/bin/eckeygen

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44
cd $DIR/..
5-
./bin/mantis -- eckeygen "$@"
5+
./bin/mantis-core -- eckeygen "$@"

src/universal/bin/faucet-server

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44
cd $DIR/..
5-
./bin/mantis -Dconfig.file=./conf/faucet.conf -- faucet "$@"
5+
./bin/mantis-core -Dconfig.file=./conf/faucet.conf -- faucet "$@"

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-core -Dconfig.file=./conf/base-app.conf -Dmantis.blockchains.network=etc "$@"

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-core -Dconfig.file=./conf/base-app.conf -Dmantis.blockchains.network=eth -Dmantis.pruning.mode=inmemory -Dmantis.pruning.history=64 "$@"

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-core -Dconfig.file=./conf/base-app.conf -Dmantis.blockchains.network=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-core -Dconfig.file=./conf/testnet-internal-app.conf "$@"

src/universal/bin/mantis-vm

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 vm-server "$@"
3+
./bin/mantis-core vm-server "$@"

src/universal/conf/base-app.conf

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This is the main configuration file for the Mantis ETC client.
2+
# It consist of series of include where actual settings are defined.
3+
4+
5+
# This where all the default settings are defined (this file is packaged within the executable).
6+
# It should always go at the top.
7+
include "application.conf"
8+
9+
mantis {
10+
11+
network {
12+
13+
rpc {
14+
http {
15+
# JSON-RPC mode
16+
# Available modes are: http, https
17+
# Choosing https requires creating a certificate and setting up 'certificate-keystore-path' and
18+
# 'certificate-password-file'
19+
# See: https://github.com/input-output-hk/mantis/wiki/Creating-self-signed-certificate-for-using-JSON-RPC-with-HTTPS
20+
mode = "https"
21+
22+
# Path to the keystore storing the certificates (used only for https)
23+
# null value indicates HTTPS is not being used
24+
certificate-keystore-path = "conf/mantis.jks"
25+
26+
# Type of certificate keystore being used
27+
# Has to be null or one of the ones listed in:
28+
# https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#KeyStore
29+
# A null value indicates HTTPS is not being used
30+
certificate-keystore-type = "jks"
31+
32+
# File with the password used for accessing the certificate keystore (used only for https)
33+
# null value indicates HTTPS is not being used
34+
certificate-password-file = "conf/nopassword"
35+
36+
}
37+
}
38+
}
39+
}

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/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.

0 commit comments

Comments
 (0)