We are creating a new Blockchain network using Hyperledger Fabric for our new Project.We could not able to understand which point configtx.yaml file will be used and how the same is being accessed during runtime.
configtx.yaml is only used to generate a channel's genesis block based on some initial channel configuration. It is not used at runtime. The runtime channel configuration is stored on the channel's ledger based on the genesis block and any subsequent channel configuration updates.
See Creating the network for an overview of the key concepts.
See Generate the genesis block for additional details.
Related
I want to have orderer beside each organization and NOT to create a separate organization for orderers. Is it possible? If yes, how can I do it?
Yes, the application organizations can provide ordering nodes. For example the sample configuration shows a single organization providing both peers and ordering nodes. Simply configure OrdererEndpoints under the organization configuration.
That being said, for each organization that provides an ordering node, you may want to consider creating a separate logical organization in the channel configuration, so that the peer credentials and orderer credentials can be managed separately using different root certificate authorities.
I have a peer in google cloud platform. I have to join that peer to the channel in azure network.
What I tried:
Generated crypto-materials for new peer using azure network webclient and used that crypto-config materials in all the peers, orderer and webclient in azure and also in the new peer I have in google cloud. But after that new peer can join the channel of azure but could not install instantiate the chaincodes.
There are two recommended approaches to setting up Hyperledger Fabric Network on Azure. You can use the Hyperledger Fabric template available in the Azure Marketplace to launch your environment on Azure or you can take the hard way and manually commission VM Instances. Using the template is obviously a faster solution. It is also a better solution. If you were to manually set up your environment, you would have to consider 2 cases — using multiple VM instances (usually in a production environment) or a single VM (for a development environment).
In the second case, you would have to set up the communication rules between VM instances if you are using multiple ones. You would have to download and install the Fabric SDKs and configure the channels and peers and every other facet of a typical Hyperledger Fabric network. While that is easy to do for single, Dev mode VM instance, things get really complicated when you have to consider multiple running instances. Hence, it is better to use the Hyperledger Fabric Template to set up your Fabric environment on Azure.
In either approach, Fabric Network generates a channel configuration. This step generates a new channel configuration block that includes the new member belonging to the peer node in GCP. A configuration block is similar to the genesis block, defining the members and policies for a channel. In fact, you can consider a configuration block to be the genesis block plus the delta of configuration changes that have occurred since the channel was created.
Azure VM Fabric Network can shares the genesis block for the channel with Peer Node in GCP. Before the peer node in GCP joins the channel, it must be able to connect to the ordering service. It obtains the ordering service endpoint from the channel genesis block.
If you are facing issues in the GCP peer node, please confirm that the peer node is receiving blocks on the channel, you install chain code. You then run a query against the local ledger on the peer. After installing the chain code, the peer node in GCP can run queries against its own world state database.
Did a small example using the hyperledger composer and then used the composer-rest-server to integrate it with GUI. So in the case of identity, only admin is there. There is also documentation to create and issue other identities to login into the business networks.
But still, the problem is it's only in a single peer, meaning my local machine. To my understanding, for the hyperledger to function as decentralized and distributed ledger system, additional peers have to be added to the channel and then states gets synced in those peers. Hence if one node is down, details can be obtained from other nodes.
I checked some links such as this and this. But all of these point to the things that :
Existing network should be stopped and teared down.
The IP address of the second machine should be manually added to the docker.yml file and then have to be restarted.
My doubts are :
But on doing this, won't the existing ledger stated be cleared? All the data are gone.
So before even creating a dApp using hyperledger, we have to include all the IP address of the machine in the yml and start the network?
How to actually implement the distributed-decentralised ledger system for a hyperleder network?
UPDATE :
I have checked the links mentioned by Paul O'Mahony. The links explains about the peer addition steps. Overall what happens there is :
downloaded the fabric sample as the fabric extension is only possible through the cryptogen version appropriate to the Fabric version.
Currently contains order, org1 & org2 (with 2 peers each).
To add a new peer along with its couchdb, changed the template count in the crypto-config.yaml and created crypto material for the new peer using the extend command.
Then using the docker composer file to spawn a new peer and its couchdb. This will create new containers.
Finally the created peers should be joined to the existing channel for the couch db to get sync. The adding to existing channel is via logging into the docker container and typing some cli commands and adding the peer to channel via channel join command.
Is this recommend way to add peers to the channel ? Suppose i am creating a network and wanted to add peers to the channel based on a condition. Like a user/users can add themselves to the network through a login via composer playground and act as a peer. So i have to follow the same steps to do it ? Is this the recommended way ?
Supporting link : https://chat.hyperledger.org/channel/fabric?msg=KgxFegcZyKEPdo4v2
I am trying to create my own fabric network by taking reference of "basic network" and "First Network" provided in "fabric-samples"
I have came across section called "Capabilities" in "configtx" yaml file.
Kindly help me to understand significance of this section.
This is a new feature added in Hyperledger Fabric 1.1 to enable us to manage system upgrades across a decentralized deployment spanning multiple organizations.
It is likely that in a large network, there may be nodes running different versions of the software. As new features are introduced, we need a means of ensuring deterministic execution, and hence we use this feature to ensure consistency of execution within a channel.
Capability requirements are defined per channel in the channel configuration (found in the channel’s most recent configuration block). The channel configuration contains three locations, each of which defines a capability of a different type.
Channel: these capabilities apply to both peer and orderers and are
located in the root Channel group.
Orderer: apply to orderers only and are located in the Orderer group.
Application: apply to peers only and are located in the Application group.
Only binaries that support a given capability specified in a channel's configuration block will be able to participate in that channel.
Please see the docs for additional insight.
There is no clear documentation of hyperledger fabric multichannel, can someone from community share example of configuration.
This Stack Overflow thread on creating multi-channel for a Hyperledger Fabric configuration should help you (mostly in yellow and grey code blocks) -> Configure Multiple Channel in Hyperledger Fabric.
Once you have configured your custom runtime Fabric environment for your multi-Org, multi-channel setup, you can then create the requisite Hyperledger Composer config artifacts (eg. such as business network cards, one for a PeerAdmin for runtime install on the two peers in a specific organisation, and one card for a PeerAdmin to instantiate/start the business network across all the multi-Org peers joined to the specific channel in question) - and thereafter, issue cards for the individual identities that will consume/transact on the business network (on whatever channel the connection profile information is set up to communicate on). See this Multi-Org tutorial (for two Organisations, but similar principles apply) https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-multi-org.html for guidance.