How to deploy a hyperledger-sawtooth network with

2019-04-02 07:06发布

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条回答
2楼-- · 2019-04-02 07:19

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.

查看更多
登录 后发表回答