How can I make hyperledger fabric idemix transaction in cli? - hyperledger-fabric

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!

Related

hyperledger fabric some problem in deploying on kubernetes

i have some question.
while deploying fabric-ca 1.4.9, orderer 2.2.1 and peer 2.2.1 in kubernetes with tls configure is enable, i cannot excute command peer channel create following this error.
Error: failed to create deliver client for orderer: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded
i executed configtxgen and crypto-gen command before create channel with configtx.yaml and crypto-config.yaml.
Current problems and questions are not specified. To solve this problem, information about the parameter options in the peer channel create command is required.
Then, check whether the MSP (crypto) specified in the created configtx.yaml and the policy match well.
In addition to the above information, it is good to give the topology information of the currently established blockchain network.

container in Hyperledger fabric network

what are the containers which are associated with each peer in Hyperledger Fabric (HLF)?
For example: Endorsing peers most have one chaincode container to execute chaincode.
I'm not sure if I understand your question very well, but I still would like to give it a try.
The docker containers associated with a peer are:
Peer container, which manages you peer node. It's the peer container to which you send the transaction proposal either using CLI or through SDK. Every peer container embodies a copy of the ledger. The ledger is segregated using a channel.
Couchdb container, which persists the world state. It saves every key-value pair which you query or invoke using chaincode. The name of the container is usually in the form couchdb.
Chaincode container, where the chaincode is actually deployed. All the modules/packages that your chaincode requires are first installed when you instantiate your chaincode. The chaincode container usually have its name in the form dev-peer0.org1.example.com-fabcar-1.0.1, where dev refers to the environment in which the chaincode is instantiated. peer0.org1.example.com refers to the peer which instantiated it. fabcar here is the name of your chaincode and 1.0.1 is its version, which is changed every time you upgrade your chaincode.
A peer might not have a chaincode container if it's only acting as a validating or committing peer.
CLI container, this container is required for managing peers. At a time, CLI container can only manage a single peer. You can change the peer it's managing by adding/changing the environment variable CORE_PEER_ADDRESS, e.g. CORE_PEER_ADDRESS=peer0.org1.example.com:7051.

Custumizing the test-network in 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

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

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.

Resources