-
Notifications
You must be signed in to change notification settings - Fork 75
Add universal configuration for a custom private testnet #441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extraData": "0x00", | ||
"nonce": "0x0000000000000042", | ||
"gasLimit": "0x2fefd8", | ||
"difficulty": "0x400", | ||
"ommersHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", | ||
"timestamp": "0x00", | ||
"coinbase": "0x0000000000000000000000000000000000000000", | ||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"alloc": { | ||
"d7a681378321f472adffb9fdded2712f677e0ba9": { | ||
"balance": "1606938044258990275541962092341162602522202993782792835301376" | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Sample configuration for a custom private testnet. | ||
mantis { | ||
sync { | ||
# Whether to enable fast-sync | ||
do-fast-sync = false | ||
|
||
# Duration for blacklisting a peer. Blacklisting reason include: invalid response from peer, response time-out, etc. | ||
# 0 value is a valid duration and it will disable blacklisting completely (which can be useful when all nodes are | ||
# are controlled by a single party, eg. private networks) | ||
blacklist-duration = 0 | ||
|
||
# Set to false to disable broadcasting the NewBlockHashes message, as its usefulness is debatable, | ||
# especially in the context of private networks | ||
broadcast-new-block-hashes = false | ||
} | ||
|
||
blockchain { | ||
# DAO fork configuration (Ethereum HF/Classic split) | ||
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/ | ||
dao = null | ||
|
||
# Custom genesis JSON file | ||
# null value indicates using default genesis definition that matches the main network | ||
custom-genesis-file = "conf/private-genesis.json" | ||
} | ||
|
||
network { | ||
discovery { | ||
# We assume a fixed cluster, so `bootstrap-nodes` must not be empty | ||
discovery-enabled = false | ||
|
||
# Listening interface for discovery protocol | ||
interface = ${mantis.network.server-address.interface} | ||
|
||
# Listening port for discovery protocol | ||
# port = 30303 | ||
|
||
# Set of initial nodes | ||
bootstrap-nodes = [ | ||
"enode://18a551bee469c2e02de660ab01dede06503c986f6b8520cb5a65ad122df88b17b285e3fef09a40a0d44f99e014f8616cf1ebc2e094f96c6e09e2f390f5d34857@127.0.0.1:30303", | ||
] | ||
} | ||
|
||
peer { | ||
# Ethereum network identifier: | ||
# 1 - mainnet, 2 - morden | ||
network-id = 2139 | ||
} | ||
|
||
rpc { | ||
# JSON-RPC mode | ||
# Available modes are: http, https | ||
# Choosing https requires creating a certificate and setting up 'certificate-keystore-path' and | ||
# 'certificate-password-file' | ||
# See: https://github.com/input-output-hk/mantis/wiki/Creating-self-signed-certificate-for-using-JSON-RPC-with-HTTPS | ||
mode = "http" | ||
|
||
# Listening address of JSON-RPC HTTP/HTTPS endpoint | ||
interface = ${mantis.network.server-address.interface} | ||
|
||
# Listening port of JSON-RPC HTTP/HTTPS endpoint | ||
# port = 8546 | ||
|
||
# Domains allowed to query RPC endpoint. Use "*" to enable requests from any domain. | ||
cors-allowed-origins = "*" | ||
} | ||
} | ||
|
||
# This is the section dedicated to `atomix-raft` consensus. | ||
# This consensus protocol is selected by setting `mantis.consensus.protocol = atomix-raft`. | ||
atomix-raft { | ||
election-timeout = 30.seconds | ||
|
||
# Determines how often new blocks will be forged | ||
block-forging-delay = 15.seconds | ||
|
||
# Represents this node. | ||
# | ||
# ID and PORT are not mandatory. | ||
# If PORT is not given, then is assumes the value of | ||
# io.atomix.messaging.impl.NettyMessagingService.DEFAULT_PORT, which currently is 5679. | ||
# If ID is not given, then its value becomes IP_PORT. | ||
local-node = ${mantis.network.server-address.interface} | ||
|
||
# All the other nodes in the cluster, in the same format as with `local-node`. | ||
bootstrap-nodes = [] | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, as it will have to be modified anyway, but wouldn't we prefer empty list or even: