diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index 09a5313dc3..4fa042a1a8 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -293,7 +293,9 @@ mantis { test {include "chains/test-chain.conf"} - testnet-internal {include "chains/testnet-internal-chain.conf"} + testnet-internal-nomad {include "chains/testnet-internal-nomad-chain.conf"} + + testnet-internal-gac {include "chains/testnet-internal-gac-chain.conf"} } sync { diff --git a/src/main/resources/chains/testnet-internal-chain.conf b/src/main/resources/chains/testnet-internal-gac-chain.conf similarity index 98% rename from src/main/resources/chains/testnet-internal-chain.conf rename to src/main/resources/chains/testnet-internal-gac-chain.conf index 08e65563a2..634b16d634 100644 --- a/src/main/resources/chains/testnet-internal-chain.conf +++ b/src/main/resources/chains/testnet-internal-gac-chain.conf @@ -108,7 +108,7 @@ # Custom genesis JSON file path # null value indicates using default genesis definition that matches the main network - custom-genesis-file = "chains/testnet-internal-genesis.json" + custom-genesis-file = "chains/testnet-internal-gac-genesis.json" # Monetary policy parameters # Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md diff --git a/src/main/resources/chains/testnet-internal-genesis.json b/src/main/resources/chains/testnet-internal-gac-genesis.json similarity index 90% rename from src/main/resources/chains/testnet-internal-genesis.json rename to src/main/resources/chains/testnet-internal-gac-genesis.json index f5708d5e61..4e102d917c 100644 --- a/src/main/resources/chains/testnet-internal-genesis.json +++ b/src/main/resources/chains/testnet-internal-gac-genesis.json @@ -10,7 +10,7 @@ "coinbase": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "alloc": { - "d7a681378321f472adffb9fdded2712f677e0ba9": {"balance": + "45238430908a621cfe0e5491528dedfe82058b8e": {"balance": "1606938044258990275541962092341162602522202993782792835301376"} } } diff --git a/src/main/resources/chains/testnet-internal-nomad-chain.conf b/src/main/resources/chains/testnet-internal-nomad-chain.conf new file mode 100644 index 0000000000..9be92a646c --- /dev/null +++ b/src/main/resources/chains/testnet-internal-nomad-chain.conf @@ -0,0 +1,153 @@ +{ + # Ethereum network identifier: + # 1 - mainnet, 3 - ropsten, 7 - mordor + network-id = 42 + + # Possibility to set Proof of Work target time for testing purposes. + # null means that the standard difficulty calculation rules are used + pow-target-time = 30 seconds + + # Frontier block number + frontier-block-number = "0" + + # Homestead fork block number + # Doc: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.md + homestead-block-number = "0" + + # EIP-106 fork block number + # Doc: https://github.com/ethereum/EIPs/issues/106 + eip106-block-number = "1000000000000000000" + + # EIP-150 fork block number + # Doc: https://github.com/ethereum/EIPs/issues/150 + eip150-block-number = "0" + + # EIP-155 fork block number + # Doc: https://github.com/ethereum/eips/issues/155 + # 3 000 000 following lead of existing clients implementation to maintain compatibility + # https://github.com/paritytech/parity/blob/b50fb71dd1d29dfde2a6c7e1830447cf30896c31/ethcore/res/ethereum/classic.json#L15 + eip155-block-number = "0" + + # EIP-160 fork block number + # Doc: https://github.com/ethereum/EIPs/issues/160 + eip160-block-number = "0" + + # EIP-161 fork block number (ETH Only) + # Doc: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-161.md + eip161-block-number = "1000000000000000000" + + # EIP-170 max code size (Enabled from Atlantis fork block number) + # Doc: https://github.com/ethereum/EIPs/issues/170 + # null value indicates there's no max code size for the contract code + # TODO improve this configuration format as currently it is not obvious that this is enabled only from some block number + max-code-size = "24576" + + # Difficulty bomb pause block number + # Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1010.md + difficulty-bomb-pause-block-number = "0" + + # Difficulty bomb continuation block number + # Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1010.md + difficulty-bomb-continue-block-number = "0" + + # Difficulty bomb defusion block number + # Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1041.md + difficulty-bomb-removal-block-number = "0" + + # Byzantium fork block number (ETH only) + # https://github.com/ethereum/EIPs/blob/master/EIPS/eip-609.md + byzantium-block-number = "1000000000000000000" + + # Atlantis fork block number (ETC only) + # https://ecips.ethereumclassic.org/ECIPs/ecip-1054 + atlantis-block-number = "0" + + # Agharta fork block number (ETC only) + # https://ecips.ethereumclassic.org/ECIPs/ecip-1056 + agharta-block-number = "0" + + # Phoenix fork block number (ETC only) + # https://ecips.ethereumclassic.org/ECIPs/ecip-1088 + phoenix-block-number = "0" + + # Constantinople fork block number (ETH only) + # https://github.com/ethereum/pm/issues/53 + constantinople-block-number = "1000000000000000000" + + # Petersburg fork block number (ETH only) + # https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1716.md + petersburg-block-number = "1000000000000000000" + + # Istanbul fork block number (ETH only) + # https://eips.ethereum.org/EIPS/eip-1679 + istanbul-block-number = "1000000000000000000" + + # Proto-treasury fork block number (ETC only, but deactivated for now) + # https://ecips.ethereumclassic.org/ECIPs/ecip-1098 + treasury-address = "0011223344556677889900112233445566778899" + ecip1098-block-number = "1000000000000000000" + + # Checkpointing fork block number + # https://ecips.ethereumclassic.org/ECIPs/ecip-1097 + # Has to be equal or greater than ecip1098-block-number + ecip1097-block-number = "1000000000000000000" + + # Epoch calibration block number + # https://ecips.ethereumclassic.org/ECIPs/ecip-1099 + ecip1099-block-number = "1000000000000000000" + + # DAO fork configuration (Ethereum HF/Classic split) + # https://blog.ethereum.org/2016/07/20/hard-fork-completed/ + dao = null + + # Starting nonce of an empty account. Some networks (like Morden) use different values. + account-start-nonce = "0" + + # The ID of the accepted chain + chain-id = "0x2A" + + # Custom genesis JSON file path + # null value indicates using default genesis definition that matches the main network + custom-genesis-file = "chains/testnet-internal-nomad-genesis.json" + + # Monetary policy parameters + # Doc: https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md + monetary-policy { + # Block reward in the first era + first-era-block-reward = "5000000000000000000" + + # Reduced block reward after Byzantium fork + first-era-reduced-block-reward = "3000000000000000000" + + # Reduced block reward after Constantinople fork + first-era-constantinople-reduced-block-reward = "2000000000000000000" + + # Monetary policy era duration in number of blocks + era-duration = 5000000 + + # Rate at which rewards get reduced in successive eras. + # Value in range [0.0, 1.0] + reward-reduction-rate = 0.2 + } + + # if 2 competing blocktree branches are equal in terms of total difficulty and this is set to true, then gas + # consumed in those branches will be used to resolve the tie + # this is currently only used in ETS blockchain tests + gas-tie-breaker = false + + # if true, account storage will use Ethereum-specific format for storing keys/value in MPT (32 byte) + # if false, generic storage for arbitrary length integers will be used + eth-compatible-storage = true + + # Set of initial nodes + bootstrap-nodes = [ + "enode://ff86741b7b35087b2b53f44a612b233336490d5fae10b1434619b7714fe2d5346c71427a5e126cd27b9422a4d4376c1534ef66e88c5e62d6441d2541f63de0cf@mantis-4.mantis.ws:9004", + "enode://f92aa66337ab1993cc7269d4295d296aefe6199b34e900eac08c514c947ec7340d46a5648ffc2da10325dbaba16bdf92aa9c0b5e51d97a7818c3f495d478ddad@mantis-1.mantis.ws:9001", + "enode://442e2bd50eece65f90dee0d5c6075da4e1b4bc62e36b261a52e7f393dae6a68241e4dbad868c7ecc14fed277ed72e99a289a811b6172f35fb18bdca0b7a5602c@mantis-3.mantis.ws:9003", + "enode://af97643f364b805d5b0e32b5356578a16afcc4fb9d1b6622998e9441eeb7795e8daf8e6b0ff3330da9879034112be56954f9269164513ece0f7394b805be3633@mantis-5.mantis.ws:9005", + "enode://d8a010f019db37dcaf2e1fb98d4fcbf1f57dbd7e2a7f065e92fbe77dca8b9120d6e79f1617e98fa6134e6af8858ac8f3735b1e70a5708eb14f228080356eb0a7@mantis-2.mantis.ws:9002" + ] + + # List of hex encoded public keys of Checkpoint Authorities + checkpoint-public-keys = [] +} diff --git a/src/main/resources/chains/testnet-internal-nomad-genesis.json b/src/main/resources/chains/testnet-internal-nomad-genesis.json new file mode 100644 index 0000000000..334cf272b6 --- /dev/null +++ b/src/main/resources/chains/testnet-internal-nomad-genesis.json @@ -0,0 +1,44 @@ +{ + "extraData": "0x00", + "nonce": "0x0000000000000042", + "gasLimit": "0x2fefd8", + "_commentAboutDifficulty": "Set to 1000000", + "difficulty": "0xF4240", + "ommersHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "_commentAboutTimestamp": "Set to 11/05/2020 @ 12:00am (UTC)", + "timestamp": "0x5FA34080", + "coinbase": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "alloc": { + "075b073eaa848fc14de2fd9c2a18d97a4783d84c": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + }, + "18f496690eb3fabb794a653be8097af5331c07b1": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + }, + "1ff7fc39f7f4dc79c5867b9514d0e42607741384": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + }, + "2a0a5393adef8f8df2aa948c01c0500dfd786c83": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + }, + "2ce0782496a68b614e53a0428e5a18fc3ca2f139": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + }, + "421c8cd4f16ac4b36b9c125bc4a8cac1fbcb403e": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + }, + "75b0f1c605223de2a013bf7f26d4cd93c63a5eb8": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + }, + "7e3166074d45c3311908315da1af5f5a965b7ece": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + }, + "8716c138878d158470dbc15727854375f5cb7ef5": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + }, + "886b335e37ee91aa5ce8daca7c65bfbaa3fe41d2": { + "balance": "1606938044258990275541962092341162602522202993782792835301376" + } + } +} diff --git a/src/universal/conf/testnet-internal.conf b/src/universal/conf/base-testnet.conf similarity index 86% rename from src/universal/conf/testnet-internal.conf rename to src/universal/conf/base-testnet.conf index 813547343f..23aa42538b 100644 --- a/src/universal/conf/testnet-internal.conf +++ b/src/universal/conf/base-testnet.conf @@ -1,8 +1,9 @@ include "app.conf" +# Configurations required for setting up a testnet of only Mantis clients mantis { sync { - # Fast sync is disabled as it's an experimental feature for now + # Fast sync is disabled, requires coordination to see if it affects our deployments if we turn this on do-fast-sync = false # All testnet members are assumed to be honest so blacklisting is turned off @@ -14,10 +15,6 @@ mantis { mode = "archive" } - blockchains { - network = "testnet-internal" - } - consensus { coinbase = "0011223344556677889900112233445566778899" # has to be changed for each node mining-enabled = true diff --git a/src/universal/conf/consensus.conf b/src/universal/conf/consensus.conf deleted file mode 100644 index a1fb46ece7..0000000000 --- a/src/universal/conf/consensus.conf +++ /dev/null @@ -1,39 +0,0 @@ -mantis { - consensus { - # Miner's coinbase address - # Also used in non-Ethash consensus. - # coinbase = "0011223344556677889900112233445566778899" - - # This determines how many parallel eth_getWork request we can handle, by storing the prepared blocks in a cache, - # until a corresponding eth_submitWork request is received. - # - # Also used by the generic `BlockGenerator`. - # block-cashe-size = 30 - - # If true then the consensus protocol uses this node for mining. - # In the case of ethash PoW, this means mining new blocks, as specified by Ethereum. - # In the general case, the semantics are due to the specific consensus implementation. - # mining-enabled = false - - # See io.iohk.ethereum.consensus.Protocol for the available protocols. - # Declaring the protocol here means that a more protocol-specific configuration - # is pulled from the corresponding consensus implementation. - # For example, in case of ethash, a section named `ethash` is used. - # Available protocols: ethash, mocked - # In case of mocked, remember to enable qa api - # protocol = ethash - - # Whether or not as a miner we want to support the proto-treasury and send 20% of the block reward to it - # If false then that 20% gets burned - # Doesn't have any effect is ecip1098 is not yet activated - # treasury-opt-out = false - - } - - # This is the section dedicated to Ethash mining. - # This consensus protocol is selected by setting `mantis.consensus.protocol = ethash`. - ethash { - # Maximum number of ommers kept in the pool - # ommers-pool-size = 30 - } -} diff --git a/src/universal/conf/testnet-internal-gac.conf b/src/universal/conf/testnet-internal-gac.conf new file mode 100644 index 0000000000..6c6c5beaab --- /dev/null +++ b/src/universal/conf/testnet-internal-gac.conf @@ -0,0 +1,8 @@ +include "base-testnet.conf" + +mantis { + blockchains { + network = "testnet-internal-gac" + } + +} diff --git a/src/universal/conf/testnet-internal-nomad.conf b/src/universal/conf/testnet-internal-nomad.conf new file mode 100644 index 0000000000..2f331afb4f --- /dev/null +++ b/src/universal/conf/testnet-internal-nomad.conf @@ -0,0 +1,8 @@ +include "base-testnet.conf" + +mantis { + blockchains { + network = "testnet-internal-nomad" + } + +}