Difference between users in hyperledger fabric and participants in hyperledger composer - hyperledger-fabric

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.
what is the roles and responsibilities of administrator user?
What is the roles and responsibilities of other users in crypto-config file?
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?
Difference between chaincode in fabric and transaction logic(which is written in javascript) in composer?

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.
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.
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.
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.

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.

Related

fabric sdk connection profile adding the new organisation and installing chaincode

I am using Hyperledger fabric in one of our project. I am using fabric sdk which acts like client to Hypereledger network and server for frontend. Now
Lets say, I am running the fabric network with 2 organisation, and i am hosting fabric sdkjs, i will call(middleware) which contains the connection.json to connect to hyperledger fabric network. Is it possible to add one more organisation third one to hyperledger fabric existing network. If its possible without stopping the network,do i need to update my connection.json of the middleware all the time if update the organsation. Means i need to stop the running farbric sdkjs middleware server, update connection.json then start it again.
Is it possible to install the chaincode to channel without been stop by hyper-ledger network.
Is there any support for Non fungible token ERC721 concept in hyperledger fabric.
#fama,
Next time if you would like to ask more than one question better ask separately in order to make it simple
Coming to your questions:
1) Ideally what so-called middleware (SDK App) should be per organization because you are dealing with crypto materials of a particular organization, if you planned to use one for all organizations then yes you have to update the latest organization details by stoping the middleware server
Some useful links for onboard nee organization https://developer.ibm.com/tutorials/cl-add-an-organization-to-your-hyperledger-fabric-blockchain/
2) Yes you do not need to stop consortium after you the onboard new organization you can do all operations based on policies
3) yes it has been supporting from 1.3 in beta stage but planned to support in full production-ready only in 2.0
Announced by Swetha from IBM on October 26, 2018
https://www.hyperledger.org/blog/2018/10/26/hyperledger-fabric-now-supports-ethereum

Is it possible to deploy chaincode in Hyperledger Composer Set Up?

Am working on Hyperledger composer.I have developed the Chaincode in Go language. Is it possible to deploy the Chaincode written in Go language on a Hyperledger Composer Environment? Am using the latest composer version:0.19.12. please guide..
I dont think that is possible. Hyperledger Composer interacts with the Javascript runtime and does not communicate in any way with the GO runtime.
Hyperledger Composer business networks are capable of invoking chaincode from TP functions in the business network. So you can get a business network to interact with your GO Chaincode. You would use the getNativeAPI method inside a business network to get access to the stub and then can then perform an invokeChaincode request on that stub.
Hyperledger Composer doesn't provide a Fabric network, it requires a fabric network to be deployed to (a business network is, at the end of the day, chaincode).

what different in chaincode (in golang) and composer create bna file

What are the differences between chaincode (in golang) and the bna file (created from hyperledger-composer)?.
And, how to add a peer into an existing hyperledger fabric network?.
This article can explain as a side-by-side (Golang and Composer model-driven approach) comparison -> https://blog.selman.org/2017/07/08/getting-started-with-blockchain-development/. The main difference is Hyperledger Composer is a set of abstractions, tools and APIs to model, build, integrate and deploy a blockchain solution (eg a business network for parties to transact on) to the blockchain network. Composer business network archives may be deployed to Hyperledger Fabric for execution.
As for your Fabric question - in order to add new peers to an existing organization you need to generate new certificates for your peers and sign them using the key of the root CA certs for the existing organizations. See this SO and links therein for more info -> Add Org or peer in Org dynamically in Hyperledger fabric

creating business network in composer to fabric

If we can build a business network in composer playground online(or) locally and then deploy network in fabric, make a REST call from an angular app (user facing) to connect to blockchain.
Do I still need to learn about the fabric implementation or its infrastructure, When composer has provided me with necessary toolings to work with blockchain.
What am I missing in this ?
ps:I am still in the early phase of learning hyperledger and so not very clear as to use which and when.
Composer just provide necessary tools to work with blockchain.
But if you want to build your own blockchain network, You need to learn about fabric.
In composer guide, it mainly showed two fabric networks: One organization Hyperledger Fabric and Two organizations Hyperledger Fabric.
Let's say if you want to add one more organization or add one more peer node for each organization. You can't implement the requirements just utilize composer.
I'm also quite new to this. So if I understand well your answer lissdy, if I follow the developer tutorial (https://hyperledger.github.io/composer/tutorials/developer-tutorial.html) my network will be deployed but with only one peer ? And I need to use fabric to go further ?

Integration of Hyperledger Composer with Hyperledger Explorer

My question is related to integration of Hyperledger Composer with Hyperledger Explorer.
I am able to see channel specific explorer dashboard but not abIe to see chaincode, assets, participants or transactions added using rest server.
Is explorer works with application set up using node sdk or cli only ?
And due to this only Historian added in Composer?
Thanks in advance.
the Blockchain or - Fabric Explorer - has views/dashboard specifically for Hyperledger Fabric, and is Fabric specific. Composer provides views of the business network (or the chaincode deployed as a business network).
So 'exploration' of Fabric blockchain elements (relating to Blocks and Fabric transactions) is separate to the Composer business network elements you see through using the Composer REST APIs (ie related to a specify Composer business network you deployed - and for which you have views of individual assets, participants and transactions - as well as a history of transactions - that got you to the current world state). So the former is a Fabric view - and the latter is a view into a specific part of the ledger - ie the business network in question.

Resources