How to deploy a hyperledger-sawtooth network with multiple validators?

青春壹個敷衍的年華 提交于 2019-12-05 05:21:05

问题


I'm trying to configure a sawtooth network with at least 2 Validators and some Transaction Processors. I'm using Ubuntu 18.04 so only possible solution is using docker.

I searched entire day for a working example and still no luck. There is an example on the official website here but not working. The docker images versions is 1.1 which is weird, because there is no such version on docker hub. Furthermore it requires an image (hyperledger/sawtooth-poet-engine) which does not exist anywhere.

I know that the main validator should generate the keys and genesis block and the other validator[s] should use that artifacts. But what is the right configuration for second validator? How it can read the generated artifacts from first validator?

Thanks!

This is the config of first validator:

validator-0:
  image: hyperledger/sawtooth-validator:1.0
  container_name: sawtooth-validator-default-0
  expose:
    - 4004
  ports:
    - "4004:4004"
  entrypoint: "bash -c \"\
      sawadm keygen && \
      sawtooth keygen my_key && \
      sawset genesis -k /root/.sawtooth/keys/my_key.priv && \
      sawadm genesis config-genesis.batch && \
      sawtooth-validator -vv \
        --endpoint tcp://validator:8800 \
        --bind component:tcp://eth0:4004 \
        --bind network:tcp://eth0:8800 \
      \""

回答1:


You are using the Sawtooth 1.1 (the unreleased "nightly" build) with the released Sawtooth 1.0 software (the released "latest" build). You have 2 choices:

  1. Follow Sawooth 1.0 documentation and use a 1.0 .yaml file, such as https://sawtooth.hyperledger.org/docs/core/releases/latest/app_developers_guide/docker.html# and https://sawtooth.hyperledger.org/docs/core/releases/latest/app_developers_guide/sawtooth-default.yaml

  2. Upgrade to the "bleeding edge" unreleased Sawtooth 1.1 software at https://sawtooth.hyperledger.org/docs/core/releases/latest/sysadmin_guide/installation.html That is, you use this key and repository: $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 44FC67F19B2466EA $ sudo apt-add-repository "deb http://repo.sawtooth.me/ubuntu/nightly xenial universe" (Note: option 2 does not work yet because the unreleased Sawtooth 1.1 images have not been uploaded to Docker yet and are not available.)

The important point is to use the documentation that matches the release you have installed. Sorry for the confusion.



来源:https://stackoverflow.com/questions/52793943/how-to-deploy-a-hyperledger-sawtooth-network-with-multiple-validators

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!