Trending Technology Machine Learning, Artificial Intelligent, Block Chain, IoT, DevOps, Data Science

Recent Post

Search

Thursday, 16 May 2019

Hyperledger Fabric Network Setup in Block Chain

Step 1/6 : Configure & Start Ordering Service


An Ordering service is configured and started for the network :
$ docker-compose [-f orderer.yml]...


Step 2/6 : Configure and Start Peer Nodes


A peer is configured and started for each Endorser or committer in the network :
$ peer node start ...


Step 3/6 : Install Chain code


Chaincode is installed onto each Endorsing Peer that needs to execute it :
$ Peer chaincode install ...


Join Channels


Peers that are permissioned can then join the channels they want to transact on :
$ peer channel join ...


Endorsement Policies


An endorsement policy describes the conditions by which a transaction can be endorsed. A transaction can only be considered valid if it has been endorsed according to its policy.
  • Each chaincode is deployed with an Endorsement policy
  • ESCC (Endorsement ChainCode) signs the proposal response on the endorsing peer
  • VSCC (Validation System Chaincode) validates the endorsements

Endorsement Policy Syntax




Instantiate the chaincode mycc on channel mychannel with the policy AND ('org1MSP.member')
Policy Syntax : EXPR(E[,E...])
         Where EXPR is either AND or OR and E is either a principal or nested EXPR

Principal Syntax : MSP.ROLE
         Supported roles are : member and admin
         Where is the MSP ID, and ROLE is either "member" or "admin"

N-out-of-K policy specification also possible (e.g., 3 out of 5 peers in the channel must endorse)

Endorsement Policy Examples

Examples of policies :

Request 1 signature from all three principals
 - AND ('Org1.member', 'Org2.member', 'Org3.member')

Request 1 signature from either one of the two principals
  - Or ('Org1.member', 'Org2.member')

Request either one signature from a member of the Org1 MSP or (1 signature from a member of the Org2 MSP and 1 signature from a member of the Org3 MSP)
  - Or('Org1.member', AND('Org2.member', 'Org3.member') )

Hyperledger Fabric : Additional Information






No comments:

Post a Comment