Skip to content

dataspark-co/eth-pool-docker-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Ethereum Pool Docker infrastructure

Use the awesome Docker CE to get sammy007/open-ethereum-pool up and running quickly.

Instructions on how to run this project

  1. Install Docker. Please see official instructions.

  2. Install geth. Please see official instructions.

  3. Install screen and git.

  4. Clone this repository to local drive:

git clone https://github.com/valera-rozuvan/eth-pool-docker-infra.git
  1. Launch a node on the Ethereum mainnet network:
cd eth-pool-docker-infra/geth
./run-geth.sh
  1. Wait for the node to fully synchronize. To check run:
./attach-to-geth.sh

and then execute the JavaScript command eth.blockNumber. If you see a number close to the current Ethereum block number (see Etherscan to find out the current number), then your node is synced.

  1. Launch Redis container:
cd eth-pool-docker-infra/redis
./run-redis.sh
  1. Launch Pool container:
cd eth-pool-docker-infra/pool
./build-eth-pool-image.sh
./run-eth-pool.sh
  1. Build Pool UI web application. Locally clone the Open Ethereum Pool project, and follow the instructions to build the UI found in the README file.

  2. Transfer build UI app dist folder to server:

rsync -avz -e 'ssh' ./dist root@94.247.132.203:/root/dev/eth-pool-docker-infra/pool-ui

NOTE: Please modify the IP and paths according to your setup!

  1. Launch Pool UI container:
cd eth-pool-docker-infra/pool-ui
./build-pool-ui-image.sh
./run-pool-ui.sh
  1. Launch Pool Payouts module:
cd eth-pool-docker-infra/pool-payouts
./build-eth-pool-payouts-image.sh
./run-eth-pool-payouts.sh
  1. Additionally, you can run redis-commander to inspect the state of the Redis database. First install Node.js, and then install redis-commander. When done, you can use the shell scripts in the folder eth-pool-docker-infra/redis-cmd:
# to start:
./run-redis-cmd.sh

# to stop:
./stop-redis-cmd.sh

FAQ

  1. How to enable RPC access to geth from anywhere:
geth {{usual parameters}} --rpc --rpcport 13270 --rpcaddr "0.0.0.0" --rpccorsdomain "*"
  1. How to create an account using geth CLI:
geth --datadir ./data account new
  1. How to unlock an account when geth launches:
geth {{usual parameters}} --unlock "0xf5d6ecb770db5a3a9de21e2adc531befa6f2c551" --password passwd.txt

where passwd.txt is a text file containing the account's password.

  1. How to setup a private Ethereum test network:

We can permanently disable the built-in Ethereum mainnet bootnodes by commenting out (deleting) all of the enode URIs in the file params/bootnodes.go and rebuilding geth.

Create a genesis.json file with desirable blockchain initialization parameters. For example:

{
  "config": {
    "chainId": 847283914,
    "homesteadBlock": 0,
    "eip155Block": 0,
    "eip158Block": 0
  },
  "difficulty": "200000000",
  "gasLimit": "2100000",
  "alloc": {}
}

Initialize the private blockchain node:

geth --datadir ./data init ./genesis.json

Start up the node:

geth {{usual parameters}} --networkid 847283914
  1. How to launch a second geth node, and connect to your private network:

Create a copy of the folder eth-pool-docker-infra/geth (without the data folder, if it's located there). Initialize the blockchain, and then launch geth with the same command you used to launch the first private node, but use different parameters for port and rpcport:

geth {{usual parameters}} --port 42371 --rpcport 13271
  1. Summary. A full example of launching a private geth node (assuming all of the preparatory steps have been completed):
geth \
  --datadir ./data \
  --networkid 847283914 \
  --port 4237 \
  --rpc --rpcport 13270 --rpcaddr "0.0.0.0" --rpccorsdomain "*" \
  --unlock "0xf5d6ecb770db5a3a9de21e2adc531befa6f2c551" --password passwd.txt \
  --cache=1024

License

This project is licensed under the MIT License. See LICENSE for more details.

About

Open Ethereum Pool Docker infrastructure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages