Step 4: Start 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/

2.Run the following command for starting the sharder

../bin/start.b0sharder.sh

3.Wait till the Cassandra is started and the sharder is ready to listen to requests.

Here is a screenshot of sharder up and running:

4. 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 new terminal tab and start 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.

  • For a minimal working setup, at least run 1 sharder and 3 miners.

5. To run the miner containers in other three terminal tabs,first navigate to 0chain/docker.local/miner1 directory using

cd 0chain/docker.local/miner1/

6. Run the following command for starting the miner

../bin/start.b0miner.sh

Wait till the miner is ready to accept connections. Here is a screenshot of miner up and running.

7. 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.

  • For a minimal working setup, at least run 1 sharder and 3 miners.

Last updated