From 01d5fabf327111bf0fc0116b92a63e3af7a5fe7f Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 14:54:10 +0100 Subject: [PATCH] move to AuthorityRound for spree node --- compose-files/nodes/spree_node.yml | 16 +++++--- networks/nile/config/config.toml | 5 +-- networks/nile/config/member.toml | 18 --------- networks/nile/config/validator.toml | 24 ------------ networks/secret-store/config/chain.json | 2 +- networks/spree/authorities/validator0.json | 22 +++++++++++ networks/spree/authorities/validator0.pwd | 1 + networks/spree/authorities/validator1.json | 22 +++++++++++ networks/spree/authorities/validator1.pwd | 1 + networks/spree/authorities/validator2.json | 22 +++++++++++ networks/spree/authorities/validator2.pwd | 1 + networks/spree/config/chain.json | 43 +++++++++++++--------- networks/spree/config/config.toml | 19 +++++----- networks/spree/keys/master0.json | 21 +++++++++++ networks/spree/keys/master1.json | 21 +++++++++++ networks/spree/node0.network.key | 1 + networks/spree/node1.network.key | 1 + networks/spree/node2.network.key | 1 + 18 files changed, 161 insertions(+), 80 deletions(-) delete mode 100644 networks/nile/config/member.toml delete mode 100644 networks/nile/config/validator.toml create mode 100644 networks/spree/authorities/validator0.json create mode 100644 networks/spree/authorities/validator0.pwd create mode 100644 networks/spree/authorities/validator1.json create mode 100644 networks/spree/authorities/validator1.pwd create mode 100644 networks/spree/authorities/validator2.json create mode 100644 networks/spree/authorities/validator2.pwd create mode 100644 networks/spree/keys/master0.json create mode 100644 networks/spree/keys/master1.json create mode 100644 networks/spree/node0.network.key create mode 100644 networks/spree/node1.network.key create mode 100644 networks/spree/node2.network.key diff --git a/compose-files/nodes/spree_node.yml b/compose-files/nodes/spree_node.yml index 8e9adde..642df6e 100644 --- a/compose-files/nodes/spree_node.yml +++ b/compose-files/nodes/spree_node.yml @@ -3,19 +3,23 @@ services: keeper-node: image: parity/parity:stable command: - --config /home/parity/parity/config/config.toml - --keys-path /home/parity/.local/share/io.parity.ethereum/keys + --config /home/parity/config/config.toml + --db-path /home/parity/chains + --keys-path /home/parity/.local/keys --base-path /home/parity/base --min-gas-price 0 - --reseal-min-period 0 --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all + --unsafe-expose + --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e volumes: - - ../networks/spree/config:/home/parity/parity/config - - ../networks/spree/keys/validator.pwd:/home/parity/parity/validator.pwd - - ../networks/spree/keys:/home/parity/.local/share/io.parity.ethereum/keys/spree + - ../networks/spree/config:/home/parity/config + - ../networks/spree/authorities/validator0.json:/home/parity/.local/keys/spree/validator.json + - ../networks/spree/keys:/home/parity/.local/keys/spree + - ../networks/spree/authorities/validator0.pwd:/home/parity/validator.pwd:ro + - ../networks/spree/node0.network.key:/home/parity/.local/share/io.parity.ethereum/network/key:ro ports: - 8545:8545 networks: diff --git a/networks/nile/config/config.toml b/networks/nile/config/config.toml index 961b9b8..f00a82b 100644 --- a/networks/nile/config/config.toml +++ b/networks/nile/config/config.toml @@ -9,10 +9,7 @@ port = 8545 interface = "0.0.0.0" cors = ["all"] hosts = ["all"] -apis = ["web3", "secretstore", "eth", "pubsub", "net", "parity", "parity_pubsub", "parity_accounts", "traces", "rpc", "shh", "shh_pubsub"] - -[secretstore] -disable = true # users do not run a secret store node +apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "parity_accounts", "traces", "rpc", "shh", "shh_pubsub"] [network] port = 30303 diff --git a/networks/nile/config/member.toml b/networks/nile/config/member.toml deleted file mode 100644 index 0d5d34d..0000000 --- a/networks/nile/config/member.toml +++ /dev/null @@ -1,18 +0,0 @@ -[parity] -chain = "/parity/config/chain.json" - -[rpc] -interface = "0.0.0.0" -cors = ["all"] -hosts = ["all"] -apis = ["web3", "eth", "net", "parity", "traces", "rpc", "personal", "parity_accounts", "signer", "parity_set"] - -[network] -bootnodes = [ - "enode://147573f46fe9f5cc38fbe070089a31390baec5dd2827c8f2ef168833e4d0254fbee3969a02c5b9910ea5d5b23d86a6ed5eabcda17cc12007b7d9178b6c697aa5@172.16.0.10:30303", - "enode://1412ee9b9e23700e4a67a8fe3d8d02e10376b6e1cb748eaaf8aa60d4652b27872a8e1ad65bb31046438a5d3c1b71b00ec3ce0b4b42ac71464b28026a3d0b53af@172.16.0.11:30303", - "enode://9076c143a487aa163437a86f7d009f257f405c50bb2316800b9c9cc40e5a38fef5b414a47636ec38fdabc8a1872b563effa8574a7f8f85dc6bde465c368f1bf5@172.16.0.12:30303" -] - -[ui] -interface = "0.0.0.0" diff --git a/networks/nile/config/validator.toml b/networks/nile/config/validator.toml deleted file mode 100644 index 046293d..0000000 --- a/networks/nile/config/validator.toml +++ /dev/null @@ -1,24 +0,0 @@ -[parity] -chain = "/home/parity/parity/config/chain.json" - -[rpc] -interface = "0.0.0.0" -cors = ["all"] -hosts = ["all"] -apis = ["web3", "eth", "net", "parity", "traces", "rpc", "personal", "parity_accounts", "signer", "parity_set"] - -[network] -bootnodes = [ - "enode://147573f46fe9f5cc38fbe070089a31390baec5dd2827c8f2ef168833e4d0254fbee3969a02c5b9910ea5d5b23d86a6ed5eabcda17cc12007b7d9178b6c697aa5@172.16.0.10:30303", - "enode://1412ee9b9e23700e4a67a8fe3d8d02e10376b6e1cb748eaaf8aa60d4652b27872a8e1ad65bb31046438a5d3c1b71b00ec3ce0b4b42ac71464b28026a3d0b53af@172.16.0.11:30303", - "enode://9076c143a487aa163437a86f7d009f257f405c50bb2316800b9c9cc40e5a38fef5b414a47636ec38fdabc8a1872b563effa8574a7f8f85dc6bde465c368f1bf5@172.16.0.12:30303" -] - -[account] -password = ["/home/parity/parity/validator.pwd"] - -[mining] -reseal_on_txs = "none" - -[secretstore] -disable = true diff --git a/networks/secret-store/config/chain.json b/networks/secret-store/config/chain.json index 818c469..2e0bc84 100644 --- a/networks/secret-store/config/chain.json +++ b/networks/secret-store/config/chain.json @@ -20,7 +20,7 @@ "params": { "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", - "networkID": "0x2324", + "networkID": "0x2325", "gasLimitBoundDivisor": "0x400", "eip140Transition": 0, "eip211Transition": 0, diff --git a/networks/spree/authorities/validator0.json b/networks/spree/authorities/validator0.json new file mode 100644 index 0000000..15d6d06 --- /dev/null +++ b/networks/spree/authorities/validator0.json @@ -0,0 +1,22 @@ +{ + "id": "0902d04b-f26e-5c1f-e3ae-78d2c1cb16e7", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "6a829fe7bc656d85f6c2e9fd21784952" + }, + "ciphertext": "1bfec0b054a648af8fdd0e85662206c65a4af0ed15fede4ad41ca9ab7b504ce2", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "95f96b5ee22dd537e06076eb8d7078eb7275d29af935782fe476696b11be50e5" + }, + "mac": "4af2215c3cd9447a5b0512d7d1c3ea5a4435981e1c8f48bf71d7a49c0e5b4986" + }, + "address": "00bd138abd70e2f00903268f3db08f2d25677c9e", + "name": "Validator0", + "meta": "{}" +} diff --git a/networks/spree/authorities/validator0.pwd b/networks/spree/authorities/validator0.pwd new file mode 100644 index 0000000..ce118da --- /dev/null +++ b/networks/spree/authorities/validator0.pwd @@ -0,0 +1 @@ +node0 diff --git a/networks/spree/authorities/validator1.json b/networks/spree/authorities/validator1.json new file mode 100644 index 0000000..cdf3b7a --- /dev/null +++ b/networks/spree/authorities/validator1.json @@ -0,0 +1,22 @@ +{ + "id": "e854acbe-e6b2-e812-9f84-7b0945a1f14f", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "1b90ae52dcc1bc285ae3846d0ca9be53" + }, + "ciphertext": "b80f21bfb2029dafc89c36c6838e7a9e711ee13ec3e6900c3b097e45ae2ece7c", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "d823ab988002888a19336ab6650b83a4c536b42612148c9c5337ec4d92e981d1" + }, + "mac": "f8d1e53f4be85b0f77aa02bfe08b93eacdef74995822a59ddaea0497a69318af" + }, + "address": "00aa39d30f0d20ff03a22ccfc30b7efbfca597c2", + "name": "Validator1", + "meta": "{}" +} diff --git a/networks/spree/authorities/validator1.pwd b/networks/spree/authorities/validator1.pwd new file mode 100644 index 0000000..f50c4f2 --- /dev/null +++ b/networks/spree/authorities/validator1.pwd @@ -0,0 +1 @@ +node1 diff --git a/networks/spree/authorities/validator2.json b/networks/spree/authorities/validator2.json new file mode 100644 index 0000000..31dc1c2 --- /dev/null +++ b/networks/spree/authorities/validator2.json @@ -0,0 +1,22 @@ +{ + "id": "26ef5e07-4494-52b5-653f-a982ac907807", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "53addf73788522f6d5bf73abb0e0b8da" + }, + "ciphertext": "88c1013308cff929825e5da57ceaf15ae86e656165bcb2de3b06b24985358af6", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "ab8efcf7ee2c368eced8982b22328d862ea0c15307ce6ccd5994fae5a9b13244" + }, + "mac": "c93ca54145b4f21b62c422247609d0b891149f0d9752f6fe9ef60421f10bad6c" + }, + "address": "002e28950558fbede1a9675cb113f0bd20912019", + "name": "Validator2", + "meta": "{}" +} diff --git a/networks/spree/authorities/validator2.pwd b/networks/spree/authorities/validator2.pwd new file mode 100644 index 0000000..6810417 --- /dev/null +++ b/networks/spree/authorities/validator2.pwd @@ -0,0 +1 @@ +node2 diff --git a/networks/spree/config/chain.json b/networks/spree/config/chain.json index 3c11fe4..9208fad 100644 --- a/networks/spree/config/chain.json +++ b/networks/spree/config/chain.json @@ -1,7 +1,21 @@ { "name": "spree", "engine": { - "instantSeal": null + "authorityRound": { + "params": { + "stepDuration": "1", + "validators": { + "list": [ + "0x00bd138abd70e2f00903268f3db08f2d25677c9e", + "0xf4a2dbd5d67ef3019a7e4b188b92128c86d76bf9", + "0xcdbe5f61fac89e2cfcfa3727805d5cb8bc4f9afd" + ] + }, + "validateScoreTransition": 1000000000, + "validateStepTransition": 1500000000, + "maximumUncleCount": 1000000000 + } + } }, "params": { "gasLimitBoundDivisor": "0x0400", @@ -9,31 +23,26 @@ "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", "networkID": "0x2324", - "registrar": "0x0000000000000000000000000000000000001337", - "eip150Transition": "0x0", - "eip160Transition": "0x0", - "eip161abcTransition": "0x0", - "eip161dTransition": "0x0", - "eip155Transition": "0x0", - "eip98Transition": "0x7fffffffffffff", - "eip86Transition": "0x7fffffffffffff", - "maxCodeSize": 24576, - "maxCodeSizeTransition": "0x0", "eip140Transition": "0x0", "eip211Transition": "0x0", "eip214Transition": "0x0", "eip658Transition": "0x0", - "wasmActivationTransition": "0x0" + "wasmActivationTransition": "0x0", + "eip145Transition": "0x0", + "eip1014Transition": "0x0", + "eip1052Transition": "0x0", + "eip1283Transition": "0x0", + "kip4Transition": "0x0", + "kip6Transition": "0x0" }, "genesis": { "seal": { - "generic": "0x0" + "authorityRound": { + "step": "0x0", + "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } }, "difficulty": "0x20000", - "author": "0x0000000000000000000000000000000000000000", - "timestamp": "0x00", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "extraData": "0x", "gasLimit": "0x165A0BC00" }, "accounts": { diff --git a/networks/spree/config/config.toml b/networks/spree/config/config.toml index 215fd8c..ab4e6e9 100644 --- a/networks/spree/config/config.toml +++ b/networks/spree/config/config.toml @@ -1,18 +1,17 @@ -# Users config file in users.toml -# This configuration file can be used for either Alice, Bob or Charlie - [parity] -chain = "/home/parity/parity/config/chain.json" +chain = "/home/parity/config/chain.json" [rpc] -port = 8545 interface = "0.0.0.0" cors = ["all"] hosts = ["all"] -apis = ["all"] - -[mining] -engine_signer = "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e" +apis = ["web3", "eth", "net", "parity", "traces", "rpc", "personal", "parity_accounts", "signer", "parity_set"] [account] -password = ["/home/parity/parity/validator.pwd"] \ No newline at end of file +password = ["/home/parity/validator.pwd"] + +[mining] +engine_signer = "0x00bd138abd70e2f00903268f3db08f2d25677c9e" +reseal_on_txs = "none" +force_sealing = true +reseal_min_period = 500 diff --git a/networks/spree/keys/master0.json b/networks/spree/keys/master0.json new file mode 100644 index 0000000..51c8c83 --- /dev/null +++ b/networks/spree/keys/master0.json @@ -0,0 +1,21 @@ +{ + "id": "0d1533e9-dd7a-a838-68dc-36ddc025c1ab", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "acbabbab8eab2b952ad3cf2bd1aab0ca" + }, + "ciphertext": "134b54d057c3c0a9ac08b5eae36c46ab8dd45774215ce860afaeb4e8e50c927d", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "6f9e3ebd99b24becad3e8f773f44df8397cad68694abf7651880528d9552bfe7" + }, + "mac": "f8939019ec29b46694b5ac07fdf971ec740ca4de23e7ae84a1239f54c617f7d9" + }, + "address": "6b0c56d1ad5144b4d37fa6e27dc9afd5c2435c3b", + "name": "master0" +} diff --git a/networks/spree/keys/master1.json b/networks/spree/keys/master1.json new file mode 100644 index 0000000..5c78953 --- /dev/null +++ b/networks/spree/keys/master1.json @@ -0,0 +1,21 @@ +{ + "id": "76d1dcd3-0c3b-24c8-0875-78e3cc151659", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "6cbc68e1c87f82cefc954217cec45d64" + }, + "ciphertext": "a0f97cd495dbe38dc6fa13c23a7cc15a6abc75b894827bd2729a72bc3a1ec92d", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "b7704b289ced489bf6da93f6d335537763d3cc68460509321a73e50b185685de" + }, + "mac": "881850b5ce7709a7fd5ea923d97f77f0bd8717f054c44d35104cafc78d21813c" + }, + "address": "0011598de1016a350ad719d23586273804076774", + "name": "master1" +} diff --git a/networks/spree/node0.network.key b/networks/spree/node0.network.key new file mode 100644 index 0000000..4ca292b --- /dev/null +++ b/networks/spree/node0.network.key @@ -0,0 +1 @@ +b3244c104fb56d28d3979f6cd14a8b5cf5b109171d293f4454c97c173a9f9374 diff --git a/networks/spree/node1.network.key b/networks/spree/node1.network.key new file mode 100644 index 0000000..0eb7d3b --- /dev/null +++ b/networks/spree/node1.network.key @@ -0,0 +1 @@ +c07b4807e704dfff975d82fc807a3da7947838379007b49c51f6a04faf4cdea8 diff --git a/networks/spree/node2.network.key b/networks/spree/node2.network.key new file mode 100644 index 0000000..224e330 --- /dev/null +++ b/networks/spree/node2.network.key @@ -0,0 +1 @@ +d8bf44e2b69604bde8c84c4b403114f4410dc4f57d80e026b24b8f1af70d5633