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
1
vote
2 answers

how to query chaincode metada with hyperledger fabric network SDK

Is there a way to get the chaincode metadata using the NodeJS or Go fabric-network SDK? Something similar to the peer lifecycle chaincode queryinstalled command: { "installed_chaincodes": [ { "package_id":…
1
vote
2 answers

Hyperledger Fabric nodejs chaincode unit testing in nodejs,

I have developed a custom chaincode for my application in nodejs, I need to perform unit test to validate the functionality using any frameworks such as jest mocha chai, etc. I did did find Hyperledger fabric mock stub testing but it doesnt support…
1
vote
0 answers

How to resolve "error sending: timeout expired while executing transaction" in hyperledger fabric?

I'm trying to upload a bulk data. Im splitting the records like 100 & trying to invoke . The thing is first 100 transactions executing well after that Im facing an issue like below. DLT Error { Error: failed to execute transaction…
sai
  • 487
  • 1
  • 7
  • 16
1
vote
2 answers

unable to invoke chaincode from client : Error processing transaction. Error: PEM encoded certificate is required

i am tring to invoke chaincode command from client by i get Error processing transaction. Error: PEM encoded certificate is required this is my client code i am using to connect to the fabric network and invoke the chaincode. i can invoke and…
1
vote
0 answers

AWS Managed Hyper ledger fabric block chain client.getUserContext is returning null

I am trying to to create REST Server in windows local for Hyper ledger block chain, When I try to enroll user I am getting error called user not found. Same solution I tried in AWS EC2-instance is working fine but, if I am trying to call chain code…
1
vote
0 answers

sort filed is not working in golang chaincode of Hyperledger fabric

The sort field is not working in the go lang chain code. Here is my query string: queryString := `{ "selector": { "dockType": { "$or": [ "Asset1", "Asset2" …
1
vote
2 answers

Init equivalent in Java Chaincode

What is the equivalent of Init function in Java chaincode? I have been looking at this documentation but am unable to find out what function will be called when I run peer chain code instantiate... This is the go variation. func (t *SimpleAsset)…
1
vote
2 answers

Failed to invoke chaincode in hyperledger fabric

I am learning how to use Hyperledger fabric and Chaincode. Basically, I followed this link to create a Java chain code in Hyperledger fabric, but I can't invoke my chain code in the cli/channel. I used BYFN.sh from Hyperledger fabric official guide…
SpicyFish
  • 53
  • 4
1
vote
1 answer

Peer Upgrade command not running

I am trying to build a supply chain blockchain, using a reference from github. I have modified the contents of the chaincode and trying to update the chaincode using the command: peer upgrade -name of the file However after I am getting a an error:…
Akshay
  • 21
  • 1
1
vote
1 answer

Sorting not working in golang chaincode hyperledger fabric

I'm trying to sort the result in golang chaincode, but the result is random, below is my chaincode sample: package main import ( "bytes" "encoding/json" "fmt" "time" "github.com/hyperledger/fabric/core/chaincode/shim" …
Rohit Khatri
  • 1,980
  • 3
  • 25
  • 45
0
votes
1 answer

Error: endorsement failure during invoke in Hyperledger Fabric

When I try to invoke, it says: Error: endorsement failure during invoke. response: status:500 message: "error in simulation: failed to execute transaction eeb54c350c04b037d457f10d085346d59111d1e49ef851860411191e0fe4c891: could not launch chaincode…
dmsophia
  • 1
  • 1
0
votes
0 answers

How to enable intellisense in VSCode for chaincode development (Hyperledger Fabric)

Facing issues with vscode intellisense not working while writing chaincode. This is Hyperledger Fabric chaincode development with vscode 'use strict'; const { Contract } = require('fabric-contract-api'); class CertnetContract extends Contract…
0
votes
0 answers

Hyperledger node JS API -- chaincode getting weired response behaviour

I have a Data61Bpmn2Chaincode application (https://github.com/leoaction/Data61BPMNtoChaincode). With this its possible to execute bpmn processes running on a camunda engine (local on port 8081, 8082, 8083) - depending on how many participants are…
sebi
  • 21
  • 8
0
votes
0 answers

Troubleshooting 'key is not defined' error when creating an object for a class with constructor in Fabcar.js

I am adding a class with constructor in Fabcar.js and trying to create object for the class and call the constructor with new key word. But i am getting error like below. " Failed to evaluate transaction: Error: key is not defined " This is the code…
0
votes
1 answer

How can chaincode get the block height in Hyperledger Fabric 2.x?

I'm coding in Hyperledger Fabric 2.4. I need to query the current block height in the chaincode but I didn't find such a function. How can I achieve this?
mageover
  • 21
  • 4