From 9988c8f63dfd12e457c8c27d54256656a4450ebb Mon Sep 17 00:00:00 2001 From: Pierre Martin Date: Sun, 1 Jul 2018 13:34:43 +0100 Subject: [PATCH] Initial commit. --- .gitignore | 0 README.md | 36 + boot.key | 1 + docker-compose.yml | 80 ++ genesis.json | 825 ++++++++++++++++++ ...d4e623d10f9fba5db95830f7d3839406c6af2.json | 21 + ...f2ac550a1b4e2280d04c21cea7ebd822934b5.json | 21 + ...1ef87e392377ec08e7c08eb105ef5448eced5.json | 21 + ...2b7a2355d6fecc4b5c0b6bd44cc31df247a2e.json | 21 + ...da56215b167893e80b4fe645ba6d5bab767de.json | 21 + ...306090abab3a6e1400e9345bc60c78a8bef57.json | 21 + ...0a553fc93768f612722bb8c2ec78ac90b3bbc.json | 21 + ...aea9a577a9b44299b9c15c88cf3087f3b5544.json | 21 + ...df4076b8f3a5357c5e395ab970b5b54098fef.json | 21 + ...f52151ebef6c7334fad080c5704d77216b732.json | 21 + scripts/bootnode.sh | 5 + scripts/functions.sh | 15 + scripts/node.sh | 23 + scripts/sealer.sh | 21 + 19 files changed, 1216 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 boot.key create mode 100644 docker-compose.yml create mode 100644 genesis.json create mode 100644 keystore/0x0d1d4e623d10f9fba5db95830f7d3839406c6af2.json create mode 100644 keystore/0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5.json create mode 100644 keystore/0x2191ef87e392377ec08e7c08eb105ef5448eced5.json create mode 100644 keystore/0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e.json create mode 100644 keystore/0x5aeda56215b167893e80b4fe645ba6d5bab767de.json create mode 100644 keystore/0x627306090abab3a6e1400e9345bc60c78a8bef57.json create mode 100644 keystore/0x6330a553fc93768f612722bb8c2ec78ac90b3bbc.json create mode 100644 keystore/0x821aea9a577a9b44299b9c15c88cf3087f3b5544.json create mode 100644 keystore/0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef.json create mode 100644 keystore/0xf17f52151ebef6c7334fad080c5704d77216b732.json create mode 100755 scripts/bootnode.sh create mode 100755 scripts/functions.sh create mode 100755 scripts/node.sh create mode 100755 scripts/sealer.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..2ef17c3 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# Ethereum Proof of Authority + +This repository is an example setup allowing an arbitrary number of sealer nodes to +participate a Proof of Authority (PoA) concensus over an Ethereum network. + +The provided genesis block defines a mining period of 5 seconds, and should allow +the network to systain production at this frequency without any issue. + +To start the example cluster, simply run `docker-compose up`. By default, only the +first three nodes defined in the addresses array will be allowed to seal. To allow a +new node to participate the network, that node needs to be proposed and voted in +by 50% + 1 node. To do this, you can run in sequence: + +```bash +docker-compose exec -T sealer-one geth --exec 'clique.propose("0x0d1d4e623d10f9fba5db95830f7d3839406c6af2", true)' attach +docker-compose exec -T sealer-two geth --exec 'clique.propose("0x0d1d4e623d10f9fba5db95830f7d3839406c6af2", true)' attach +``` + +At this point, the fourth node should be allowed to seal. To allow the fifth node to seal, +you can run the following commands: + +```bash +docker-compose exec -T sealer-one geth --exec 'clique.propose("0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e", true)' attach +docker-compose exec -T sealer-two geth --exec 'clique.propose("0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e", true)' attach +docker-compose exec -T sealer-four geth --exec 'clique.propose("0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e", true)' attach +``` + +At this point, the fifth node should start being able to seal blocks as well. + +At any time, you can retrieve the list of authorized sealers by running: + +```bash +docker-compose exec -T node geth --exec 'clique.getSigners()' attach +``` + +To vote a node out of the network, you can use the same commands as described before and simply replace `true` by false. diff --git a/boot.key b/boot.key new file mode 100644 index 0000000..95b596d --- /dev/null +++ b/boot.key @@ -0,0 +1 @@ +8d40c21d502a20bdcd20a1df0db339dece7ef4d42981b35f0f6bd9bf7cca167f diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a23d348 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,80 @@ +version: "3" + +services: + # The bootnode is the rendez-vous point for all other nodes. + bootnode: + image: ethereum/client-go:alltools-release-1.8 + restart: on-failure + hostname: bootstrap + ports: + - 30303:30303 + volumes: + - ./scripts:/scripts:ro + - ./boot.key:/boot.key:ro + - /etc/localtime:/etc/localtime:ro + command: /scripts/bootnode.sh + # The node container is our entry point to issue RPC commands + # but it's not sealing. + node: + image: ethereum/client-go:alltools-release-1.8 + restart: on-failure + links: [bootnode] + ports: + - 8544-8546:8544-8546 + volumes: + - ./scripts:/scripts:ro + - ./keystore:/keystore:ro + - ./genesis.json:/genesis.json:ro + - /etc/localtime:/etc/localtime:ro + command: /scripts/node.sh 0x627306090abab3a6e1400e9345bc60c78a8bef57 + # Sealer nodes are workers that commit blocks constantly. + sealer-one: + image: ethereum/client-go:alltools-release-1.8 + restart: on-failure + links: [bootnode] + volumes: + - ./scripts:/scripts:ro + - ./keystore:/keystore:ro + - ./genesis.json:/genesis.json:ro + - /etc/localtime:/etc/localtime:ro + command: /scripts/sealer.sh 0xf17f52151ebef6c7334fad080c5704d77216b732 + sealer-two: + image: ethereum/client-go:alltools-release-1.8 + restart: on-failure + links: [bootnode] + volumes: + - ./scripts:/scripts:ro + - ./keystore:/keystore:ro + - ./genesis.json:/genesis.json:ro + - /etc/localtime:/etc/localtime:ro + command: /scripts/sealer.sh 0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef + sealer-three: + image: ethereum/client-go:alltools-release-1.8 + restart: on-failure + links: [bootnode] + volumes: + - ./scripts:/scripts:ro + - ./keystore:/keystore:ro + - ./genesis.json:/genesis.json:ro + - /etc/localtime:/etc/localtime:ro + command: /scripts/sealer.sh 0x821aea9a577a9b44299b9c15c88cf3087f3b5544 + sealer-four: + image: ethereum/client-go:alltools-release-1.8 + restart: on-failure + links: [bootnode] + volumes: + - ./scripts:/scripts:ro + - ./keystore:/keystore:ro + - ./genesis.json:/genesis.json:ro + - /etc/localtime:/etc/localtime:ro + command: /scripts/sealer.sh 0x0d1d4e623d10f9fba5db95830f7d3839406c6af2 + sealer-five: + image: ethereum/client-go:alltools-release-1.8 + restart: on-failure + links: [bootnode] + volumes: + - ./scripts:/scripts:ro + - ./keystore:/keystore:ro + - ./genesis.json:/genesis.json:ro + - /etc/localtime:/etc/localtime:ro + command: /scripts/sealer.sh 0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e diff --git a/genesis.json b/genesis.json new file mode 100644 index 0000000..34d0c0b --- /dev/null +++ b/genesis.json @@ -0,0 +1,825 @@ +{ + "config": { + "chainId": 18021982, + "homesteadBlock": 1, + "eip150Block": 2, + "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155Block": 3, + "eip158Block": 3, + "byzantiumBlock": 4, + "clique": { + "period": 1, + "epoch": 30000 + } + }, + "nonce": "0x0", + "timestamp": "0x5bacab7b", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000821aea9a577a9b44299b9c15c88cf3087f3b5544c5fdf4076b8f3a5357c5e395ab970b5b54098feff17f52151ebef6c7334fad080c5704d77216b7320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x59a5380", + "difficulty": "0x1", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "alloc": { + "0000000000000000000000000000000000000000": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000001": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000002": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000003": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000004": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000005": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000006": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000007": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000008": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000009": { + "balance": "0x1" + }, + "000000000000000000000000000000000000000a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000000b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000000c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000000d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000000e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000000f": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000010": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000011": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000012": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000013": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000014": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000015": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000016": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000017": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000018": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000019": { + "balance": "0x1" + }, + "000000000000000000000000000000000000001a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000001b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000001c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000001d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000001e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000001f": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000020": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000021": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000022": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000023": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000024": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000025": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000026": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000027": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000028": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000029": { + "balance": "0x1" + }, + "000000000000000000000000000000000000002a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000002b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000002c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000002d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000002e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000002f": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000030": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000031": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000032": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000033": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000034": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000035": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000036": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000037": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000038": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000039": { + "balance": "0x1" + }, + "000000000000000000000000000000000000003a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000003b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000003c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000003d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000003e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000003f": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000040": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000041": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000042": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000043": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000044": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000045": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000046": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000047": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000048": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000049": { + "balance": "0x1" + }, + "000000000000000000000000000000000000004a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000004b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000004c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000004d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000004e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000004f": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000050": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000051": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000052": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000053": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000054": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000055": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000056": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000057": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000058": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000059": { + "balance": "0x1" + }, + "000000000000000000000000000000000000005a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000005b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000005c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000005d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000005e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000005f": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000060": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000061": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000062": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000063": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000064": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000065": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000066": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000067": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000068": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000069": { + "balance": "0x1" + }, + "000000000000000000000000000000000000006a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000006b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000006c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000006d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000006e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000006f": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000070": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000071": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000072": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000073": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000074": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000075": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000076": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000077": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000078": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000079": { + "balance": "0x1" + }, + "000000000000000000000000000000000000007a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000007b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000007c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000007d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000007e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000007f": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000080": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000081": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000082": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000083": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000084": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000085": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000086": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000087": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000088": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000089": { + "balance": "0x1" + }, + "000000000000000000000000000000000000008a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000008b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000008c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000008d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000008e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000008f": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000090": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000091": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000092": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000093": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000094": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000095": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000096": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000097": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000098": { + "balance": "0x1" + }, + "0000000000000000000000000000000000000099": { + "balance": "0x1" + }, + "000000000000000000000000000000000000009a": { + "balance": "0x1" + }, + "000000000000000000000000000000000000009b": { + "balance": "0x1" + }, + "000000000000000000000000000000000000009c": { + "balance": "0x1" + }, + "000000000000000000000000000000000000009d": { + "balance": "0x1" + }, + "000000000000000000000000000000000000009e": { + "balance": "0x1" + }, + "000000000000000000000000000000000000009f": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a0": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a1": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a2": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a3": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a4": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a5": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a6": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a7": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a8": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000a9": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000aa": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ab": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ac": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ad": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ae": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000af": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b0": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b1": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b2": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b3": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b4": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b5": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b6": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b7": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b8": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000b9": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ba": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000bb": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000bc": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000bd": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000be": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000bf": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c0": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c1": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c2": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c3": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c4": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c5": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c6": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c7": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c8": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000c9": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ca": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000cb": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000cc": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000cd": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ce": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000cf": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d0": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d1": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d2": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d3": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d4": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d5": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d6": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d7": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d8": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000d9": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000da": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000db": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000dc": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000dd": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000de": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000df": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e0": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e1": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e2": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e3": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e4": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e5": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e6": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e7": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e8": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000e9": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ea": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000eb": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ec": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ed": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ee": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ef": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f0": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f1": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f2": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f3": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f4": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f5": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f6": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f7": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f8": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000f9": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000fa": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000fb": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000fc": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000fd": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000fe": { + "balance": "0x1" + }, + "00000000000000000000000000000000000000ff": { + "balance": "0x1" + }, + "0d1d4e623d10f9fba5db95830f7d3839406c6af2": { + "balance": "0x1000000000000000000000000" + }, + "0f4f2ac550a1b4e2280d04c21cea7ebd822934b5": { + "balance": "0x1000000000000000000000000" + }, + "2191ef87e392377ec08e7c08eb105ef5448eced5": { + "balance": "0x1000000000000000000000000" + }, + "2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e": { + "balance": "0x1000000000000000000000000" + }, + "5aeda56215b167893e80b4fe645ba6d5bab767de": { + "balance": "0x1000000000000000000000000" + }, + "627306090abab3a6e1400e9345bc60c78a8bef57": { + "balance": "0x1000000000000000000000000" + }, + "6330a553fc93768f612722bb8c2ec78ac90b3bbc": { + "balance": "0x1000000000000000000000000" + }, + "821aea9a577a9b44299b9c15c88cf3087f3b5544": { + "balance": "0x1000000000000000000000000" + }, + "c5fdf4076b8f3a5357c5e395ab970b5b54098fef": { + "balance": "0x1000000000000000000000000" + }, + "f17f52151ebef6c7334fad080c5704d77216b732": { + "balance": "0x1000000000000000000000000" + } + }, + "number": "0x0", + "gasUsed": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" +} diff --git a/keystore/0x0d1d4e623d10f9fba5db95830f7d3839406c6af2.json b/keystore/0x0d1d4e623d10f9fba5db95830f7d3839406c6af2.json new file mode 100644 index 0000000..7ae3335 --- /dev/null +++ b/keystore/0x0d1d4e623d10f9fba5db95830f7d3839406c6af2.json @@ -0,0 +1,21 @@ +{ + "address": "0d1d4e623d10f9fba5db95830f7d3839406c6af2", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "d7025ed09cb5d283b2b8d0eee7a1775587eb9533ff6b0aebbf91d1d3fba547c6", + "cipherparams": { + "iv": "da538512f8f2034b14c42a985fe17985" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "2744d911c44965fccda9fbc542f3528d71f21358b322028c534b581338fb7d16" + }, + "mac": "6d73c223911698d41553afdc3da145386f4d2130f47ad33b2b9a2bc264243bd3" + }, + "id": "f3917213-7f3f-454f-967f-1c8367b72b91", + "version": 3 +} diff --git a/keystore/0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5.json b/keystore/0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5.json new file mode 100644 index 0000000..4363e62 --- /dev/null +++ b/keystore/0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5.json @@ -0,0 +1,21 @@ +{ + "address": "0f4f2ac550a1b4e2280d04c21cea7ebd822934b5", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "88172a2463e006a1b5e5309a82ea4c4a4326d363c7d318d500b1b760013f73e9", + "cipherparams": { + "iv": "ce9a25c4ae5131e56fab67b810fbb425" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "e27292d6937c81a1d944aa6ac6339eb0ac83c132b66574d686243e9acebc223f" + }, + "mac": "c98d3968ab2489f835eee1d5a468635cff1f2dc32d03552f004f9d2460dfffed" + }, + "id": "dd5ef219-a527-4eab-9c09-c2b530663fe6", + "version": 3 +} diff --git a/keystore/0x2191ef87e392377ec08e7c08eb105ef5448eced5.json b/keystore/0x2191ef87e392377ec08e7c08eb105ef5448eced5.json new file mode 100644 index 0000000..28a0bbd --- /dev/null +++ b/keystore/0x2191ef87e392377ec08e7c08eb105ef5448eced5.json @@ -0,0 +1,21 @@ +{ + "address": "2191ef87e392377ec08e7c08eb105ef5448eced5", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "ae6e05db11404707a090eb43f5f1e24059950da8eceadbf7b9e0043c54cc823b", + "cipherparams": { + "iv": "61cd011e45e9c3b2e637f1592c54eac3" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "a6c1131e8a00eeaa22e7ed191348e00348fcaa72ddc65f29b84bd2604efdde3f" + }, + "mac": "870c39b0894f625532dab4911f77bae30fefa9b78e002fbffeb33959e3b6b4f6" + }, + "id": "29b6140d-19a1-4397-b40d-4984201900c6", + "version": 3 +} diff --git a/keystore/0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e.json b/keystore/0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e.json new file mode 100644 index 0000000..597dd3f --- /dev/null +++ b/keystore/0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e.json @@ -0,0 +1,21 @@ +{ + "address": "2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "9a204016249b2107da9add5596d892593a750b6896da3e5aec01c1d2e0ccc5b6", + "cipherparams": { + "iv": "fdde572aa676f629ead8a93188533790" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "4ffe55eab0f0e92b0ab965727a7575080b3fbb656851a136f5775579708e8209" + }, + "mac": "273ddbe46e7f4ce5cdfd53348ee5004ac4c1652de67f93a802a08c991c134b2f" + }, + "id": "b993738d-0bbb-407e-a675-10c5937419f1", + "version": 3 +} diff --git a/keystore/0x5aeda56215b167893e80b4fe645ba6d5bab767de.json b/keystore/0x5aeda56215b167893e80b4fe645ba6d5bab767de.json new file mode 100644 index 0000000..24e3578 --- /dev/null +++ b/keystore/0x5aeda56215b167893e80b4fe645ba6d5bab767de.json @@ -0,0 +1,21 @@ +{ + "address": "5aeda56215b167893e80b4fe645ba6d5bab767de", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "b8b50d8357f1716b8a6f62bd8d4de0fbc818a95b91ef93ec95f6ddd2ac8d8525", + "cipherparams": { + "iv": "015c86a1b3dc883b9cf2cf9dba6df3a6" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "6903c3f32de230130fa44c56299c7a29e0ddf52ded00cdaa0f1a46e90b2caae2" + }, + "mac": "c5438d4b8e3bdaccb34c5416c034a7675a5bdf17b4c687c07d2504a56836e2df" + }, + "id": "0c7d8e40-018d-4cc8-9e26-921c1a255ab4", + "version": 3 +} diff --git a/keystore/0x627306090abab3a6e1400e9345bc60c78a8bef57.json b/keystore/0x627306090abab3a6e1400e9345bc60c78a8bef57.json new file mode 100644 index 0000000..6bb8dff --- /dev/null +++ b/keystore/0x627306090abab3a6e1400e9345bc60c78a8bef57.json @@ -0,0 +1,21 @@ +{ + "address": "627306090abab3a6e1400e9345bc60c78a8bef57", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "3e6a43b96f65278d8f619c213489fcc0ca384b41aa7304ce22edea7809c186d6", + "cipherparams": { + "iv": "afcde9fc4a9457d272a90e63aa2c1c56" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "f9b9e6c5ef44ce79260d08936569363044109142dffdadca459049f4306eeb41" + }, + "mac": "180a2629e469e03bfd90554416791bebea9bbdbb8d5f77d565ce960a88103f2e" + }, + "id": "6f0f17b9-739d-42cc-8b8c-8717cbba0b71", + "version": 3 +} diff --git a/keystore/0x6330a553fc93768f612722bb8c2ec78ac90b3bbc.json b/keystore/0x6330a553fc93768f612722bb8c2ec78ac90b3bbc.json new file mode 100644 index 0000000..d5dd9bd --- /dev/null +++ b/keystore/0x6330a553fc93768f612722bb8c2ec78ac90b3bbc.json @@ -0,0 +1,21 @@ +{ + "address": "6330a553fc93768f612722bb8c2ec78ac90b3bbc", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "6fdc76963ddd150a3449622c9ed9290b2be97f5710493865cd1069b82f74bf99", + "cipherparams": { + "iv": "d0801c2631e2b9a7ff0c4141419a253b" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "cfb71d36efcc3022cd1663df84cc4f298aa4d73f9261252106bbd08b31b3ca73" + }, + "mac": "789cacf3c52c957bd4aa874d3e1ae5fbc20a5b43e02ac00779a04b36cc9b418f" + }, + "id": "17163ff5-698b-41f1-a69e-faa12d7265d5", + "version": 3 +} diff --git a/keystore/0x821aea9a577a9b44299b9c15c88cf3087f3b5544.json b/keystore/0x821aea9a577a9b44299b9c15c88cf3087f3b5544.json new file mode 100644 index 0000000..a907709 --- /dev/null +++ b/keystore/0x821aea9a577a9b44299b9c15c88cf3087f3b5544.json @@ -0,0 +1,21 @@ +{ + "address": "821aea9a577a9b44299b9c15c88cf3087f3b5544", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "9bcf129b708e1fa124a196653a6b86b83c4df35c712dee951be01e2f9455d536", + "cipherparams": { + "iv": "328854b272ce74051851a80d44ba5a34" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "5729330f761c281c8488a19a1b6870117a8acd66447767ad31c0159244ac9fc1" + }, + "mac": "180be3907a0d75e3004f26395065547b5878d11397abd22423c7b94609544025" + }, + "id": "1498304d-a755-4ed4-a875-d8b95a0a401f", + "version": 3 +} diff --git a/keystore/0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef.json b/keystore/0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef.json new file mode 100644 index 0000000..15c1554 --- /dev/null +++ b/keystore/0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef.json @@ -0,0 +1,21 @@ +{ + "address": "c5fdf4076b8f3a5357c5e395ab970b5b54098fef", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "62d09b2444e405d9478a68f287de82810004290578d5b8a97ae6468472743869", + "cipherparams": { + "iv": "167a6d0901155c457ab8f40e65347936" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "40e9574d8c431748ca4a02fd5baa8394f070136b4110c18e7ac808061308249d" + }, + "mac": "9b0915ad078c9e49c936281805e2e6df9c5e47d601578a8ed32da04c67e3bea5" + }, + "id": "61938aff-6198-4853-a9d0-ccbe7724c372", + "version": 3 +} diff --git a/keystore/0xf17f52151ebef6c7334fad080c5704d77216b732.json b/keystore/0xf17f52151ebef6c7334fad080c5704d77216b732.json new file mode 100644 index 0000000..4486599 --- /dev/null +++ b/keystore/0xf17f52151ebef6c7334fad080c5704d77216b732.json @@ -0,0 +1,21 @@ +{ + "address": "f17f52151ebef6c7334fad080c5704d77216b732", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "71456f2e666518451bbcba03e402bed8d072e2d363a1c4d704e7dc061d328847", + "cipherparams": { + "iv": "69a4ae14c1e737ff881956ef76b7cd12" + }, + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "f9845fe8f6107b6c0c21c27f5e495bfc93fbd885902612ea10fd2d4e7eeb8d56" + }, + "mac": "e4c017299809cb989f8180cf35b194e52d27e34ffaa90bb2dc1c2d8d978a4eb9" + }, + "id": "abcd766d-7684-4da3-92e0-d83c26837c3c", + "version": 3 +} diff --git a/scripts/bootnode.sh b/scripts/bootnode.sh new file mode 100755 index 0000000..99db39c --- /dev/null +++ b/scripts/bootnode.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env ash +. ./scripts/functions.sh + +bootnode --nodekey /boot.key \ + --verbosity 1 diff --git a/scripts/functions.sh b/scripts/functions.sh new file mode 100755 index 0000000..9d5ff9e --- /dev/null +++ b/scripts/functions.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env ash + +function prepareDatadir { + datadir=$1 + etherbase=$2 + if [ ! -d $datadir/geth ] + then + geth --datadir $datadir \ + --etherbase $etherbase \ + --networkid "18021982" \ + --gasprice "0" \ + --targetgaslimit "0x59A5380" \ + init genesis.json + fi +} diff --git a/scripts/node.sh b/scripts/node.sh new file mode 100755 index 0000000..aa42ae8 --- /dev/null +++ b/scripts/node.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env ash +. ./scripts/functions.sh + +bootnode=$(getent hosts bootnode | awk '{print $1}') +datadir=/root/.ethereum +etherbase=$1 +addresses="0x627306090abab3a6e1400e9345bc60c78a8bef57,0xf17f52151ebef6c7334fad080c5704d77216b732,0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef,0x821aea9a577a9b44299b9c15c88cf3087f3b5544,0x0d1d4e623d10f9fba5db95830f7d3839406c6af2,0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e,0x2191ef87e392377ec08e7c08eb105ef5448eced5,0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5,0x6330a553fc93768f612722bb8c2ec78ac90b3bbc,0x5aeda56215b167893e80b4fe645ba6d5bab767de" + +mkdir -p $datadir/keystore +cp -R /keystore $datadir +prepareDatadir $datadir $etherbase + +geth --datadir $datadir \ + --etherbase $etherbase \ + --networkid "18021982" \ + --gasprice "0" \ + --targetgaslimit "0x59A5380" \ + --rpc --rpcaddr '0.0.0.0' --rpcport 8545 --rpccorsdomain '*' --rpcapi 'admin,db,eth,miner,net,web3,personal,txpool' \ + --ws --wsaddr '0.0.0.0' --wsport 8546 --wsorigins '*' \ + --bootnodes "enode://f94118749beb981da38b82ab6be7b00dc0082783d698080fd0ae45a2c3d42f1ce74cbb153ffcfb1379b64235605bfff43f85b112032ddd9685ad2ab88735e1b1@${bootnode}:30301" \ + --unlock $addresses \ + --password "/dev/null" \ + --verbosity 3 diff --git a/scripts/sealer.sh b/scripts/sealer.sh new file mode 100755 index 0000000..a040909 --- /dev/null +++ b/scripts/sealer.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env ash +source ./scripts/functions.sh + +bootnode=$(getent hosts bootnode | awk '{print $1}') +datadir=/root/.ethereum +etherbase=$1 + +mkdir -p $datadir/keystore +cp /keystore/$etherbase.json $datadir/keystore +prepareDatadir $datadir $etherbase + +geth --datadir $datadir \ + --etherbase $etherbase \ + --networkid "18021982" \ + --gasprice "0" \ + --targetgaslimit "0x59A5380" \ + --bootnodes "enode://f94118749beb981da38b82ab6be7b00dc0082783d698080fd0ae45a2c3d42f1ce74cbb153ffcfb1379b64235605bfff43f85b112032ddd9685ad2ab88735e1b1@${bootnode}:30301" \ + --unlock $etherbase \ + --password "/dev/null" \ + --verbosity 1 \ + --mine