├── files ├── password │ └── pass.txt ├── keystore │ ├── UTC--2016-02-29T14-52-44.914646739Z--99429f64cf4d5837620dcc293c1a537d58729b68 │ ├── UTC--2016-02-29T14-52-46.400585045Z--ca247d7425a29c6645fa991f9151f994a830882d │ ├── UTC--2016-02-29T14-52-50.513483270Z--83042c0147acce98e35ed9ef52e6dfc5c67ef92e │ ├── UTC--2016-02-29T14-52-51.693207415Z--8ab7114ba0f7ca706af69f799588766c8426aa24 │ ├── UTC--2016-02-29T14-52-53.093803426Z--932d9e95e5d2cac02eebbe6763ab2c7b0a9d6a2f │ ├── UTC--2016-02-29T14-52-54.549724060Z--893c3f80d2a0375b3f00f856cf8a6775e4efc26a │ └── UTC--2016-02-29T14-52-55.760047216Z--b1d3073bcc45462a3b0dfe69902cdd12971efec9 ├── node1 │ └── UTC--2016-02-29T14-52-41.334222730Z--007ccffb7916f37f7aeef05e8096ecfbe55afc2f ├── node2 │ └── UTC--2016-02-29T14-52-49.151752132Z--276ecb88715a503b00d1f15af4c17dc051991667 ├── node3 │ └── UTC--2016-02-29T14-52-47.838345060Z--794f74c8916310d6a0009bb8a43a5acab59a58ad ├── genesis.json └── genesis-old.json ├── eth-netstats └── Dockerfile ├── monitored-geth-client ├── start.sh ├── Dockerfile └── app.json ├── docker-compose-standalone.yml ├── LICENSE ├── README.md ├── poa-custom-genesis.json └── docker-compose.yml /files/password/pass.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /eth-netstats/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8-alpine 2 | 3 | RUN apk add --update git 4 | 5 | RUN git clone https://github.com/cubedro/eth-netstats 6 | 7 | WORKDIR /eth-netstats 8 | 9 | RUN npm install 10 | RUN npm install -g grunt-cli 11 | RUN grunt 12 | 13 | EXPOSE 3000 14 | 15 | CMD ["npm", "start"] 16 | -------------------------------------------------------------------------------- /monitored-geth-client/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | cd /root/eth-net-intelligence-api 4 | perl -pi -e "s/XXX/$(hostname)/g" app.json 5 | /usr/bin/pm2 start ./app.json 6 | sleep 3 7 | geth --datadir=~/.ethereum/devchain init "/root/files/genesis.json" 8 | sleep 3 9 | BOOTSTRAP_IP=`getent hosts bootstrap | cut -d" " -f1` 10 | GETH_OPTS=${@/XXX/$BOOTSTRAP_IP} 11 | geth $GETH_OPTS 12 | -------------------------------------------------------------------------------- /monitored-geth-client/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ethereum/client-go 2 | 3 | RUN apk add --update git bash nodejs nodejs-npm perl 4 | 5 | RUN cd /root &&\ 6 | git clone https://github.com/cubedro/eth-net-intelligence-api &&\ 7 | cd eth-net-intelligence-api &&\ 8 | npm install &&\ 9 | npm install -g pm2 10 | 11 | ADD start.sh /root/start.sh 12 | ADD app.json /root/eth-net-intelligence-api/app.json 13 | RUN chmod +x /root/start.sh 14 | 15 | ENTRYPOINT /root/start.sh 16 | -------------------------------------------------------------------------------- /files/keystore/UTC--2016-02-29T14-52-44.914646739Z--99429f64cf4d5837620dcc293c1a537d58729b68: -------------------------------------------------------------------------------- 1 | {"address":"99429f64cf4d5837620dcc293c1a537d58729b68","Crypto":{"cipher":"aes-128-ctr","ciphertext":"335f5ae16a995fa6ee77a0c6b0543fad332860c6711abac8fd539ddc18ac0eb6","cipherparams":{"iv":"ed7e663329ca8ec06992a6a946124a21"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"bf03fa013f3a5129441d70a8b8329f86aa5f24f36b97f684067c14a5d16d2843"},"mac":"c71ad21fdb9947be1169cf50a04c6ac9a3c8e49d617d0f1f99c42371f1d739c3"},"id":"1e6f5cfb-998b-4a89-85ac-e7b17359657e","version":3} -------------------------------------------------------------------------------- /files/keystore/UTC--2016-02-29T14-52-46.400585045Z--ca247d7425a29c6645fa991f9151f994a830882d: -------------------------------------------------------------------------------- 1 | {"address":"ca247d7425a29c6645fa991f9151f994a830882d","Crypto":{"cipher":"aes-128-ctr","ciphertext":"507d95f8c71bac82e38ac3eadaae8a75a1047a006a3b86b01e11fd86ddb8868b","cipherparams":{"iv":"33a8a75337bc5f0a82773bca39288d70"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"3610909466cb668444af20e063a6dc466c18a215884666cbe49fc13f7145a44b"},"mac":"46803c752ad92155a2660aa018e2d7ebb979ae94f7b5c59afb5baca2abfc5594"},"id":"4ee27016-eb9e-46a5-86a5-8689b2855b14","version":3} -------------------------------------------------------------------------------- /files/keystore/UTC--2016-02-29T14-52-50.513483270Z--83042c0147acce98e35ed9ef52e6dfc5c67ef92e: -------------------------------------------------------------------------------- 1 | {"address":"83042c0147acce98e35ed9ef52e6dfc5c67ef92e","Crypto":{"cipher":"aes-128-ctr","ciphertext":"ae386ac1c250971ecdf1108a616b04fd0d7d773a35480fc6813b8718764827e8","cipherparams":{"iv":"aa36db6e050c18676bac99431b3693ee"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"af4b3c0480a35a062e3097b7efe081cffac8353fc0666a3df3c79a3c3aa70330"},"mac":"56509728b085aa52e3a693eddaa4c620f959687103e312120d7f651aceb12426"},"id":"3e9936cc-0fe4-4774-9d67-e278ae445cab","version":3} -------------------------------------------------------------------------------- /files/keystore/UTC--2016-02-29T14-52-51.693207415Z--8ab7114ba0f7ca706af69f799588766c8426aa24: -------------------------------------------------------------------------------- 1 | {"address":"8ab7114ba0f7ca706af69f799588766c8426aa24","Crypto":{"cipher":"aes-128-ctr","ciphertext":"c098e1e374eb0c96af66a2394b6e401a34bd1883f39c5d38547e5c06e014dfab","cipherparams":{"iv":"e4c4a7948d9c819de97c077b9485f969"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"e4d9cdd321e91d12f247b1effada3c8e41a44c1d62cf320d8cacec3dcd1b7792"},"mac":"188fc24a8102b8accf65c05990d14b5f3bd587870ff018ec0284b06d921f7878"},"id":"3e2c44e9-3477-4da6-a856-66b55c155df5","version":3} -------------------------------------------------------------------------------- /files/keystore/UTC--2016-02-29T14-52-53.093803426Z--932d9e95e5d2cac02eebbe6763ab2c7b0a9d6a2f: -------------------------------------------------------------------------------- 1 | {"address":"932d9e95e5d2cac02eebbe6763ab2c7b0a9d6a2f","Crypto":{"cipher":"aes-128-ctr","ciphertext":"dea16b63ebc5fc2813292b46e6b1c204bfda384d0096a3ece9fe17f82e30e4aa","cipherparams":{"iv":"6b27678367f0760cc33046f445b3e9df"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"781667c20eb364ac5f253f9c8484ad8626b0c4a5b42958907142e0944a9f0b70"},"mac":"1a1cb0ae6d3c38255eeef22d7cf0c7b4667fa3ef282f95160c814f9efe17cc86"},"id":"50f7c038-d9f3-42e6-bf52-24ea8ef1b550","version":3} -------------------------------------------------------------------------------- /files/keystore/UTC--2016-02-29T14-52-54.549724060Z--893c3f80d2a0375b3f00f856cf8a6775e4efc26a: -------------------------------------------------------------------------------- 1 | {"address":"893c3f80d2a0375b3f00f856cf8a6775e4efc26a","Crypto":{"cipher":"aes-128-ctr","ciphertext":"e822c7d65188a4a34b33a6b39ad929543131255584f7a967229d85f5bda05973","cipherparams":{"iv":"0604cbe66fe8a06107f8c2058ba56f9a"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"48982da8b602d6d8606150e5d8de7526b46658dafce1c034281da3b477e9519d"},"mac":"4d79541dcaffd88b058ac53c0142dd464b9b62af86e9efa4779289a42d6b7ca6"},"id":"2cb29581-8f6a-4cbb-b7c8-5046dc4327d4","version":3} -------------------------------------------------------------------------------- /files/keystore/UTC--2016-02-29T14-52-55.760047216Z--b1d3073bcc45462a3b0dfe69902cdd12971efec9: -------------------------------------------------------------------------------- 1 | {"address":"b1d3073bcc45462a3b0dfe69902cdd12971efec9","Crypto":{"cipher":"aes-128-ctr","ciphertext":"82877be41ac5baf6e85a666930aaf16fb4c5c854c637c5137cc5b908b2892f01","cipherparams":{"iv":"0ad236df3b198635b3c629c43c75844d"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"6d3394dd4bb8070ccd19273aee2ed258f876abf9c01b37b911f05c831b313c95"},"mac":"eb216974a40298cfca4d2c677364068a81a94c7f62fc44c29e5fc2200c3c3f3f"},"id":"885fd57f-3a07-42e0-8f05-85da3c46664d","version":3} -------------------------------------------------------------------------------- /files/node1/UTC--2016-02-29T14-52-41.334222730Z--007ccffb7916f37f7aeef05e8096ecfbe55afc2f: -------------------------------------------------------------------------------- 1 | {"address":"007ccffb7916f37f7aeef05e8096ecfbe55afc2f","Crypto":{"cipher":"aes-128-ctr","ciphertext":"44600de3be08153de243f0de344b9841c774a2fcd5b7f3406b9ea9a42c8be97b","cipherparams":{"iv":"9ca680df904bc0138d2d52f9c432a797"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"a6524c4ef60060476f2e47dea7f5945aac8159019d3bf5275a683c1970d03c40"},"mac":"4daf73bc6da7f75beb9a8ea28896c5f1f074fb8cd54880fa9a4e34700dc0ee00"},"id":"2615dd6a-6d73-4b05-a02d-257b0fd28d3a","version":3} -------------------------------------------------------------------------------- /files/node2/UTC--2016-02-29T14-52-49.151752132Z--276ecb88715a503b00d1f15af4c17dc051991667: -------------------------------------------------------------------------------- 1 | {"address":"276ecb88715a503b00d1f15af4c17dc051991667","Crypto":{"cipher":"aes-128-ctr","ciphertext":"ad828d3ded808a62e523b2b487173474c6d73e1b6b9a47727bbff1848eebcc21","cipherparams":{"iv":"86e30a073376d28535eedab7cd5b7526"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"48e65dd40a9c763a8d6591f0c62765112e27f81ffbbd2cd95312bf7350463f73"},"mac":"4a437326562841c859de122979004577afd5fbeb59c0c7cf5f26e2b768f7db33"},"id":"ee231f16-afef-4406-b0a3-0371449c5a73","version":3} -------------------------------------------------------------------------------- /files/node3/UTC--2016-02-29T14-52-47.838345060Z--794f74c8916310d6a0009bb8a43a5acab59a58ad: -------------------------------------------------------------------------------- 1 | {"address":"794f74c8916310d6a0009bb8a43a5acab59a58ad","Crypto":{"cipher":"aes-128-ctr","ciphertext":"38eb242cc1146829ca1857d21b9490a49e872223b8b6242fe111ad6a23cc1859","cipherparams":{"iv":"aef1cf480b73714d6dc2050df5c29a55"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"21c6dd11c2196cd6ad18f9dfc3d65e4621fb59ae4ac17905f3e0541d84dbc9c5"},"mac":"ea633193668c12df21e18f99ea1f6a015c07614d98950fd8c0f083e8e1d82a0a"},"id":"113165af-bf7b-45b3-b467-fd7eab5a5224","version":3} -------------------------------------------------------------------------------- /monitored-geth-client/app.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "node-app", 4 | "script": "app.js", 5 | "log_date_format": "YYYY-MM-DD HH:mm Z", 6 | "merge_logs": false, 7 | "watch": false, 8 | "max_restarts": 10, 9 | "exec_interpreter": "node", 10 | "exec_mode": "fork_mode", 11 | "env": { 12 | "NODE_ENV": "production", 13 | "RPC_HOST": "localhost", 14 | "RPC_PORT": "8545", 15 | "LISTENING_PORT": "30303", 16 | "INSTANCE_NAME": "XXX", 17 | "WS_SERVER": "ws://netstats:3000", 18 | "WS_SECRET": "eth-net-stats-secret", 19 | "VERBOSITY": 2 20 | } 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /docker-compose-standalone.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | geth: 4 | image: ethereum/client-go 5 | command: --datadir=/root/.ethereum/devchain --nodekeyhex=091bd6067cb4612df85d9c1ff85cc47f259ced4d4cd99816b14f35650f59c322 --rpcapi "db,personal,eth,net,web3" --rpccorsdomain='*' --networkid=1234 --rpc --rpcaddr="0.0.0.0" init=/root/files/genesis.json --mine 6 | volumes: 7 | - ./files/password:/root/files/password:ro 8 | - ./files/genesis.json:/root/files/genesis.json:ro 9 | - ./files/keystore:/root/.ethereum/devchain/keystore:rw 10 | ports: 11 | - "30303:30303" 12 | - "30303:30303/udp" 13 | - "8545:8545" 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2016 Capgemini 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /files/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "chainId": 1212, 4 | "homesteadBlock": 0, 5 | "eip150Block": 0, 6 | "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", 7 | "eip155Block": 0, 8 | "eip158Block": 0, 9 | "byzantiumBlock": 4, 10 | "constantinopleBlock": 5, 11 | "clique": { 12 | "period": 5, 13 | "epoch": 30000 14 | } 15 | }, 16 | "nonce": "0x0", 17 | "timestamp": "0x5c8101f3", 18 | "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000007ccffb7916f37f7aeef05e8096ecfbe55afc2f276ecb88715a503b00d1f15af4c17dc051991667794f74c8916310d6a0009bb8a43a5acab59a58ad0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 19 | "gasLimit": "0x47b760", 20 | "difficulty": "0x1", 21 | "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", 22 | "coinbase": "0x0000000000000000000000000000000000000000", 23 | "alloc": { 24 | "0x007ccffb7916f37f7aeef05e8096ecfbe55afc2f": { 25 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 26 | }, 27 | "0x276ecb88715a503b00d1f15af4c17dc051991667": { 28 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 29 | }, 30 | "0x794f74c8916310d6a0009bb8a43a5acab59a58ad": { 31 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 32 | }, 33 | "0x1ada7bfb08ecde0d2dcc7170243ec759afd1f090": { 34 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 35 | } 36 | 37 | }, 38 | "number": "0x0", 39 | "gasUsed": "0x0", 40 | "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" 41 | } 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Poa-Blockchain-Docker-Compose-env 4 | 5 | [![N|Solid](https://i.imgur.com/DeFxZfP.png)](https://www.linkedin.com/in/chamsddine-bouzaine-44742060/) 6 | 7 | 8 | 9 | # Ethereum Docker 10 | 11 | Get started creating Ethereum development and multi-node clusters 12 | rapidly using Docker. 13 | 14 | We provide full Ethereum test nodes (using the [Ethereum Go client](https://github.com/ethereum/go-ethereum) with all APIs enabled by default as well as a monitoring dashboard (for the cluster version) provided 15 | via [Netstats](https://github.com/cubedro/eth-netstats). 16 | 17 | 18 | # Getting started 19 | 20 | ## 1. Installing 21 | 22 | ### 1. Ethereum Cluster with netstats monitoring 23 | 24 | To run an Ethereum Docker cluster run the following: 25 | 26 | ``` 27 | $ docker-compose up -d 28 | ``` 29 | 30 | By default this will create: 31 | 32 | * 1 Ethereum Bootstrapped container 33 | * 3 Ethereum container (which connects to the bootstrapped container on launch) 34 | * 1 Netstats container (with a Web UI to view activity in the cluster) 35 | 36 | To access the Netstats Web UI: 37 | 38 | ``` 39 | open http://$(docker-machine ip default):3000 40 | ``` 41 | 42 | ### 1.3. Test accounts ready for use 43 | 44 | As part of the bootstrapping process we bootstrap 10 Ethereum accounts for 45 | use only 3 are pre pre-filled with 20 Ether for use in transactions by default. 46 | 47 | If you want to change the amount of Ether for those accounts 48 | See `files/genesis.json`. 49 | 50 | ## 2. Interact with geth 51 | 52 | To get attached to the `geth` JavaScript console on the node you can run the following 53 | ``` 54 | docker exec -it {"CONTAINER ID"} geth attach ipc://root/.ethereum/devchain/geth.ipc 55 | ``` 56 | See the [Javascript Runtime](https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console) docs for more. 57 | -------------------------------------------------------------------------------- /poa-custom-genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "chainId": 1212, 4 | "homesteadBlock": 1, 5 | "eip150Block": 2, 6 | "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", 7 | "eip155Block": 0, 8 | "eip158Block": 0, 9 | "byzantiumBlock": 4, 10 | "constantinopleBlock": 5, 11 | "clique": { 12 | "period": 5, 13 | "epoch": 30000 14 | } 15 | }, 16 | "nonce": "0x0", 17 | "timestamp": "0x5c768de3", 18 | "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000007ccffb7916f37f7aeef05e8096ecfbe55afc2f99429f64cf4d5837620dcc293c1a537d58729b68ca247d7425a29c6645fa991f9151f994a830882d794f74c8916310d6a0009bb8a43a5acab59a58ad276ecb88715a503b00d1f15af4c17dc05199166783042c0147acce98e35ed9ef52e6dfc5c67ef92e932d9e95e5d2cac02eebbe6763ab2c7b0a9d6a2f8ab7114ba0f7ca706af69f799588766c8426aa24893c3f80d2a0375b3f00f856cf8a6775e4efc26ab1d3073bcc45462a3b0dfe69902cdd12971efec90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 19 | "gasLimit": "0x47b760", 20 | "difficulty": "0x1", 21 | "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", 22 | "coinbase": "0x0000000000000000000000000000000000000000", 23 | "alloc": { 24 | "007ccffb7916f37f7aeef05e8096ecfbe55afc2f": { 25 | "balance": "20000000000000000000" 26 | }, 27 | "99429f64cf4d5837620dcc293c1a537d58729b68": { 28 | "balance": "20000000000000000000" 29 | }, 30 | "ca247d7425a29c6645fa991f9151f994a830882d": { 31 | "balance": "20000000000000000000" 32 | }, 33 | "794f74c8916310d6a0009bb8a43a5acab59a58ad": { 34 | "balance": "20000000000000000000" 35 | }, 36 | "276ecb88715a503b00d1f15af4c17dc051991667": { 37 | "balance": "20000000000000000000" 38 | }, 39 | "83042c0147acce98e35ed9ef52e6dfc5c67ef92e": { 40 | "balance": "20000000000000000000" 41 | }, 42 | "8ab7114ba0f7ca706af69f799588766c8426aa24": { 43 | "balance": "20000000000000000000" 44 | }, 45 | "932d9e95e5d2cac02eebbe6763ab2c7b0a9d6a2f": { 46 | "balance": "20000000000000000000" 47 | }, 48 | "893c3f80d2a0375b3f00f856cf8a6775e4efc26a": { 49 | "balance": "20000000000000000000" 50 | }, 51 | "b1d3073bcc45462a3b0dfe69902cdd12971efec9": { 52 | "balance": "20000000000000000000" 53 | } 54 | }, 55 | "number": "0x0", 56 | "gasUsed": "0x0", 57 | "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" 58 | } 59 | -------------------------------------------------------------------------------- /files/genesis-old.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "chainId": 1212, 4 | "homesteadBlock": 1, 5 | "eip150Block": 2, 6 | "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", 7 | "eip155Block": 0, 8 | "eip158Block": 0, 9 | "byzantiumBlock": 4, 10 | "constantinopleBlock": 5, 11 | "clique": { 12 | "period": 5, 13 | "epoch": 30000 14 | } 15 | }, 16 | "nonce": "0x0", 17 | "timestamp": "0x5c8101f3", 18 | "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000007ccffb7916f37f7aeef05e8096ecfbe55afc2f276ecb88715a503b00d1f15af4c17dc051991667794f74c8916310d6a0009bb8a43a5acab59a58ad83042c0147acce98e35ed9ef52e6dfc5c67ef92e893c3f80d2a0375b3f00f856cf8a6775e4efc26a8ab7114ba0f7ca706af69f799588766c8426aa24932d9e95e5d2cac02eebbe6763ab2c7b0a9d6a2f99429f64cf4d5837620dcc293c1a537d58729b68b1d3073bcc45462a3b0dfe69902cdd12971efec9ca247d7425a29c6645fa991f9151f994a830882d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 19 | "gasLimit": "0x47b760", 20 | "difficulty": "0x1", 21 | "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", 22 | "coinbase": "0x0000000000000000000000000000000000000000", 23 | "alloc": { 24 | "0x007ccffb7916f37f7aeef05e8096ecfbe55afc2f": { 25 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 26 | }, 27 | "0x276ecb88715a503b00d1f15af4c17dc051991667": { 28 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 29 | }, 30 | "0x794f74c8916310d6a0009bb8a43a5acab59a58ad": { 31 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 32 | }, 33 | "0x83042c0147acce98e35ed9ef52e6dfc5c67ef92e": { 34 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 35 | }, 36 | "0x893c3f80d2a0375b3f00f856cf8a6775e4efc26a": { 37 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 38 | }, 39 | "0x8ab7114ba0f7ca706af69f799588766c8426aa24": { 40 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 41 | }, 42 | "0x932d9e95e5d2cac02eebbe6763ab2c7b0a9d6a2f": { 43 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 44 | }, 45 | "0x99429f64cf4d5837620dcc293c1a537d58729b68": { 46 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 47 | }, 48 | "0xb1d3073bcc45462a3b0dfe69902cdd12971efec9": { 49 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 50 | }, 51 | "0xca247d7425a29c6645fa991f9151f994a830882d": { 52 | "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 53 | } 54 | }, 55 | "number": "0x0", 56 | "gasUsed": "0x0", 57 | "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" 58 | } 59 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "1" 2 | services: 3 | bootstrap: 4 | build: monitored-geth-client 5 | restart: on-failure 6 | container_name: bootstrap 7 | hostname: bootstrap 8 | links: 9 | - netstats 10 | entrypoint: /root/start.sh 11 | command: '--datadir=~/.ethereum/devchain --nodekeyhex=091bd6067cb4612df85d9c1ff85cc47f259ced4d4cd99816b14f35650f59c322 --syncmode "full" --rpcapi "db,personal,eth,net,web3,debug,admin" --rpccorsdomain="*" --networkid=1212 --rpc --rpcaddr="0.0.0.0" -rpcvhosts="*" --ws --wsaddr="0.0.0.0" --wsorigins="*"' 12 | volumes: 13 | - ./files/password:/root/files/password:ro 14 | - ./files/genesis.json:/root/files/genesis.json:ro 15 | - ./files/keystore:/root/.ethereum/devchain/keystore:rw 16 | - /etc/localtime:/etc/localtime:ro 17 | ports: 18 | - "30303:30303" 19 | - "30303:30303/udp" 20 | - "8545:8545" 21 | - "8546:8546" 22 | eth-miner1: 23 | build: monitored-geth-client 24 | restart: on-failure 25 | links: 26 | - bootstrap 27 | - netstats 28 | entrypoint: /root/start.sh 29 | volumes: 30 | - ./files/password/pass.txt:/root/files/password.txt:ro 31 | - ./files/genesis.json:/root/files/genesis.json:ro 32 | - ./files/node1:/root/.ethereum/devchain/keystore:rw 33 | - /etc/localtime:/etc/localtime:ro 34 | command: '--datadir=~/.ethereum/devchain --port 30311 --syncmode "full" --ws --rpccorsdomain="*" --networkid=1212 --rpc --bootnodes="enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@XXX:30303" --gasprice "0" --allow-insecure-unlock -unlock "0x007ccffb7916f37f7aeef05e8096ecfbe55afc2f" --password /root/files/password.txt --mine' 35 | ports: 36 | - "30311:30311" 37 | eth-miner2: 38 | build: monitored-geth-client 39 | restart: on-failure 40 | links: 41 | - bootstrap 42 | - netstats 43 | entrypoint: /root/start.sh 44 | volumes: 45 | - ./files/password/pass.txt:/root/files/password.txt:ro 46 | - ./files/genesis.json:/root/files/genesis.json:ro 47 | - ./files/node2:/root/.ethereum/devchain/keystore:rw 48 | - /etc/localtime:/etc/localtime:ro 49 | command: '--datadir=~/.ethereum/devchain --syncmode "full" --port 30312 --ws --rpccorsdomain="*" --networkid=1212 --rpc --bootnodes="enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@XXX:30303" --gasprice "0" --allow-insecure-unlock -unlock "0x276ecb88715a503b00d1f15af4c17dc051991667" --password /root/files/password.txt --mine' 50 | ports: 51 | - "30312:30312" 52 | eth-miner3: 53 | build: monitored-geth-client 54 | restart: on-failure 55 | container_name: eth-miner3 56 | links: 57 | - bootstrap 58 | - netstats 59 | entrypoint: /root/start.sh 60 | volumes: 61 | - ./files/password/pass.txt:/root/files/password.txt:ro 62 | - ./files/genesis.json:/root/files/genesis.json:ro 63 | - ./files/node3:/root/.ethereum/devchain/keystore:rw 64 | - /etc/localtime:/etc/localtime:ro 65 | command: '--datadir=~/.ethereum/devchain --syncmode "full" --port 30313 --ws --rpccorsdomain="*" --networkid=1212 --rpc --bootnodes="enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@XXX:30303" --gasprice "0" --allow-insecure-unlock -unlock "0x794f74c8916310d6a0009bb8a43a5acab59a58ad" --password /root/files/password.txt --mine' 66 | ports: 67 | - "30313:30313" 68 | netstats: 69 | build: eth-netstats 70 | restart: on-failure 71 | container_name: netstats 72 | environment: 73 | - WS_SECRET=eth-net-stats-secret 74 | volumes: 75 | - /etc/localtime:/etc/localtime:ro 76 | ports: 77 | - "3000:3000" 78 | --------------------------------------------------------------------------------