Questions tagged [hyperledger-chaincode]

448 questions
0
votes
2 answers

Is there any way that a Chaincode can interact with outside entity?

I'm writing a Hyperledger-fabric chaincode. And I wish it can get some strings from outside program and send some messages to it. I want to know if the chaincode can do this?
mageover
  • 21
  • 4
0
votes
0 answers

Hyperledger Fabric: Error while installing the chaincode on a peer

I am trying to demonstrate the usage of Private Data in Hyperlderger Fabric as part of a PoC. I have been following the steps given in: https://hyperledger-fabric.readthedocs.io/en/release-1.4/private_data_tutorial.html I have been able to start the…
Akhil Kintali
  • 496
  • 2
  • 11
  • 27
0
votes
1 answer

Error when invoking chaincode in hyperledger fabric

I have made my custom chaincode "mycc.js" It is successfully installed on peer. But when i Instantiate this chaincode using peer chaincode instantiate -l node -n mycc -v v0 -C mychannel -c '{"args":["init","A","100","B","100"]}' -o…
Rohit Kumar
  • 438
  • 2
  • 6
  • 16
0
votes
0 answers

Issue in creating Private data in Hyperledger Fabric

I am trying to create private data on Fabric version 1.2.0. I have created the collections configuration file for storing private data. [ { "name": "collectionData", "policy": "OR('Org1MSP.member','Org2MSP.member')", …
0
votes
1 answer

Hyperledger Fabric - cannot instantiate contract as per the MagnetoCorp example

Whenever I try to instantiate a contract according to the MagnetoCorp example, I receive the following errors. In the terminal: 2019-03-06 14:18:49.695 UTC [chaincodeCmd] InitCmdFactory -> INFO 001 Retrieved channel (mychannel) orderer endpoint:…
0
votes
1 answer

Unexpected end of JSON input - Hyperledger Fabric while using putState()

async changeCarOwner(ctx, carNumber, newOwner) { const carAsBytes = await ctx.stub.getState(carNumber); if (!carAsBytes || carAsBytes.length === 0) { throw new Error(`${carNumber} does not exist`); } …
0
votes
1 answer

Hyperledger Fabric - Error while Instantiating chaincode (error trying to connect to local peer: context deadline exceeded)

I am using Hyperledger Fabric v 1.3.0 and trying to deploy using swarm network on multiple hosts. I am facing an issue when trying to instantiate the chaincode. The error i get is below in the image Chaincode Instantiate Error : I keep getting…
0
votes
1 answer

How to fetch Models with a property query based in Hyperledger Fabric Java chaincode

I am developing a simple Hyperledger Fabric Wallet type application in Java chaincode with basically 2 models: Wallet and MoneyTransfer. MoneyTransfer has the data, amount and ids for "fromWallet" and "targetWallet". I have not found examples of how…
icordoba
  • 1,834
  • 2
  • 33
  • 60
0
votes
2 answers

Fabric chaincode instantiation fails

Trying out the getting started guide from the HyperLedger tutorials. It is pretty basic. Starting the network is the first step. Even the first step is not working. Looked into script "startFabric.sh". Everything goes well, until "chaincode…
Nambi
  • 2,688
  • 8
  • 28
  • 37
-1
votes
0 answers

Fabric Chaincode Go fails to Deploy due to deserialize error

I am trying to deploy a this custom go chaincode on a fabric sample test-network it fails at getMSPID and gives undefined: msp.DeserializeIdentity while running the command ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go/…
-1
votes
0 answers

Error - configure MSP failed: sanitizeCert failed the supplied identity is not valid: x509: certificate signed by unknown authority

I was following minifab documentation and did the following steps: minifab netup -e 7100 -i 2.4 -l go minifab create,join minifab install,approve,commit,initialize,discover,profilegen minifab apprun -l go Although, I get this output in the…
-1
votes
0 answers

Error: chaincode install failed with status: 500 - Cannot Install Chain code on my network

I've been trying to setup hyperledger fabric for weeks and this step is blocking me from using it: I start the network and create a channel and when I deploy the chain code it give the error below: Error: chaincode install failed with status: 500 -…
-1
votes
1 answer

How to store Log File data on Hyperledger Blockchain?

I want to store Log file data on the private blockchain Hyperledger fabric. Please tell me is it possible? If yes, the what steps I need to follow? and what are the steps? To store Log data Line by line on Hyperledger fabric
-1
votes
1 answer

No peers defined in the channel that have the ledger query role. Failed to execute the transaction

No peers defined in the channel that have the ledger query role. Failed to execute the transaction: Error: No peers defined in the channel that have the ledger query role. When I remove particular chaincode in the start.sh file, It is working fine.…
-1
votes
1 answer

Can a chaincode in hyperladger have its own certificate for signing transactions? If it can, then how

The task is to transfer assets from fabric to another blockchain. For the unlock/lock token contract, it is necessary to come up with a place to store tokens for the time of their blocking. I decided to store them on the client's account. The bottom…
Hacer
  • 1