4

Hello I am new to both HyperLedger Fabric and composer.I got confused with two terms. one is user in HyperLedger Fabric and another is participant in HyperLedger Composer.We have a set of users(including one administrator) in each organization along with peers in crypto-config.yaml file.

  1. what is the roles and responsibilities of administrator user?
  2. What is the roles and responsibilities of other users in crypto-config file?
  3. It is said that a business network that is built using hyperledger composer can be deployed on hyperledger fabric network.What does business network contain and what does fabric network contain?
  4. Difference between chaincode in fabric and transaction logic(which is written in javascript) in composer?

2 Answers2

2
  1. Admin credentials are used to create PeerAdmin card in composer which in turn is responsible for starting composer over fabric using your bna file and issue identity.
  2. User is just extra set of credentials so that you will have some credentials initially to use the network. Later on you can issue new users using fabric CA.
  3. Business network is nothing but a sort of abstraction over fabric using composer. Business network is deployed using bna file which has model file, transaction logic file, ACL file or query file. Fabric network is nothing but set of peers communicating with each other.
  4. Chaincode is the smart contract which you directly deploy on fabric while the transaction logic used in composer is part of business network card which is deployed on fabric via composer. You cannot deploy standalone transaction logic on fabric, its deployed using composer with bna file, while chaincode you can deploy directly.
user9040429
  • 620
  • 1
  • 7
  • 22
0

As far as I know, participant in hyperledger composer is identical to user in hyperledger fabric. However, in hyperledger fabric tutorials, they are mainly for testing mode. Thus, examples which you do are using cryptogen tool. This tool creates fix number of credentials based on "User" in your crypto-config.yaml. For instance, in the example about commercial paper 1, cryptogen creates 2 credentials for Admin and User1. Then, Isabella uses User1 credential (you can see in detail in code of addtoWallet.js). In the code, Isabella copies credential from User1 for making transaction.

Hyperledger composer looks like an abstraction running above Hyperledger fabric. It is more flexible when it allows to create credentials easily. When you create a participant and give them permission to access business network, you are generating credentials for them.