Custumizing the test-network in HyperLedger Fabric - hyperledger-fabric

I'm new at HyperLedger Fabric and trying to customize the test-network provided in the demo https://github.com/hyperledger/fabric-samples/tree/master/test-network.
I can't find a way to 1. add new users and peers to the docker network and 2. create private channels using the CLI or Java SDK.
Could someone please help me ? A good tutorial to start would also be great. Thanks.

To extend Test Network with new orderer and peer, we need to extend fabric key with cryptogen, update system-channel definition, compose orderer nodes, compose peer nodes, join application channel and deploy the chaincode.
I created an article about how to extend test-network (in more details) with new peers and orderers https://dev.to/bukhorimuhammad/extending-fabric-2-test-network-50ll hope that helps

Related

Getting error - No peers available to register a listener and No peers available to query

I have set up hyperledger fabric, and installed and instantiate chaincode for peer0.org1 and peer0.org2 .
I am able to do all transaction for one org. When I tried to do adding peer0.org2 and tried to do transaction through docker cli; I'm able to do all transaction and querying for both org1 and org2.
When I am trying to do these transactions with gateway nodeJS code, I am able to create data from both org, but in org2 creation part getting error: [AbstractEventListener]: No peers available to register a listener
and in querying I am getting error: [SingleQueryHandler]: evaluate: message=No peers available to query
I am able to do all transactions from docker cli for both org. Docker Logs are as well fine.
Please help to resolve the issue. Thanks in advance.
https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html

How can I make hyperledger fabric idemix transaction in cli?

I have tried peer chaincode query/invoke with idemix msp folder(by changing the $CORE_PEER_MSPCONFIGPATH) to set a transaction in fabric, but it keep failing.
So I would like to ask how to make a transaction in type of idemix in the cli docker-container?
BTW, I am using a fabric-ca in container too.
It would be very nice of you to be specific, thanks a lot!

How to configure two P2P nodes on same channel using Hyperledger composer?

Current solution:
1. I have a single node running on Hyperledger.
2. I have deployed my car-auction application on it.
Solution looking for:
I want my car-auction application to deploy on the second node and both nodes should be synced on the same channel.
Any suggestion.
Thanks
This basically boils down to the network configuration that you define in Hyperledger Fabric.
This configuration is defined in two files:
crypto-config.yaml: Contains network topology
configtx.yaml: Defines genesis info and channel consortium
Considering your case, I assume your setup to be:
Single Organization
2 peer nodes within this organization
1 Orderer node
A single channel
So, you need to define network topology with an orderer and a single organization containing two peer nodes. You can find references for this complete setup at build your first network docs on fabric documentation.
Once you have that fabric setup ready, you take references from the Composer Docs. Over here, pay close attention to "connection-profile" file that you create. Since you want both these nodes to execute the car-auction chaincode, you'll need to define both of your peers as "endorsing peers" by setting "endorsingPeers" section to be "true" in the connection profile json file.
Follow the same compose reference to generate the PeerAdmin card. Now, when you install the car-auction bna file, it'll be installed on both the peers. Next, when you start the network, both the peer nodes will have their own chaincode container started up.
This way, you'll have two peer nodes connected on the same channel. And since they're on the same channel, they'll be in sync (regardless a peer is endorsing peer or not).
The same kind of setup goes for the multi-org setup.

Not able to register and instantiate Chaincode - Hyperledger Fabric - Blockchain

I am working upon a basic Blockchain POC and I have been able to do following:
Installed and started the Hyperledger fabric v1.0 successfully
I have list of Docker images running on Fabric
hyperledger/fabric-ca, hyperledger/fabric-orderer, hyperledger/fabric-peer, hyperledger/fabric-ccenv , hyperledger/fabric-couchdb
I have written Chaincode in go to read and update the ledger and compiled successfully
Next - What do I need to do and not able to do and Where I am confused?
Register my Chaincode to a peer – How do I find which Peer I need to register
I tried to follow this video but it uses YAML and I do not have it and it gives error-
https://www.youtube.com/watch?v=76WIJjKNekY&list=PLz3iwtnWFin-yUUgn-zP7KJp0iW0IFas9&index=2
Also followed few more tutorials but still confused what to do
https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html
Instantiate my Chaincode
Query my Chaincode - I will be able to do it once Chaincode is registered and deployed
Invoke my Chaincode to update the ledger - Same as above
Please help in above step or let me know if there is any good source of clear steps to perform registration and instantiation of chaincode.

add additional peer in block chain fabric business network dynamically

How can I add new organization or new peer in already existing businessnetwork dynamically in HyperLedger Fabric.
please let me know the steps .
You can use configtxlator tool. This IBM-tutorial explains the procedure very well.
Kindly refer this link which contains details steps add new peer to existing network.
https://medium.com/#wahabjawed/extending-hyperledger-fabric-network-adding-a-new-peer-4f52f70a7217

Resources