blockchain

Hyperledger Fabric 1.4 : How to test and verify registerChaincodeEvent function from the Fabric Node SDK?

那年仲夏 提交于 2019-12-12 07:24:18
问题 I am currently emitting an event from my chaincode when adding an asset. async addRequestNode(ctx, sampleAssetId, sampleData) { //console.info('============= Adding Sample Asset ==========='); await ctx.stub.putState(sampleAssetId,sampleData); //console.info('============= Sample Asset Added ==========='); ctx.stub.setEvent('sampleAssetAdded', 'sampleData'); } Here as you can see, I am emiiting an event 'sampleAssetAdded'. I want to capture this event on my client application. I have a server

Not able to use IBM Blockchain services after Bluemix 1.0 update (Hyperledger 0.6)

≡放荡痞女 提交于 2019-12-12 04:37:37
问题 My team and I are developing an app using Bluemix Blockchain services, and we were using the application just fine until the 1.0 update. We thought it could be an error related to the ibm-blockchain.js library, however we have tried deploying it via REST and we still get errors: { "jsonrpc": "2.0", "error": { "code": -32001, "message": "Deployment failure", "data": "Error when deploying chaincode: Error getting chaincode package bytes: Error getting code 'go get' failed with error: 'exit

Hyperledger : Deploying chaincode successful. But, cannot query - says ResourceNotFound

痞子三分冷 提交于 2019-12-12 03:46:19
问题 I have started a peer and membersrvc container with docker compose. They have started successfully. I deploying example02 chaincode from CLI (tried REST also). I get a success message. When i try to query the chaincode, i am getting Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for mycc - LedgerError - ResourceNotFound: ledger: resource not found) Following are the steps that I performed: [karthik@localhost hyperledger]$ cat docker

Unable to register user using Hyperledger membersrvc

99封情书 提交于 2019-12-12 02:14:00
问题 I have Hyperledger setup in Ubuntu using docker images for fabric-peer and membersrvc and I am trying to setup CA as per https://github.com/hyperledger/fabric/blob/master/docs/Setup/ca-setup.md I started the docker containers using docker-compose up command but getting the following error when trying to login using POST /registrar API, with the following payload: { "enrollId": "test_vp0", "enrollSecret": "MwYpmSRjupbT" } But getting the following errors: vp0_1 | 04:40:24.157 [rest] Register -

Web3j v3.3.1 : Error while generating compiled solidity smart contracts which returns array of struct

北城以北 提交于 2019-12-11 21:32:52
问题 I am returning an array of struct from solidity function as below. pragma solidity ^0.4.21; pragma experimental ABIEncoderV2; function getPurchaseOrderForVendor(string vendorNameInput) constant returns (PurchaseOrderStruct[]) It is compiled to abi and bin files. The issue is with creating wrapper files for the contract using web3j(v3.3.1). Im getting the below errors. Generating com.contract.InvoiceSettlement_sol_InvoiceSettlement ... Exception in thread "main" java.lang

how many number of nodes we can create under hyperledger fabric

大城市里の小女人 提交于 2019-12-11 18:37:29
问题 Is there any limit of creating number of nodes while configuring hyperledger fabric? I have gone through the below answer but I'm not clear what he is explaining. Limit of number of nodes in Hyperledger When I say number of nodes, it could be number of stakeholders(marked as organizations) or peers or endorser nodes. 回答1: The answer on that post is now incorrect. Fabric does not currently used Byzantine Fault Tolerance, it only has Crash Tolerance through Kafka ordering. Byzantine Fault

Couchdb port mapping in yaml file for Hyperledger Fabric V1.0 network setup

纵然是瞬间 提交于 2019-12-11 18:26:44
问题 Can someone please explain the port mapping in this docker-compose-couch.yaml. Please look into the following container_name: couchdb0 -ports: - "5984:5984" -- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 container_name: couchdb1 -ports: -- "6984:5984" -- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984 container_name: couchdb2 -ports: -- "7984:5984" -- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb2:5984 container_name: couchdb3 -ports: -- "8984:5984" --

Connecting to a Hyperledger Fabric CA-Server using an endpoint device

不问归期 提交于 2019-12-11 18:10:10
问题 I have setup a Hyperledger Fabric CA-Server on an Ubuntu machine. I have enrolled an admin and also tried enrolling a few users. It worked perfectly fine. I now want to register a few users through a Windows machine (Client) by sending requests to the validator machine. How do I proceed for this? What are the prerequisites to be installed in the client machine? How do I make use of the APIs of the Fabric network? Currently, it says, 'Listening on http://0.0.0.0:7054' . Should the Firewall be

Error: Returned error: VM Exception while processing transaction: invalid opcode

半城伤御伤魂 提交于 2019-12-11 17:12:17
问题 I am trying to test a smart contract that monitors trading. I have three contracts, EscrowComplianceCecker, Industry, and Consumer. However, when testing my sendescrow() function on a truffle it seems to be throwing the above error. I am trying to figure out the reason for the bug I debugged with the truffle debugger. The problem seems to be coming from the line escrowobtainee.escrowobtainees[ escrowparticipator][obtcounter].escrowparticipantsinitialamountputin = escrowobtainee

How to read Block data received by transaction id in Hyperledger Fabric Go?

跟風遠走 提交于 2019-12-11 16:48:48
问题 I am working on reading the Block data received by transaction id. I have queried the ledger and received the block but not able to find a way to decode the internal data of a block. MyCode block, err := ledgerClient.QueryBlockByTxID(transactionID) if err != nil { return nil, errors.WithMessage(err, "QueryBlockByTransactionID return error") } if block == nil { return nil, errors.WithMessage(nil,"Block info not available") } here in this query, it returns the block created by a transaction. So