blockchain

How is running the asset_management.go different from running a simple chaincode like chaincode_example02.go

蓝咒 提交于 2019-12-01 13:19:31
The simple workflow for deploying/invoking a chaincode (to my knowledge) is : Deploy a chaincode(smart contract) on the blockchain This brings up a docker container on all peers that has the chaincode running in it Invoke some function This type of function changes the values of variables in chaincode state For asset_management.go , the chaincode can be tested by running go test in the asset_management chaincode directory . But this does not really bring up a docker container(or does it ?) that runs the asset_management chaincode. Whats the right way to deploy/invoke this chaincode and how is

How to debug chaincode? LedgerError - ResourceNotFound

夙愿已清 提交于 2019-12-01 12:10:18
I got this I believe pretty common error "..LedgerError - ResourceNotFound: ledger: resource not found" . To make it simple, this is what I have: Try simple chaincode, the given chaincode_example02.go codes turned off security hence no CA (CORE_SECURITY_ENABLED=false CORE_SECURITY_PRIVACY=falss) 1 peer node only (using 0.5 version), it is a peer docker image run in dev mode This is how I deployed the code in dev mode, pls do verify if the cli is correct: CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:30303 ./chaincode_example02 and it shows 'Received REGISTERED, ready for invocations'

“Error getting chaincode package bytes” when deploying chaincode on hyperledger via REST

萝らか妹 提交于 2019-12-01 11:08:59
I'm trying to deploy chaincode on hyperledger (Bluemix service) via POST/REST to /chaincode QuerySpec { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "path": " https://github.com/romeokienzler/learn-chaincode/tree/master/finished " }, "ctorMsg": { "function": "init", "args": [ "hi there" ] }, "secureContext": "user_type1_0" }, "id": 1 } I've also tried those links https://github.com/romeokienzler/learn-chaincode/blob/master/finished/chaincode_finished?raw=true https://raw.githubusercontent.com/romeokienzler/learn-chaincode/master/finished/chaincode_finished.go I

How to debug chaincode? LedgerError - ResourceNotFound

与世无争的帅哥 提交于 2019-12-01 10:58:19
问题 I got this I believe pretty common error "..LedgerError - ResourceNotFound: ledger: resource not found" . To make it simple, this is what I have: Try simple chaincode, the given chaincode_example02.go codes turned off security hence no CA (CORE_SECURITY_ENABLED=false CORE_SECURITY_PRIVACY=falss) 1 peer node only (using 0.5 version), it is a peer docker image run in dev mode This is how I deployed the code in dev mode, pls do verify if the cli is correct: CORE_CHAINCODE_ID_NAME=mycc CORE_PEER

How to use a chaincode that's not on github?

倖福魔咒の 提交于 2019-12-01 08:41:49
I have developed a chaincode using this and now that I know that it works I want to test it in a network with multiple nodes. Where should I put my chaincode so that I can deploy it in the Hyperledger fabric network? I have used this to setup the network. There are two options: If you are not using a docker image to start your nodes then you should deploy the chaincode by specifying a fully qualified path, in other words, you should set the parameter when deploying: -p /home/user/my/awesome/chaincode If you are running your nodes/peers in a docker image (like the instructions you are following

“Error getting chaincode package bytes” when deploying chaincode on hyperledger via REST

自闭症网瘾萝莉.ら 提交于 2019-12-01 07:30:00
问题 I'm trying to deploy chaincode on hyperledger (Bluemix service) via POST/REST to /chaincode QuerySpec { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "path": "https://github.com/romeokienzler/learn-chaincode/tree/master/finished" }, "ctorMsg": { "function": "init", "args": [ "hi there" ] }, "secureContext": "user_type1_0" }, "id": 1 } I've also tried those links https://github.com/romeokienzler/learn-chaincode/blob/master/finished/chaincode_finished?raw=true

Sawtooth Invalid Batch or Signature

十年热恋 提交于 2019-12-01 06:41:54
I have started playing atound with Hyperledger Sawtooth recently, and having trouble to submit transactions on java, while python code seems okay. I have prepared the python code based on the api docs here and then tried to write one in java as well. Below is the code in java import com.google.protobuf.ByteString; import com.mashape.unirest.http.Unirest; import sawtooth.sdk.processor.Utils; import sawtooth.sdk.protobuf.*; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.Signature; import java.security.spec.ECGenParameterSpec; public class BatchSender {

How to use a chaincode that's not on github?

吃可爱长大的小学妹 提交于 2019-12-01 06:30:49
问题 I have developed a chaincode using this and now that I know that it works I want to test it in a network with multiple nodes. Where should I put my chaincode so that I can deploy it in the Hyperledger fabric network? I have used this to setup the network. 回答1: There are two options: If you are not using a docker image to start your nodes then you should deploy the chaincode by specifying a fully qualified path, in other words, you should set the parameter when deploying: -p /home/user/my

Sawtooth Invalid Batch or Signature

China☆狼群 提交于 2019-12-01 04:21:29
问题 I have started playing atound with Hyperledger Sawtooth recently, and having trouble to submit transactions on java, while python code seems okay. I have prepared the python code based on the api docs here and then tried to write one in java as well. Below is the code in java import com.google.protobuf.ByteString; import com.mashape.unirest.http.Unirest; import sawtooth.sdk.processor.Utils; import sawtooth.sdk.protobuf.*; import java.security.KeyPair; import java.security.KeyPairGenerator;

Issue while using fabric client java sdk (since there is no Rest API support) in local development environment for Hyperledher Fabric V1.0

泄露秘密 提交于 2019-12-01 01:28:02
I have done the following as per the suggestion that I have got from my previous post to communicate with locally running Hyperledger Fabric V1.0 network from java application. But I am getting the exceptions given below and unable to sort it out why it is happening. public class Test { final HFClient client = HFClient.createNewInstance(); Channel channel; TransactionProposalRequest proposalRequest; void setupCryptoMaterialsForClient() throws CryptoException, InvalidArgumentException{ // Set default crypto suite for HF client client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); client