|
| 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 | + # Duration for blacklisting a peer. Blacklisting reason include: invalid response from peer, response time-out, etc. |
| 8 | + # 0 value is a valid duration and it will disable blacklisting completely (which can be useful when all nodes are |
| 9 | + # are controlled by a single party, eg. private networks) |
| 10 | + blacklist-duration = 0 |
| 11 | + |
| 12 | + # Set to false to disable broadcasting the NewBlockHashes message, as its usefulness is debatable, |
| 13 | + # especially in the context of private networks |
| 14 | + broadcast-new-block-hashes = false |
| 15 | + } |
| 16 | + |
| 17 | + blockchain { |
| 18 | + # DAO fork configuration (Ethereum HF/Classic split) |
| 19 | + # https://blog.ethereum.org/2016/07/20/hard-fork-completed/ |
| 20 | + dao = null |
| 21 | + |
| 22 | + # Custom genesis JSON file |
| 23 | + # null value indicates using default genesis definition that matches the main network |
| 24 | + custom-genesis-file = "conf/private-genesis.json" |
| 25 | + } |
| 26 | + |
| 27 | + network { |
| 28 | + discovery { |
| 29 | + # We assume a fixed cluster, so `bootstrap-nodes` must not be empty |
| 30 | + discovery-enabled = false |
| 31 | + |
| 32 | + # Listening interface for discovery protocol |
| 33 | + interface = ${mantis.network.server-address.interface} |
| 34 | + |
| 35 | + # Listening port for discovery protocol |
| 36 | + # port = 30303 |
| 37 | + |
| 38 | + # Set of initial nodes |
| 39 | + bootstrap-nodes = [ |
| 40 | + "enode://18a551bee469c2e02de660ab01dede06503c986f6b8520cb5a65ad122df88b17b285e3fef09a40a0d44f99e014f8616cf1ebc2e094f96c6e09e2f390f5d34857@127.0.0.1:30303", |
| 41 | + ] |
| 42 | + } |
| 43 | + |
| 44 | + peer { |
| 45 | + # Ethereum network identifier: |
| 46 | + # 1 - mainnet, 2 - morden |
| 47 | + network-id = 2139 |
| 48 | + } |
| 49 | + |
| 50 | + rpc { |
| 51 | + # JSON-RPC mode |
| 52 | + # Available modes are: http, https |
| 53 | + # Choosing https requires creating a certificate and setting up 'certificate-keystore-path' and |
| 54 | + # 'certificate-password-file' |
| 55 | + # See: https://github.com/input-output-hk/mantis/wiki/Creating-self-signed-certificate-for-using-JSON-RPC-with-HTTPS |
| 56 | + mode = "http" |
| 57 | + |
| 58 | + # Listening address of JSON-RPC HTTP/HTTPS endpoint |
| 59 | + interface = ${mantis.network.server-address.interface} |
| 60 | + |
| 61 | + # Listening port of JSON-RPC HTTP/HTTPS endpoint |
| 62 | + # port = 8546 |
| 63 | + |
| 64 | + # Domains allowed to query RPC endpoint. Use "*" to enable requests from any domain. |
| 65 | + cors-allowed-origins = "*" |
| 66 | + } |
| 67 | + } |
| 68 | + |
| 69 | + # This is the section dedicated to `atomix-raft` consensus. |
| 70 | + # This consensus protocol is selected by setting `mantis.consensus.protocol = atomix-raft`. |
| 71 | + atomix-raft { |
| 72 | + election-timeout = 30.seconds |
| 73 | + |
| 74 | + # Determines how often new blocks will be forged |
| 75 | + block-forging-delay = 15.seconds |
| 76 | + |
| 77 | + # Represents this node. |
| 78 | + # |
| 79 | + # ID and PORT are not mandatory. |
| 80 | + # If PORT is not given, then is assumes the value of |
| 81 | + # io.atomix.messaging.impl.NettyMessagingService.DEFAULT_PORT, which currently is 5679. |
| 82 | + # If ID is not given, then its value becomes IP_PORT. |
| 83 | + local-node = ${mantis.network.server-address.interface} |
| 84 | + |
| 85 | + # All the other nodes in the cluster, in the same format as with `local-node`. |
| 86 | + bootstrap-nodes = [] |
| 87 | + } |
| 88 | +} |
0 commit comments