@@ -302,13 +302,14 @@ and "Specs" parameters under the ``OrdererOrgs`` header:
302
302
- Hostname: orderer
303
303
# -------------------------------------------------------
304
304
# "PeerOrgs" - Definition of organizations managing peer nodes
305
- # ------------------------------------------------------
305
+ # ------------------------------------------------------
306
306
PeerOrgs:
307
307
# -----------------------------------------------------
308
308
# Org1
309
309
# ----------------------------------------------------
310
310
- Name: Org1
311
311
Domain: org1.example.com
312
+ EnableNodeOUs: true
312
313
313
314
The naming convention for a network entity is as follows -
314
315
"{{.Hostname}}.{{.Domain}}". So using our ordering node as a
@@ -657,7 +658,7 @@ argument. This is our policy where we specify the required level of endorsement
657
658
for a transaction against this chaincode to be validated.
658
659
659
660
In the command below you’ll notice that we specify our policy as
660
- ``-P "OR ('Org0MSP.member ','Org1MSP.member ')" ``. This means that we need
661
+ ``-P "OR ('Org0MSP.peer ','Org1MSP.peer ')" ``. This means that we need
661
662
“endorsement” from a peer belonging to Org1 **OR ** Org2 (i.e. only one endorsement).
662
663
If we changed the syntax to ``AND `` then we would need two endorsements.
663
664
@@ -668,7 +669,7 @@ If we changed the syntax to ``AND`` then we would need two endorsements.
668
669
# be sure to replace the $CHANNEL_NAME environment variable if you have not exported it
669
670
# if you did not install your chaincode with a name of mycc, then modify that argument as well
670
671
671
- peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -v 1.0 -c ' {"Args":["init","a", "100", "b","200"]}' -P " OR ('Org1MSP.member ','Org2MSP.member ')"
672
+ peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -v 1.0 -c ' {"Args":["init","a", "100", "b","200"]}' -P " OR ('Org1MSP.peer ','Org2MSP.peer ')"
672
673
673
674
**Node.js **
674
675
@@ -682,7 +683,7 @@ If we changed the syntax to ``AND`` then we would need two endorsements.
682
683
# if you did not install your chaincode with a name of mycc, then modify that argument as well
683
684
# notice that we must pass the -l flag after the chaincode name to identify the language
684
685
685
- peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -l node -v 1.0 -c ' {"Args":["init","a", "100", "b","200"]}' -P " OR ('Org1MSP.member ','Org2MSP.member ')"
686
+ peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -l node -v 1.0 -c ' {"Args":["init","a", "100", "b","200"]}' -P " OR ('Org1MSP.peer ','Org2MSP.peer ')"
686
687
687
688
See the `endorsement
688
689
policies <http://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html> `__
@@ -793,7 +794,7 @@ What's happening behind the scenes?
793
794
794
795
- The instantiation also passes in an argument for the endorsement
795
796
policy. The policy is defined as
796
- ``-P "OR ('Org1MSP.member ','Org2MSP.member ')" ``, meaning that any
797
+ ``-P "OR ('Org1MSP.peer ','Org2MSP.peer ')" ``, meaning that any
797
798
transaction must be endorsed by a peer tied to Org1 or Org2.
798
799
799
800
- A query against the value of "a" is issued to ``peer0.org1.example.com ``. The
@@ -959,7 +960,7 @@ channel, use the following steps to interact with the **marbles02** chaincode:
959
960
# be sure to modify the $CHANNEL_NAME variable accordingly for the instantiate command
960
961
961
962
peer chaincode install -n marbles -v 1.0 -p github.com/chaincode/marbles02/go
962
- peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n marbles -v 1.0 -c ' {"Args":["init"]}' -P " OR ('Org0MSP.member ','Org1MSP.member ')"
963
+ peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n marbles -v 1.0 -c ' {"Args":["init"]}' -P " OR ('Org0MSP.peer ','Org1MSP.peer ')"
963
964
964
965
- Create some marbles and move them around:
965
966
0 commit comments