Questions tagged [hyperledger-chaincode]

448 questions
2
votes
3 answers

TypeError: stub.GetQueryResultWithPagination is not a function

I have instantiated a sample NodeJS chaincode from fabric-samples marbles02 all the invoke and query functions are working fine but when i was trying to query this function queryMarblesWithPagination it gives me this error: Error: endorsement…
2
votes
1 answer

Does contract.evaluateTransaction(fcn,args) make a transaction during query on endorsing peers?

I am using hyperledger fabric 1.4, and facing an issue, while querying using the node sdk await contract.evaluateTransaction(fcn,args), I am getting this error : - Errors: ["2 UNKNOWN: invalid txid. got…
2
votes
1 answer

Packaging chaincode

I have set-up a hyperledger fabric network with four nodes in the development phase and I want to know if there is a way to give the nodejs chaincode(for installation) to production team without exposing the source code(chaincode), something like a…
2
votes
3 answers

What exactly is an Asset in Hyperledger Fabric?

According to Hyperledger Fabric website, it states: Assets can range from the tangible (real estate and hardware) to the intangible (contracts and intellectual property). Hyperledger Fabric provides the ability to modify assets using chaincode…
2
votes
3 answers

How to expose Chaincode API as REST with Hyperledger go SDK

We have configured hyperledger Fabric 1.2 on Amazon Managed Blockchain network. We have followed 8 steps guide managed-blockchain-get-started-tutorial to configure this setup. We have configured network, member and peer and VPC Service endpoint is…
1
vote
0 answers

Process is stuck while invoking a function from Hyperledger fabric test network

I already installed chaincode on test network now I am trying to invoke this function addNewPatients(its logic is given below) but only curser is blinking does not give any response or error Tried to invoke many times but its same async…
1
vote
0 answers

could not parse as a chaincode install package: did not find a code package inside the package external chaincode

I have setup a Two node Kubernetes network, Installed hlf-operator. Created 2 organisations network with channel "mychannel" and external chain code "mycc". Now I want to create a new channel "mychanneltwo" and install new chaincode "mycctwo" on…
1
vote
1 answer

calculating private data object's hash

I am trying to calculate the private data object's hash using sha256 hashing algorithm. The requirement is to calculate the hash of private data object and match it with the hash stored on the ledger but both hashes do not match. I am using…
Akshay Sood
  • 6,366
  • 10
  • 36
  • 59
1
vote
2 answers

Cannot istantiate chaincode docker container due to missing Main method in contract class

The chaincode container cannot start (after committing to the channel) due to the following error: Error: Main method not found in class mypackage.MyChaincodeClass, please define the main method as: public static void main(String[] args) or a…
ultracode
  • 107
  • 1
  • 8
1
vote
0 answers

Certificate signed by unknown authority Hyperledger Fabric

I'm trying to create a channel for my hyperledger fabric network but I've been stuck for over two weeks with this error : [policies] SignatureSetToValidIdentities -> WARN 00d invalid identity: certificate…
1
vote
0 answers

Not able to start a chaincode in the test-network

I got stuck with the first tutorial for the test-network. I can set up a network and a channel with the network.sh-script, checked it with ‘docker ps -a’. But trying to start the chaincode with ./network.sh deployCC -ccn basic -ccp…
ChrisiMW
  • 11
  • 2
1
vote
0 answers

Error: endorsement failure during invoke. response: status:500 message:"endorsing with plugin failed

I am trying to implement my own custom endorsement plugin in hyperledger fabric. I am getting the below error. Error: endorsement failure during invoke. response: status:500 message: "endorsing with plugin failed: plugin with name custom could not…
1
vote
1 answer

getStateByRange - End of String indication for exact search

When using getStateByRange in Java chaincode (and presumably other languages also), a search for "asset10" through "asset11" will retrieve asset10, and anything with characters after asset10 (e.g. asset100, asset101...). Is there any character or…
ben-bdj
  • 11
  • 1
1
vote
2 answers

How to write a function to be used inside chaincode only (no invoke operation by any peer)?

Example scenario I have stored the passwords of users, with usernames as key. I want to use a function as a helper function to get that password. So that I don't have to do error handling every time I want to get password, for matching user entered…
Rajan
  • 625
  • 7
  • 19
1
vote
2 answers

[[Hyperledger Fabric V2]] Failed to submit transaction: TypeError: Cannot read property 'toString' of undefined

I developped a hyperldger app using the fabcar logic using node. Everything works fine when submitting transactions. I created a rest API server with express to interact with the chaincode and use an angular app to serve the rest api. While the…