Susie  Song
Susie Song

Reputation: 21

Hyperledger Composer where is the distributed ledger?

I am new to Hyperledger Composer. I've followed this tutorial and I was able to deploy the business network successfully. https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org

However, I am very confused in terms of participants and peers. More specifically:

  1. Where is the distributed ledger stored? Based on my research, there are two different database. One is the actual ledger. One is the state database. Where are they stored specifically? Will all the participants/peers have their own copy of the ledger locally? If so, where is it located?

  2. Are participants and peers the same? I can create participants using the REST api that composer provide, but when I develop the business network following the tutorial, it asks me to create connection files, and those keys. I am confused. The participants I created through api are different from the ones I created using the connection files I assume?

  3. Ultimately, I want to create another peer on my blockchain, so that my friend can have his copy of the ledger. How can I do that?

Thank you so much in advance.

Upvotes: 1

Views: 572

Answers (1)

Paul O'Mahony
Paul O'Mahony

Reputation: 6740

  1. Typically (depending on configuration/composition of the blockchain network) each peer usually has a copy of the ledger. Members are the organisations that take part in the blockchain network. In Hyperledger Composer, you deploy a business network (chaincode container for the business network in question, eg trade settlement network, Farm2Fork network, Perishables network, supply chain network, supply chain trade finance business network etc etc.) that those member organisations will transact on (or - people from those orgs to be more specific). That business network is deployed to the Fabric blockchain network and both member orgs can see that business network (and transact etc). Composer uses the term participants to mean the 'participant mapped to a (usually) specific identity' that will ultimately sign their own transactions on that network. So a Trader participant is usually mapped to one identity - although you can have a participant have one or more identities. 'Participants' in a blockchain network context can mean the 'members' of a b/c network (if you take away my Hyperledger Composer explanation earlier). 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 networks are deployed to the runtime Hyperledger Fabric based blockchain network.

  2. Your business network card contains identity info and connection info. You have to build a business network card with the connection info, otherwise you can't connect to the business network described earlier.You need to separate Composer in your mind (dealing with assets, participants and more business context but which needs to know 'how' to connect to runtime Fabric and Composer maps identities to the CA-provided certificates) from Fabric (dealing with peers, infrastructure, what IP network they're on, whether you're using TLS or not etc etc) - but the Composer tutorial simply and clearly outlines how to set up a Fabric environment first (using BYFN sample) and how to generate the cryptographic material to secure your network - all this, as a pre-req to using Composer to deploy the business network in that tutorial, to the Fabric-based blockchain.

  3. 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 also read the Fabric docs -> http://hyperledger-fabric.readthedocs.io/en/release/ for more info / what's involved.

Upvotes: 4

Related Questions