From 34377d8cc0e540ac1e101bb09d19134f946fa752 Mon Sep 17 00:00:00 2001 From: Christopher Paliga Date: Wed, 17 Mar 2021 14:27:01 +0100 Subject: [PATCH 1/2] [ETCM-661]: adds pottery network for local nomad/docker setup --- src/main/resources/conf/base.conf | 2 + .../resources/conf/chains/pottery-chain.conf | 160 ++++++++++++++++++ .../conf/chains/pottery-genesis.json | 12 ++ src/main/resources/conf/pottery.conf | 43 +++++ 4 files changed, 217 insertions(+) create mode 100644 src/main/resources/conf/chains/pottery-chain.conf create mode 100644 src/main/resources/conf/chains/pottery-genesis.json create mode 100644 src/main/resources/conf/pottery.conf diff --git a/src/main/resources/conf/base.conf b/src/main/resources/conf/base.conf index c92473a771..4c46174987 100644 --- a/src/main/resources/conf/base.conf +++ b/src/main/resources/conf/base.conf @@ -332,6 +332,8 @@ mantis { testnet-internal-nomad {include required("chains/testnet-internal-nomad-chain.conf")} testnet-internal-gac {include required("chains/testnet-internal-gac-chain.conf")} + + pottery {include required("chains/pottery-chain.conf")} } sync { diff --git a/src/main/resources/conf/chains/pottery-chain.conf b/src/main/resources/conf/chains/pottery-chain.conf new file mode 100644 index 0000000000..109933fafc --- /dev/null +++ b/src/main/resources/conf/chains/pottery-chain.conf @@ -0,0 +1,160 @@ +{ + # Ethereum network identifier: + # 1 - mainnet, 3 - ropsten, 7 - mordor, 9 - pottery + network-id = 9 + + # Possibility to set Proof of Work target time for testing purposes. + # null means that the standard difficulty calculation rules are used + pow-target-time = null + + # 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" + + # Proto-treasury fork block number (ETC only, but deactivated for now) + # https://ecips.ethereumclassic.org/ECIPs/ecip-1098 + treasury-address = "0011223344556677889900112233445566778899" + ecip1098-block-number = "0" + + # 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" + ecip1097-block-number = "0" + + # Epoch calibration block number + # https://ecips.ethereumclassic.org/ECIPs/ecip-1099 + ecip1099-block-number = "2520000" + + # 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 = { include required("pottery-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 = 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 + # https://github.com/etclabscore/mordor/blob/master/static-nodes.json + bootstrap-nodes = [ + "enode://ab45bc7c12a77bc3ab49260946cd0fd649db85a1e330e0e9be46b24d5911898027d073750f35837b1937bebea240bc4dc27b6e99316384e1db16011c5fc42819@bootstrap-1:9076", + "enode://1fa095654161e50d1e4b8e6b3a512725bf1bf964295b3431d8c59529f0ccc8525d1cdefb689b3fc9ccc625bbabfb8309ff08a03d3b5d33cd3646c3974992527e@bootstrap-2:9076", + "enode://da1a3a92502f3eafb4e274516976daa351a1b7090d3bb745209b06bd19c9edbf9220f895c27e04bea42e12a71c90dfacf9a761ea82d8c096222e71e2f11bde27@bootstrap-3:9076", + "enode://b252ed56f2d7a686b99659adc04ee7686bf63fd33f712905f3647889809865d4c69a9ee5605c29d0a948b0b1699d1e36478b40da2657724cf847de8df176c95e@bootstrap-4:9076", + "enode://acb31364e7d9a64526751c7811d3bbf6d9de09790582d86fbb1a4bc87e3135a9474ce85a7c0ab52c34feee349fdfd7bfe2871453bf270935b83d8258796a9eb1@bootstrap-5:9076" + ] + + checkpoint-public-keys = [ + "5abbac150283c417b2a05b650c5332c58e1f5579aed734dc33fca47d60cb54007e00e3b18ef251aacc2eff39477f70f1c43f02c64f120a447aea030b60cba702", + "b181e1bf301f7496d83f4bd4a2d22d9d25af8c05b7bf761a46784b4a5862a51467ebfeb64d57a5da2e22c9bc86e9270ce44d55ce6efbd698c05331c6626b5644", + "be9b910c37eb0ee6bb4d69de5529f55d3bf10db657316ce523ce101f03f1277b3471c3ac4d7c24ece5b1abde95f9c3d4049aa603dc2475718bd796f2605d7206", + "03be9c357d0fa4e3c2d9f59de6d02f355c6340353d693a8c6cae2472115825f509f534f316b299d3b9d23b1efc4048dbde24c7e1c3a833acc18730378a0cc7dc", + "464091d0242661ab306d44bae48aacaeffa50d19707ed87139ab51b28d33d89d135609a67eeb3b7e16451e19f9992f77bdf99f671ecd837724eea4363ae39197" + ] +} diff --git a/src/main/resources/conf/chains/pottery-genesis.json b/src/main/resources/conf/chains/pottery-genesis.json new file mode 100644 index 0000000000..905d976a26 --- /dev/null +++ b/src/main/resources/conf/chains/pottery-genesis.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/resources/conf/pottery.conf b/src/main/resources/conf/pottery.conf new file mode 100644 index 0000000000..b958bc4c55 --- /dev/null +++ b/src/main/resources/conf/pottery.conf @@ -0,0 +1,43 @@ +include "base-testnet.conf" + +mantis { + blockchains { + network = "pottery" + } + + network { + protocol-version = 64 + + discovery { + discovery-enabled = true + } + } + + consensus { + coinbase = "0011223344556677889900112233445566778899" # has to be changed for each node + mining-enabled = false + protocol = "restricted-ethash" + } + + metrics { + # Set to `true` iff your deployment supports metrics collection. + # We expose metrics using a Prometheus server + # We default to `false` here because we do not expect all deployments to support metrics collection. + enabled = true + + # The port for setting up a Prometheus server over localhost. + port = 13798 + } +} + +akka { + # Not using ${logging.logs-level} because it might be set to TRACE, which our version of Akka doesn't have. + loglevel = "DEBUG" +} + +logging { + # Logs level + logs-level = "DEBUG" +} + + From dafd345c2aeb18794311d02947f2c29fd941c1a3 Mon Sep 17 00:00:00 2001 From: Christopher Paliga Date: Thu, 1 Apr 2021 12:52:08 +0200 Subject: [PATCH 2/2] ETCM-661 : PR changes --- .../resources/conf/chains/pottery-chain.conf | 166 ++---------------- .../conf/chains/pottery-genesis.json | 2 +- 2 files changed, 16 insertions(+), 152 deletions(-) diff --git a/src/main/resources/conf/chains/pottery-chain.conf b/src/main/resources/conf/chains/pottery-chain.conf index 109933fafc..8e72f5603f 100644 --- a/src/main/resources/conf/chains/pottery-chain.conf +++ b/src/main/resources/conf/chains/pottery-chain.conf @@ -1,160 +1,24 @@ -{ - # Ethereum network identifier: +include "mordor-chain.conf" # 1 - mainnet, 3 - ropsten, 7 - mordor, 9 - pottery network-id = 9 - # Possibility to set Proof of Work target time for testing purposes. - # null means that the standard difficulty calculation rules are used - pow-target-time = null - - # 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" - - # Proto-treasury fork block number (ETC only, but deactivated for now) - # https://ecips.ethereumclassic.org/ECIPs/ecip-1098 - treasury-address = "0011223344556677889900112233445566778899" ecip1098-block-number = "0" - # 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" - ecip1097-block-number = "0" - - # Epoch calibration block number - # https://ecips.ethereumclassic.org/ECIPs/ecip-1099 - ecip1099-block-number = "2520000" + ecip1097-block-number = "0" - # 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 = { include required("pottery-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 = 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 - # https://github.com/etclabscore/mordor/blob/master/static-nodes.json - bootstrap-nodes = [ - "enode://ab45bc7c12a77bc3ab49260946cd0fd649db85a1e330e0e9be46b24d5911898027d073750f35837b1937bebea240bc4dc27b6e99316384e1db16011c5fc42819@bootstrap-1:9076", - "enode://1fa095654161e50d1e4b8e6b3a512725bf1bf964295b3431d8c59529f0ccc8525d1cdefb689b3fc9ccc625bbabfb8309ff08a03d3b5d33cd3646c3974992527e@bootstrap-2:9076", - "enode://da1a3a92502f3eafb4e274516976daa351a1b7090d3bb745209b06bd19c9edbf9220f895c27e04bea42e12a71c90dfacf9a761ea82d8c096222e71e2f11bde27@bootstrap-3:9076", - "enode://b252ed56f2d7a686b99659adc04ee7686bf63fd33f712905f3647889809865d4c69a9ee5605c29d0a948b0b1699d1e36478b40da2657724cf847de8df176c95e@bootstrap-4:9076", - "enode://acb31364e7d9a64526751c7811d3bbf6d9de09790582d86fbb1a4bc87e3135a9474ce85a7c0ab52c34feee349fdfd7bfe2871453bf270935b83d8258796a9eb1@bootstrap-5:9076" - ] - - checkpoint-public-keys = [ - "5abbac150283c417b2a05b650c5332c58e1f5579aed734dc33fca47d60cb54007e00e3b18ef251aacc2eff39477f70f1c43f02c64f120a447aea030b60cba702", - "b181e1bf301f7496d83f4bd4a2d22d9d25af8c05b7bf761a46784b4a5862a51467ebfeb64d57a5da2e22c9bc86e9270ce44d55ce6efbd698c05331c6626b5644", - "be9b910c37eb0ee6bb4d69de5529f55d3bf10db657316ce523ce101f03f1277b3471c3ac4d7c24ece5b1abde95f9c3d4049aa603dc2475718bd796f2605d7206", + bootstrap-nodes = ["enode://ab45bc7c12a77bc3ab49260946cd0fd649db85a1e330e0e9be46b24d5911898027d073750f35837b1937bebea240bc4dc27b6e99316384e1db16011c5fc42819@bootstrap-1:9076", + "enode://1fa095654161e50d1e4b8e6b3a512725bf1bf964295b3431d8c59529f0ccc8525d1cdefb689b3fc9ccc625bbabfb8309ff08a03d3b5d33cd3646c3974992527e@bootstrap-2:9076", + "enode://da1a3a92502f3eafb4e274516976daa351a1b7090d3bb745209b06bd19c9edbf9220f895c27e04bea42e12a71c90dfacf9a761ea82d8c096222e71e2f11bde27@bootstrap-3:9076", + "enode://b252ed56f2d7a686b99659adc04ee7686bf63fd33f712905f3647889809865d4c69a9ee5605c29d0a948b0b1699d1e36478b40da2657724cf847de8df176c95e@bootstrap-4:9076", + "enode://acb31364e7d9a64526751c7811d3bbf6d9de09790582d86fbb1a4bc87e3135a9474ce85a7c0ab52c34feee349fdfd7bfe2871453bf270935b83d8258796a9eb1@bootstrap-5:9076" + ] + + checkpoint-public-keys = [ + "5abbac150283c417b2a05b650c5332c58e1f5579aed734dc33fca47d60cb54007e00e3b18ef251aacc2eff39477f70f1c43f02c64f120a447aea030b60cba702", + "b181e1bf301f7496d83f4bd4a2d22d9d25af8c05b7bf761a46784b4a5862a51467ebfeb64d57a5da2e22c9bc86e9270ce44d55ce6efbd698c05331c6626b5644", + "be9b910c37eb0ee6bb4d69de5529f55d3bf10db657316ce523ce101f03f1277b3471c3ac4d7c24ece5b1abde95f9c3d4049aa603dc2475718bd796f2605d7206", "03be9c357d0fa4e3c2d9f59de6d02f355c6340353d693a8c6cae2472115825f509f534f316b299d3b9d23b1efc4048dbde24c7e1c3a833acc18730378a0cc7dc", - "464091d0242661ab306d44bae48aacaeffa50d19707ed87139ab51b28d33d89d135609a67eeb3b7e16451e19f9992f77bdf99f671ecd837724eea4363ae39197" - ] -} + "464091d0242661ab306d44bae48aacaeffa50d19707ed87139ab51b28d33d89d135609a67eeb3b7e16451e19f9992f77bdf99f671ecd837724eea4363ae39197" + ] diff --git a/src/main/resources/conf/chains/pottery-genesis.json b/src/main/resources/conf/chains/pottery-genesis.json index 905d976a26..e8afc08aa1 100644 --- a/src/main/resources/conf/chains/pottery-genesis.json +++ b/src/main/resources/conf/chains/pottery-genesis.json @@ -1,5 +1,5 @@ { - "difficulty": "0x20000", + "difficulty": "0x400", "extraData": "0x70686f656e697820636869636b656e206162737572642062616e616e61", "gasLimit": "0x2fefd8", "nonce": "0x0000000000000000",