A validating peer can be started in Hyperledger using the following command:
docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_PEER_ID=vp1 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_PEER_DISCOVERY_ROOTNODE=172.17.0.2:7051 hyperledger/fabric-peer peer node start
What is the command to start a non-validating peer?
You need to make use of
core.yaml
file. If you carefully readcore.yaml
file you will see the following lines,Or you could implement membership services and create a peer with
Non-validator
privilege level.This is what it says in
membersrvc.yaml
file,and the levels,
The following users are also available to register as non-validating peer in the same file,
You can also look at the asset management example app which bootstraps a non-validating peer and constructs fabric confidential transactions to deploy, invoke and query the chaincode.
using docker-compose to up peer using environment to override core.yaml -CORE_PEER_VALIDATOR_ENABLED = false
please do not only use docker run, docker-compose can set environments easily.