hyperledger-fabric

Where is Hyperledger fabric chaincode store location?

安稳与你 提交于 2019-12-24 19:55:28
问题 I used peer commond in cli container on chancode install. chaincode name + varsion file was made on peer containers. (location is /var/hyperledger/production/chaincodes) What is this? chaincode? I am looking for chaincode after install. 回答1: The chaincode package which is installed on the peer is technically the serialized bytes of a protobuf message. The protobuf in a ChainDeploymentSpec message, which is defined in the "github.com/hyperledger/fabric/protos/peer" package: message

Attempt to launch Hyperledger Composer app using npm start gives “Cannot find name %participant%” error

家住魔仙堡 提交于 2019-12-24 19:17:51
问题 I'm following the Developer Tutorial for creating a Hyperledger Composer solution over at https://hyperledger.github.io/, and I got all the way to the end without a hitch until running into this wall. For the final step of running the app and webpacking it with Angular ( npm start ), I'm running into the following Cannot find name errors, triggered by inline.bundle.js . After digging around, I discovered that all these offending variables had something in common — they were defined in their

Chaincode for Developers - Hyperledger Fabric Tutorial

好久不见. 提交于 2019-12-24 17:16:14
问题 I'm doing the Chaincode Tutorial and I have problems to compile the given chaincode ("Building Chaincode"). If I try to compile the sacc.go with go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim I get package plugin: unrecognized import path "plugin" (import path does not begin with hostname) package context: unrecognized import path "context" (import path does not begin with hostname) I was thinking about $GOPATH and $GOROOT as problems, so go env gives me GOARCH=

peer endorsement policy not working hyperledger fabric

情到浓时终转凉″ 提交于 2019-12-24 15:09:10
问题 I am trying to enforce simple endorsement policy for 2 org network. Here is my crypto-config.yaml OrdererOrgs: - Name: Orderer Domain: example.com Specs: - Hostname: orderer PeerOrgs: - Name: Org1 Domain: org1.example.com EnableNodeOUs: true # CA: # OrganizationalUnit: peer Template: Count: 1 Users: Count: 1 - Name: Org2 Domain: org2.example.com EnableNodeOUs: true # CA: # OrganizationalUnit: peer Template: Count: 1 Users: Count: 1 And i can see OU as peer in both peers. peer0.org2.example

Hyperledger Composer - Docker Swarm

喜你入骨 提交于 2019-12-24 10:29:43
问题 I've been experimenting with Hyperledger Composer and with the official multi org tutorial. I was successful in modifying the given demo, adding a third organisation and finally installing my own bna. The next step was to fully understand how to deploy the Fabric network and Composer on multiple physical machines. And I went through all the available info about deploying such a process but without much luck. Let suppose: PC1: 1 Orderer, 1 Organisation, One cli container; PC2: 1 Organisation;

How to get chaincode to read from api's outside of the Hyperledger fabric blockchain

空扰寡人 提交于 2019-12-24 09:58:03
问题 I'm wondering how you can get a hyperledger fabric smart contract to read from external API's ? A service called oraclize (http://www.oraclize.it/) is used to do this operation in Ethereum blockchains - Is there anything similar for hyperledger fabric smart contracts or any workarounds? 回答1: In Hyperledger Fabric - smart contracts (the chaincode), could be implemented at the moment with either golang or Java, both of which are Turing complete and provides you with reach set of libraries and

How to change channel policy in Hyperledger Fabric

扶醉桌前 提交于 2019-12-24 09:22:57
问题 I have created network using Hyperledger Farbic. Crypto - certificates was created with configtxgen tool, So, i created channel tx with: configtxgen -profile SampleChannel -outputCreateChannelTx ./config/SampleChannel.tx -channelID SampleChannel So, by default Admins "policies": { "Admins": { "mod_policy": "Admins", "policy": { "type": 3, "value": { "rule": "MAJORITY", "sub_policy": "Admins" } }, "version": "0" } How can I change mod_policy to "policies": { "Admins": { "mod_policy": "Admins",

Roles (read+write) in hyperledger

人盡茶涼 提交于 2019-12-24 08:01:05
问题 Is it possible to allow for someone in hyperledger rights only to read, and to others read+write? So, can you specify different roles for users? 回答1: I'm going to answer the question based on Hyperledger Fabric v1.0.0. The short answer is yes. There are a couple of areas to discuss: 1) Ability to send (broadcast) and receive (deliver) transactions to/from the ordering service. As you know, in order for transactions to make it to the ledger, they must go through an ordering service. An

error executing chaincode: failed to execute transaction: timeout expired while executing transaction

我的未来我决定 提交于 2019-12-24 07:45:46
问题 I write this chaincode and when I invoke it to read with GetOrgan the command is succeeded but when i want to add an organ with AddOrgan i have this error : Error endorsing invoke: rpc error: code = Unknown desc = error executing >chaincode: failed to execute transaction: timeout expired while executing >transaction - import ( "bytes" "encoding/json" "fmt" "strconv" "github.com/hyperledger/fabric/core/chaincode/shim" sc "github.com/hyperledger/fabric/protos/peer" ) type SmartContract struct {

Hyperledger Composer Error Identity has not been registered once issued

假装没事ソ 提交于 2019-12-24 07:19:11
问题 I have been following this Tutorial and I am able to complete it. I issue a new identity, to an existing participant and I create a business card for this identity with the following command: composer identity issue --card admin@tutorial-network -f usr001@tutorial-network.card -u usr001 -a "resource:org.acme.biznet.Trader#usr001" -x true Then, I import that business card via POST /wallet/import and I am able to call different REST API operations. After that, I stop the composer-rest-server