Skip to content

0chain_start

hm90121 edited this page Jul 14, 2021 · 2 revisions

Starting the Sharder and Miner containers

To start all the miner and sharder containers navigate to the 0chain/docker.local/<miner/sharder|i> directories and run the start script. For example, let's run 1 sharder and 3 miners.

1 . Open four different terminal tabs and in the first terminal tab navigate to the 0chain/docker.local/sharder1 directory using

cd 0chain/docker.local/sharder1/
  1. Run the following command for starting the sharder
../bin/start.b0sharder.sh
  1. Wait till the Cassandra is started and the sharder is ready to listen to requests.

  2. Repeat steps 1 and 2 by changing the sharder1 directory to (sharder 2,3 etc) in new terminal tabs to start more sharders.

Notes :

  • Run each sharder on the new terminal tab and start the sharder before miners as they need the genesis magic block.
  • Run the command specified in step 2 by only navigating to sharder directories.
  • If you are not able to locate sharder directories, have a look at the Initialize the Miner and sharder directories section.
  1. To run the miner containers in the other three-terminal tabs, first navigate to 0chain/docker.local/miner1 directory using
cd 0chain/docker.local/miner1/
  1. Run the following command for starting the miner
../bin/start.b0miner.sh

Wait till the miner is ready to accept connections.

  1. Repeat steps 5 and 6 by changing the miner1 directory to (miner 2,3 etc) in new terminal tabs to start more miners.

Notes:

  • Run each miner on a new terminal tab
  • To avoid errors, run the command specified in step 6 by only navigating to miner directories.
  • If you are not able to locate miner directories,have a look at the Initialize the Miner and sharder directories section.