You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
forgot to include the signature of second Orgnization
peer channel update -f org3_update_in_envelope.pb -c $CHANNEL_NAME -o orderer.example.com:7050 --tls --cafile $ORDERER_CA
Why only ADMIN users in hyperledger fabric have the permission to install instantiate query in chaincode?
Solution :
The main intention of hyperledger is to provide confidential transactions.
Chaincode contains sensitive information such as business logic.
The main purpose of hyperledger would not be satisfied if any user could install or instantiate a query in chaincode.
Hence, for now, only the Admin has the permission to install and/or instantiate queries.
2020-02-14 10:25:26.069 UTC [endorser] callChaincode -> INFO 6cc3 [channelheader][f4380706] Entry chaincode: name:"mychannel"
2020-02-14 10:25:27.750 UTC [chaincode] HandleTransaction -> ERRO 6cc4 [f4380706] Failed to handle GET_STATE. error: no revision tag detected
github.com/hyperledger/fabric/core/ledger/util/couchdb.getRevisionHeader
Solution:
if you attempt to GetState() on an empty string above error reflects in peer logs. apply proper checks inside your chaincode to check whether string is empty or not.
Guidelines for writing Hyperledger Fabric Chaincodes and Testing Using dev mode and Testing
Writing Hyperledger Fabric Chaincode and Testing using dev-mode
Chaincode initializes and manages the ledger state through transactions submitted by applications.
A chaincode typically handles business logic agreed to by members of the network, so it similar to a “smart contract”. A chaincode can be invoked to update or query the ledger in a proposal transaction. Given the appropriate permission, a chaincode may invoke another chaincode, either in the same channel or in different channels, to access its state.
Below are a few general guidelines / caveats that can be adhered to (although there are exceptions) while writing chaincodes. These I have particularly written for chaincodes written for Hyperledger fabric v.1.4 network in golang. But, I believe they can be extrapolated to chaincodes written in any language for Hyperledger Fabric.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'mychannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1.
Solution :
if channel already exist and user try to create the same channel again orderer will through given error.
What happens is that the transaction is simulated on a peer that didn't get the latest block of the blockchain and thus the version of the key that was used in the simulation was 2799, while the latest version of that key in the blockchain was 2800 (because of a previous transaction that its corresponding block didn't get into the ledger of the peer on time).
Notice that the ledger invalidates the transaction and considers it as an invalid because of MVCC (multi-version concurrency control) conflicts.
Error:2019-12-11 05:59:24.583 UTC [common.deliver] deliverBlocks → WARN 062 [channel: mychannel] Rejecting deliver request for 172.18.0.23:48168 because of consenter error
Possible Cause :
if random leader election campaign going on due to *leader orderer crash* or
re-initiate election due to split vote case or some other scenario and
you are trying to invoke the transaction.you will get such error.