Questions tagged [chaincode]

Chain codes are an efficient encoding of binary objects in an image. Use this tag together with [image-processing].

Chain codes, first proposed by Freeman in the early 1960's, encode a binary image object's contour as a set of steps in one of eight directions. The whole object is thus encoded as a sequence of 3-bit values, one for each of the object's contour pixels.

164 questions
0
votes
1 answer

how does a sdk client of one org send transaction request to another org endorsing peer

I have a case where I have hyperledger fabric network two orgs with one endorser peers on each org. there is a write policy that says, 'both the orgs to sign the transaction to commit the ledger'. in this case how can a client app of one org send…
0
votes
0 answers

How do you structure or do a query in Hyperledger-fabric(Java SDK) with CoachDB?

As the tittle says I want to create some transactions to make queries. In my case I have Wallet and Customer classes and each of them has a type attribute for knowing what type they are. I want, for example to make a query to get all the wallets so…
Egoes
  • 23
  • 5
0
votes
1 answer

Hyperledger Fabric function renaming leads to error

I am playing with fabcar example in Hyperledger Fabric. There, in the chaincode, I changed queryAllCars function name to queryAllProducts and then changed that method name in the query.js file where is being consumed. But I am getting following…
Malintha
  • 4,512
  • 9
  • 48
  • 82
0
votes
1 answer

How I can deploy a couchDb index for my Hyperledger Fabric chaincode?

I'm trying to deploy a chaincode with a couchdb index, but it's not working. I use Hyperledger fabric version 2.0 alpha and my chaincode is in go. This is my index {"index":{"fields":["price"]},"ddoc":"indexPriceDoc",…
0
votes
1 answer

Hyperledger Fabric - Implementing transaction types and configuring endorsement policies for each transaction type

In Hyperledger Fabric, one asset has multiple transactions. These transactions update the state of the asset and maintain a trace as well. Currently, if I want to have different transaction types for one asset, then I've written different functions…
0
votes
1 answer

Access locally hosted Hyperledger Fabric from local network

I'm trying to access a locally hosted Hyperledger Fabric with the Fabric SDK. I have no problem to invoke transactions from my local machine. But when I'm trying to run a script using Fabric SDK from a different machine in the same network, I keep…
SO1992
  • 127
  • 1
  • 13
0
votes
1 answer

When is it necessary to implement Fabric high-throughput to avoid key collisions?

I am trying to implement a token in Fabric with low TPS. According to high-troughput sample I must consider key collisions and try to avoid using the same keys for accounts. Due to the difficulty of implementation, I want to know that is it…
mahdi
  • 598
  • 5
  • 22
0
votes
1 answer

get certificate of sender by a transaction id in hyperledger fabric

I am using the GoLang SDK to interact with a Fabric network in chaincode, but I cannot find a way to get the certificate from a transaction ID to find out who signed the transaction.
0
votes
1 answer

How to use stub.getTransient() in Node Chaincode

I have a chaincode written in node.js and I am trying to read transient values but it's not working properly: my code: let secretData = stub.getTransient(); let value = secretData.get('privayeKey').toBuffer().toString('utf8') value is not correct.…
Narayan Prusty
  • 2,501
  • 3
  • 22
  • 41
0
votes
1 answer

Hyperledger Fabric golang chaincode not working as expected store data on ledger manually but not when try to store via function call

i am trying to store fund transfer record on hyperledger fabric. i have written chain code in go lang. it work fine when i add data in initLedger function. but when i call it from other function like createTransfer(i will provide both codes) it show…
Block Crasher
  • 304
  • 2
  • 6
0
votes
1 answer

Hyperledger Fabric Asset vs Transaction

What is the difference between add/update assets directly vs add/update assets through transaction. Which is the right way to do? We can add/update assets using API then why we perform transaction on assets? Is this like a log/trace to track what…
Gurveer
  • 127
  • 1
  • 3
  • 11
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
1 answer

Golang chaincode send an error code along with the message

I also want to send an error code other than the error message to client applications using the shim.Error function,but it only accepts a msg parameter, how to do that?
xuxu
  • 6,374
  • 1
  • 17
  • 11
-1
votes
2 answers

HLF Chaincode - docker peer [MVCC_READ_CONFLICT]

I have a Data61BPMNtoChaincode Project on a ubuntu vm. (https://github.com/leoaction/Data61BPMNtoChaincode/tree/master) For starting a client, NodeJS is used as a server which sends multiple requests like installChaincode and Deploying chaincode to…
sebi
  • 21
  • 8
-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 2 3
10
11