diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index 94bce99d37..1a1a6038d4 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -253,13 +253,11 @@ mantis { blockchains { network = "etc" - base { include "chains/base.conf" } - etc { include "chains/etc.conf" } eth { include "chains/eth.conf" } - morden { include "chains/morden.conf" } + mordor { include "chains/mordor.conf"} ropsten { include "chains/ropsten.conf" } diff --git a/src/main/resources/chains/base.conf b/src/main/resources/chains/base.conf index 49208bca91..2b4c02fa5f 100644 --- a/src/main/resources/chains/base.conf +++ b/src/main/resources/chains/base.conf @@ -1,6 +1,6 @@ { # Ethereum network identifier: - # 1 - mainnet, 2 - morden + # 1 - mainnet, 7 - mordor network-id = 1 # Frontier block number diff --git a/src/main/resources/chains/morden.conf b/src/main/resources/chains/morden.conf deleted file mode 100644 index 5fffe5232c..0000000000 --- a/src/main/resources/chains/morden.conf +++ /dev/null @@ -1,40 +0,0 @@ -{ - include "base.conf" - frontier-block-number = "0" - homestead-block-number = "494000" - eip150-block-number = "1783000" - eip155-block-number = "1915000" - eip160-block-number = "1915000" - difficulty-bomb-pause-block-number = "1915000" - difficulty-bomb-continue-block-number = "3415000" - difficulty-bomb-removal-block-number = "2300000" - - dao = null - - monetary-policy.era-duration = 2000000 - - account-start-nonce = "1048576" - - chain-id = "0x3e" - network-id = 2 - - custom-genesis-file = "chains/morden.json" - - # Atlantis fork block number (ETC only) - # https://ecips.ethereumclassic.org/ECIPs/ecip-1054 - atlantis-block-number = "4729274" - - # Agharta fork block number (ETC only) - # https://ecips.ethereumclassic.org/ECIPs/ecip-1056 - agharta-block-number = "5000381" - - bootstrap-nodes = [ - "enode://fb28713820e718066a2f5df6250ae9d07cff22f672dbf26be6c75d088f821a9ad230138ba492c533a80407d054b1436ef18e951bb65e6901553516c8dffe8ff0@104.155.176.151:30304", - "enode://afdc6076b9bf3e7d3d01442d6841071e84c76c73a7016cb4f35c0437df219db38565766234448f1592a07ba5295a867f0ce87b359bf50311ed0b830a2361392d@104.154.136.117:30403", - "enode://21101a9597b79e933e17bc94ef3506fe99a137808907aa8fefa67eea4b789792ad11fb391f38b00087f8800a2d3dff011572b62a31232133dd1591ac2d1502c8@104.198.71.200:30403", - "enode://fd008499e9c4662f384b3cff23438879d31ced24e2d19504c6389bc6da6c882f9c2f8dbed972f7058d7650337f54e4ba17bb49c7d11882dd1731d26a6e62e3cb@35.187.57.94:30304", - "enode://30a1fd71f28aa6f66fe662af9ecc75f0a6980f06b71598f2b19d3dda04223fc0e53b47e40c9171d5014e9f5b59d9954de125782da592f5d95ea39066e2591d5d@104.237.131.102:30304", - "enode://7909d51011d8a153351169f21d3a7bbedb3be1e17d38c1f2fad06504dd5aa07a00f00845835d535fe702bf379c4d7209a51f4d1b723e0ca8b8732bd21fba3b30@139.162.133.42:30303", - "enode://a088dfb2f5305be9232e8071c5535f13718a4017e247a0b35074b807d43d99e022880c27302cdb5b1e98ad34c083dbbb483f2b17bdc66149bad037154d6ace96@139.162.127.72:30303" - ] -} diff --git a/src/main/resources/chains/morden.json b/src/main/resources/chains/morden.json deleted file mode 100644 index 193c073036..0000000000 --- a/src/main/resources/chains/morden.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "difficulty": "0x20000", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "nonce": "0x00006d6f7264656e", - "ommersHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "timestamp": "0x0", - "coinbase": "0x0000000000000000000000000000000000000000", - "mixHash": "0x00000000000000000000000000000000000000647572616c65787365646c6578", - "alloc": { - "0000000000000000000000000000000000000001": { "balance": "1" }, - "0000000000000000000000000000000000000002": { "balance": "1" }, - "0000000000000000000000000000000000000003": { "balance": "1" }, - "0000000000000000000000000000000000000004": { "balance": "1" }, - "102e61f5d8f9bc71d0ad4a084df4e65e05ce0e1c": { "balance": "1606938044258990275541962092341162602522202993782792835301376" } - } -} diff --git a/src/main/resources/chains/mordor.conf b/src/main/resources/chains/mordor.conf new file mode 100644 index 0000000000..79c677373e --- /dev/null +++ b/src/main/resources/chains/mordor.conf @@ -0,0 +1,153 @@ +{ + # Ethereum network identifier: + # 1 - mainnet, 7 - mordor + network-id = 7 + + # 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 = "301243" + + # Phoenix fork block number (ETC only) + # https://ecips.ethereumclassic.org/ECIPs/ecip-1088 + phoenix-block-number = "999983" + + # 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" + + # 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 = "0x3f" + + # Custom genesis JSON file path + # null value indicates using default genesis definition that matches the main network + custom-genesis-file = "chains/mordor.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 = 2000000 + + # 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://a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd@51.158.191.43:38556", // @q9f parity mizar + "enode://651b484b652c07c72adebfaaf8bc2bd95b420b16952ef3de76a9c00ef63f07cca02a20bd2363426f9e6fe372cef96a42b0fec3c747d118f79fd5e02f2a4ebd4e@51.158.190.99:45678", // @q9f core-geth lyrae + "enode://9b1bf9613d859ac2071d88509ab40a111b75c1cfc51f4ad78a1fdbb429ff2405de0dc5ea8ae75e6ac88e03e51a465f0b27b517e78517f7220ae163a2e0692991@51.158.190.99:30426", // @q9f parity lyrae + "enode://111bd28d5b2c1378d748383fd83ff59572967c317c3063a9f475a26ad3f1517642a164338fb5268d4e32ea1cc48e663bd627dec572f1d201c7198518e5a506b1@88.99.216.30:45834", + "enode://2b69a3926f36a7748c9021c34050be5e0b64346225e477fe7377070f6289bd363b2be73a06010fd516e6ea3ee90778dd0399bc007bb1281923a79374f842675a@51.15.116.226:30303", + "enode://06fdbeb591d26f53b2e7250025fe955ca013431ded930920cf1e3cd1f0c920e9a5e727949d209bc25a07288327b525279b11c5551315c50ff0db483e69fc159b@34.218.225.178:32000", + "enode://534d18fd46c5cd5ba48a68250c47cea27a1376869755ed631c94b91386328039eb607cf10dd8d0aa173f5ec21e3fb45c5d7a7aa904f97bc2557e9cb4ccc703f1@51.158.190.99:30303", // @q9f besu lyrae + "enode://617a2009783a09085ed0d5d5e7250e2e3c142f73448bf28200284bf4825c5926a80f3e9fb481edf38b89ade2aa0ad5a2f14cc935f3150e36e648eddda674fd70@35.225.5.185:51320", + "enode://4ca79bbff7491fed82221259e3f27492e27b95b600594e2f8d5f1fa011123ea267e71873a0db3993e5109845d519d8b849ba2c7e4b48b09bedebb99e1c2ce304@35.238.132.8:30303", + "enode://5a1399e6ba3268721dd7656530cd81230dbeb950570c6e3ec2a45effc50c032f66633c5eaaa1a49c51ba1849db37a7bef6e402779ad12dc9943f117e058d7760@35.225.124.17:39306", + "enode://0d70715514674189792de4ad294b658c96d0ec40fe517fbe9cb7949d3792f25f82357ec77d1bd8bed6ec719ca0c1d608bb34cc702bf3d4bb4507f7280f835452@154.5.137.161:61410", + "enode://07fa944c83597d5e935a2abe6194ed40fc7239e86111c971a43537a33d0184d1cd1b3f1291b8dd3bcfaebfbb802de77c843465a00065b39120c338fdd877ca4a@35.238.126.60:30000", + "enode://b45f008ab8ad73966d0c8c0c923c50f47c0ae50c37a9ea05cc28b00cb94802145a4158412a526fdadd7e539db5eaab72f06a9046a34576ecf5a68efc41ba9d01@34.68.40.145:30303", + "enode://03b133f731049e3f7be827339c3759be92778c05e54a1847d178c0fdb56fa168aa1e7e61fc77791a7afdd0328a00318f73c01212eb3f3bbe919f5ce8f5b4a314@192.227.105.4:32000", + "enode://859ed8c19ea04eaea41f1cf17c8d2710e2e0affb97328c8392a79f1764118edf2344f1941299f0d676772fa6054447e6f9b3af96444e350b417442bfd7cc832b@34.68.243.226:30303", + "enode://f840b007500f50c98ea6f9c9e56dabf4690bbbbb7036d43682c531204341aff8315013547e5bee54117eb22bd3603585ae6bf713d9fa710659533fcab65d5b84@35.238.101.58:30303", + "enode://f840b007500f50c98ea6f9c9e56dabf4690bbbbb7036d43682c531204341aff8315013547e5bee54117eb22bd3603585ae6bf713d9fa710659533fcab65d5b84@34.69.50.155:42078", + "enode://5a1399e6ba3268721dd7656530cd81230dbeb950570c6e3ec2a45effc50c032f66633c5eaaa1a49c51ba1849db37a7bef6e402779ad12dc9943f117e058d7760@34.69.121.227:30303", + "enode://642cf9650dd8869d42525dbf6858012e3b4d64f475e733847ab6f7742341a4397414865d953874e8f5ed91b0e4e1c533dee14ad1d6bb276a5459b2471460ff0d@157.230.152.87:30303", // @meowsbits but don't count on it + "enode://1f378945c9b2eeb292d910f461911fd99520a23beda1bc5c8aea12be09e249f8d92615aa3d4d75c938004db5281dabad4a9cf7a0f07ec7c1fc8e7721addc7c85@34.205.41.164:40218", + "enode://15b6ae4e9e18772f297c90d83645b0fbdb56667ce2d747d6d575b21d7b60c2d3cd52b11dec24e418438caf80ddc433232b3685320ed5d0e768e3972596385bfc@51.158.191.43:41235", // @q9f core-geth mizar + "enode://f50f52b5fe18fd281748905bf5dad5439471f32cc02d99fecf960a983c1f4eba701ffca96afd2f2a68dcf6f97c5d02b566bafce1f361b51717e1a03c1dd9a836@157.230.42.102:30303", + "enode://07fa944c83597d5e935a2abe6194ed40fc7239e86111c971a43537a33d0184d1cd1b3f1291b8dd3bcfaebfbb802de77c843465a00065b39120c338fdd877ca4a@35.238.126.60:51240", + "enode://c0afb552bfe932c72598caa245aef82d55c23555622c5ab946d4e49bb0ab694e46086dcff6793a606527f323ef94d0eb499d01ceb26aefb6fa3f8977105d7dd8@157.230.152.87:52138", + "enode://2592745efd35b4be443b8ee25fd2099de132e037951f9f6d3e8805e0a78f213537f71264b973f1a83a57372f57bbe6acac8d6ae678f39393221c045ccbe3b18c@51.15.116.226:30304", + ] +} diff --git a/src/main/resources/chains/mordor.json b/src/main/resources/chains/mordor.json new file mode 100644 index 0000000000..905d976a26 --- /dev/null +++ b/src/main/resources/chains/mordor.json @@ -0,0 +1,12 @@ +{ + "difficulty": "0x20000", + "extraData": "0x70686f656e697820636869636b656e206162737572642062616e616e61", + "gasLimit": "0x2fefd8", + "nonce": "0x0000000000000000", + "ommersHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "timestamp": "0x5d9676db", + "coinbase": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "alloc": { + } +} diff --git a/src/main/scala/io/iohk/ethereum/blockchain/data/GenesisDataLoader.scala b/src/main/scala/io/iohk/ethereum/blockchain/data/GenesisDataLoader.scala index 4f75e93513..dcdf478900 100644 --- a/src/main/scala/io/iohk/ethereum/blockchain/data/GenesisDataLoader.scala +++ b/src/main/scala/io/iohk/ethereum/blockchain/data/GenesisDataLoader.scala @@ -102,7 +102,7 @@ class GenesisDataLoader( val header: BlockHeader = prepareHeader(genesisData, stateMptRootHash) - log.debug(s"prepared genesis header: $header") + log.debug(s"prepared genesis header: $header, with hash ${header.hashAsHexString}") blockchain.getBlockHeaderByNumber(0) match { case Some(existingGenesisHeader) if existingGenesisHeader.hash == header.hash =>