hyperledger-fabric

Hyperledger private data dynamic access

自闭症网瘾萝莉.ら 提交于 2020-01-04 02:41:27
问题 Is it possible to dynamically set access to private data in Hyperledger fabric 1.4? Unlike the collections file where we have to add the organizations that can have access to a particular "collection", is it possible to add access through chaincode? 回答1: Had to do some research on this myself, but since Fabric v1.4 it is possible to dynamically add peers to private data collections. Private data reconciliation ensures that all private data state in that collection, which was created prior to

Hyperledger Fabric: peer chaincode instantiate error

扶醉桌前 提交于 2020-01-04 02:18:07
问题 Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package ../../bin/github.com/hyperledger/fabric/chaincode/marbles: open /bin/github.com/hyperledger/fabric/chaincode/marbles: no such file or directory. I see it is looking for a relative directory. relative to what? chaincode install was fine. If the chaincode is installed, why can it not be found for instantiate? 1 peer. 1 solo orderer. channel joined fine. 回答1:

Node.js or Go for Hyperledger Fabric's chaincode development?

无人久伴 提交于 2020-01-03 19:01:21
问题 Which language among Node.js and Go is better suited for 'chaincode' development when it comes to maintainibility, scalability and better support? 回答1: It's a matter of personal preference, but I'd say Golang, because: Node.js chaincode uses npm install at the time of container building, which is slow and might fail due to network problems, while Golang just compiles the source code without fetching anything. Chaincode features are introduced to Golang chaincode first and then later on to

Node.js or Go for Hyperledger Fabric's chaincode development?

浪尽此生 提交于 2020-01-03 18:59:09
问题 Which language among Node.js and Go is better suited for 'chaincode' development when it comes to maintainibility, scalability and better support? 回答1: It's a matter of personal preference, but I'd say Golang, because: Node.js chaincode uses npm install at the time of container building, which is slow and might fail due to network problems, while Golang just compiles the source code without fetching anything. Chaincode features are introduced to Golang chaincode first and then later on to

Error: Cannot find module 'fabric-client'

亡梦爱人 提交于 2020-01-03 08:20:07
问题 After normal run the ./startFabric.sh(it shows as follow ): 2017-07-21 07:47:37.477 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 00a Chaincode invoke successful. result: status:200 2017-07-21 07:47:37.477 UTC [main] main -> INFO 00b Exiting..... Total execution time : 364 secs ... Then I try to run npm install in the \facbar But I get err again . $ npm install > grpc@1.2.4 install C:\Users\Lenovo.WIN10-20170627G\Desktop\fabric-samples- release\fabcar\node_modules\grpc > node-pre-gyp

How to get timestamp when transaction is committed (or completed) in Hyperledger Fabric

☆樱花仙子☆ 提交于 2020-01-03 06:19:32
问题 I need to calculate the difference between "the timestamp when transaction is submitted" and "the timestamp when transaction is committed". Is it possible to get the tx committed (or completed) timestamp in fabric? I tried to use Hyperledger Explorer running on my composer channel. I can see tx timestamp inside the block. But I am not sure whether it is creation or committing timestamp. Also, can I convert explorer timestamp to ISO 8601 format? Please help me on this. 回答1: The timestamp you

Common connection profile missing error while adding user for organization

♀尐吖头ヾ 提交于 2020-01-02 15:01:59
问题 I am getting Error: Common connection profile is missing this client's organization and certificate authority Error, while running gateway.getClient().getCertificateAuthority() code line. My connection profile file is there and as per my understanding it has no issues. Following is my nodejs client code. 'use strict'; const { FileSystemWallet, Gateway, X509WalletMixin } = require('fabric-network'); const path = require('path'); const ccpPath = "../connection-ogr4.json"; async function main()

How can I add two orderers to the same channel?

无人久伴 提交于 2020-01-02 09:56:53
问题 I'm trying to build a network with two orders using Kafka. In the first network example there is a script named./script.sh that creates a channel with an associated orderer that runs this command: peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem >&log.txt I already

How can I add two orderers to the same channel?

谁都会走 提交于 2020-01-02 09:56:42
问题 I'm trying to build a network with two orders using Kafka. In the first network example there is a script named./script.sh that creates a channel with an associated orderer that runs this command: peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem >&log.txt I already

Chaincode (smart contract) interactions within and across channels in Hyperledger Fabric

China☆狼群 提交于 2020-01-02 05:29:07
问题 Consider the Organization-Peer setup in a Hyperledger Fabric network as shown in the image. Org 1 has two peers, Org 2 has one peer - all of which exist inside the same channel - X. Org 3 has one peer which exist outside in a different channel. The peers have distinct chaincodes(c1, c2, c3 & c4) installed in each of them with the functions as explained. write() - put a key-value pair into the ledger update() - update a value for an existing key read() - query an existing key-value pair Now on