Skip to content

Commit e5a64d5

Browse files
author
Christos KK Loverdos
committed
Add universal configuration for a custom private testnet
1 parent 4388d98 commit e5a64d5

File tree

3 files changed

+85
-3
lines changed

3 files changed

+85
-3
lines changed

src/universal/conf/mantis.conf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ include "misc.conf"
1616
include "consensus.conf"
1717

1818
# Uncomment the following include to connect to the Ethereum Hard-Fork network.
19-
# Note that any settings in this file will override the ones defined in the files above
19+
# Note that any settings in this file will override the ones defined in the files above.
2020
# include "ethereumHF.conf"
2121

2222
# Uncomment the following include to connect to the testnet Morden.
23-
# Note that any settings in this file will override the ones defined in the files above
23+
# Note that any settings in this file will override the ones defined in the files above.
2424
# include "morden.conf"
2525

2626
# Uncomment the following include to connect to the testnet Ropsten.
27-
# Note that any settings in this file will override the ones defined in the files above
27+
# Note that any settings in this file will override the ones defined in the files above.
2828
# include "ropsten.conf"
29+
30+
# Uncomment the following include to connect to your custom private testnet.
31+
# Note that any settings in this file will override the ones defined in the files above.
32+
# include "private-testnet.conf"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extraData": "0x00",
3+
"nonce": "0x0000000000000042",
4+
"gasLimit": "0x2fefd8",
5+
"difficulty": "0x400",
6+
"ommersHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
7+
"timestamp": "0x00",
8+
"coinbase": "0x0000000000000000000000000000000000000000",
9+
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
10+
"alloc": {
11+
"d7a681378321f472adffb9fdded2712f677e0ba9": {
12+
"balance": "1606938044258990275541962092341162602522202993782792835301376"
13+
}
14+
}
15+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Sample configuration for a custom private testnet.
2+
mantis {
3+
sync {
4+
# Whether to enable fast-sync
5+
do-fast-sync = false
6+
}
7+
8+
blockchain {
9+
# DAO fork configuration (Ethereum HF/Classic split)
10+
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/
11+
dao = null
12+
13+
# Custom genesis JSON file
14+
# null value indicates using default genesis definition that matches the main network
15+
custom-genesis-file = "conf/private-genesis.json"
16+
}
17+
18+
network {
19+
discovery {
20+
# Listening interface for discovery protocol
21+
interface = ${mantis.network.server-address.interface}
22+
}
23+
24+
peer {
25+
# Ethereum network identifier:
26+
# 1 - mainnet, 2 - morden
27+
network-id = 2139
28+
}
29+
30+
rpc {
31+
# JSON-RPC mode
32+
# Available modes are: http, https
33+
# Choosing https requires creating a certificate and setting up 'certificate-keystore-path' and
34+
# 'certificate-password-file'
35+
# See: https://github.com/input-output-hk/mantis/wiki/Creating-self-signed-certificate-for-using-JSON-RPC-with-HTTPS
36+
mode = "http"
37+
38+
# Listening address of JSON-RPC HTTP/HTTPS endpoint
39+
interface = ${mantis.network.server-address.interface}
40+
41+
# Domains allowed to query RPC endpoint. Use "*" to enable requests from
42+
# any domain.
43+
cors-allowed-origins = []
44+
}
45+
46+
# This is the section dedicated to `atomix-raft` consensus.
47+
# This consensus protocol is selected by setting `mantis.consensus.protocol = atomix-raft`.
48+
atomix-raft {
49+
election-timeout = 30.seconds
50+
51+
# Represents this node.
52+
#
53+
# ID and PORT are not mandatory.
54+
# If PORT is not given, then is assumes the value of
55+
# io.atomix.messaging.impl.NettyMessagingService.DEFAULT_PORT, which currently is 5679.
56+
# If ID is not given, then its value becomes IP_PORT.
57+
local-node = ${mantis.network.server-address.interface}
58+
59+
# All the other nodes in the cluster, in the same format as with `local-node`.
60+
bootstrap-nodes = []
61+
}
62+
}
63+
}

0 commit comments

Comments
 (0)