hyperledger

Hyperledger composer javascript return value

坚强是说给别人听的谎言 提交于 2020-01-06 06:05:28
问题 I want to create smart contract for login. When users input username and password are correct its will return true and incorrect return false to my web application. Model participant SampleParticipant identified by participantId { o String participantId o String username o String password } transaction SampleLogin { --> SampleParticipant participant o String inputUsername o String inputPassword } Transaction function sampleLogin(tx) { var username = tx.participant.username; var password = tx

Saving data on Hyperledger-Composer network

大憨熊 提交于 2020-01-06 05:40:27
问题 I the last weeks I have completed the Principal Hyperledger-Composer tutorials and I have created a private network for testing some features. I have noticed that if you close your PC or stop the fabric ( ./stopFabric ), and restart the private-network, it will be empty. You lose every action you perform in the network using the rest-server (add client, transaction history, etc). Is there a way for saving my actions? Do I have to use a "multiple-organization-network" (https://hyperledger

Problem of querying the Hyperledger Historian

自作多情 提交于 2020-01-06 04:52:23
问题 I am developing Hyperledger composer application and I want to get all the transactions related data like transaction type,transaction Id and timestamp to a particular stakeholder who involved in. I created following query to get data from historian. query getFromHistorian { description:"get user transactions" statement: SELECT org.hyperledger.composer.system.HistorianRecord WHERE (participantInvoking == _$stakeholder) } But when I execute this query by giving a stakeholder id using REST API

Hyperledger Fabric : Register and enroll new peer identity using fabric-ca-client (Javascript)

痞子三分冷 提交于 2020-01-06 04:18:16
问题 In the documentation of fabric-ca there is only CLI description of identities creation, using the nodejs module "fabric-ca-client" we can register and enroll new user using: fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department2', role: ''}, admin_user); fabric_ca_client.enroll({enrollmentID: 'user1', enrollmentSecret: secret}); but what about peers and order ? I can't find any documentation about that. 来源: https://stackoverflow.com/questions/52890307/hyperledger

Hyperledger Composer Rest Server connection with Cloudant NoSQL DB

会有一股神秘感。 提交于 2020-01-05 20:27:20
问题 i'm trying to set up the Hyperledger Composer Rest Server (https://hyperledger.github.io/composer/reference/rest-server) in order to work with Cloudant DB on IBM Cloud and store inside it the cards used to interact with the blockchain. In particular i would like to know how to configure the COMPOSER_DATASOURCES parameter of composer-rest-server. Thanks in advance for your availability. Best Regards 回答1: The Composer Rest Server uses loopback, and so the COMPOSER_DATASOURCES are lookback

How to code own consensus in Hyperledger Fabric?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-05 07:12:17
问题 I want to use Hyperledger Fabric. But I need a special consensus algorithm. I have the concept ready but no idea how to get it implemented in Fabric. The documentation says: A consensus plugin needs to implement the Consenter and Chain interfaces defined in the consensus package. There are two plugins built against these interfaces already: solo and kafka. You can study them to take cues for your own implementation. The ordering service code can be found under the orderer package. First

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