Steps for setting up sharders

  1. If you are sharder, create a config.yaml file in the directory as shown below:

    sharders:
      - n2n_ip: sharder1.abc.com # or localhost if you are configuring chain locally
        public_ip: sharder1.abc.com # or localhost if you are configuring chain locally
        port: 7171
        description: description # e.g. hi i'm sharder1.abc.com
  2. Create nodes.yaml, operational wallets, mpks and send the sharder information to the server.

    go run main.go generate-keys --signature_scheme bls0chain --miners 0 --sharder 1

Files generated with above steps:

  • nodes.yaml as below:

    sharders:
    - id: bfee96ce93b61b44ade080ac7199c594f4aff28d11e163d60d797d78e38a29ae
      public_key: 05f7272e07422c65d445c312e283be878b2c58455a22afc3b4b698563780ca23ba239cacc2993a9b492b1d63873fbc7c2f5598f30d8c15e6baf1fefbaadb3b9a
      private_key: e5d8d49d44ccb1fdcb62a5a369261e17cc61caeb2cffbbf563df65db41b05416
      n2n_ip: sharder1.abc.com
      public_ip: sharder1.abc.com
      port: 7171
      path: sharder01
      description: description
      set_index: 0
  • operational wallet b0snode1_keys.json inside ./keys folder as below:

    {"client_id":"bfee96ce93b61b44ade080ac7199c594f4aff28d11e163d60d797d78e38a29ae","client_key":"05f7272e07422c65d445c312e283be878b2c58455a22afc3b4b698563780ca23ba239cacc2993a9b492b1d63873fbc7c2f5598f30d8c15e6baf1fefbaadb3b9a","keys":[{"public_key":"05f7272e07422c65d445c312e283be878b2c58455a22afc3b4b698563780ca23ba239cacc2993a9b492b1d63873fbc7c2f5598f30d8c15e6baf1fefbaadb3b9a","private_key":"e5d8d49d44ccb1fdcb62a5a369261e17cc61caeb2cffbbf563df65db41b05416"}],"mnemonics":"top sun wage still snap female endless fame guilt gravity grow explain renew drip educate habit current what pumpkin eyebrow gentle same slide inherit","version":"1.0","date_created":"2023-03-25T17:45:52+01:00","nonce":0}

Generating Magicblock.

When all the activeset users have shared submitted their nodes info to the server using above steps, magicblock will get generated.

  • Use the run the below step to download the magicblock, dkg & initial-state files.

    go run main.go get-magicblock

With above command below files will get dowloaded from the magicblock server.

  • b0magicBlock.json file

  • initial-states.yaml to start sharder.

Conclusion

After following above steps below files are needs to be present on user server.

  • b0mnode1_keys.json

  • nodes.yaml

  • b0magicBlock.json

  • initial-states.yaml

Last updated