hyperledger

do I need to use fabric sdk if am using hyperledger composer

╄→尐↘猪︶ㄣ 提交于 2019-12-11 10:46:19
问题 I am using hyperledger composer for transaction invocation and all the stuffs related to resource(participants, assets etc) manipulation. I have generated the server using composer-rest-server, and also generated the angular frontend using yeoman generator. This makes me to ask what is the use of fabric sdk? Will I need it in the above mentioned scenario? Please clarify, thanks. 回答1: There are two ways to write chaincode in Hyperledger Fabric, 1) Using GoLang 2) Using NodeJS In order to

Hyperledger Composer CLI Ping to a Business Network returns AccessException

岁酱吖の 提交于 2019-12-11 10:45:21
问题 Im trying to learn Hyperledger Composer but seems to be a relatively new technology, i mean there are few tutorials and few solutions to a lot of questions, tutorial does not mention possible error case when following the commands and which means there are is also no solution for those errors. I have joined the composer channel in their community chat, looks like its running in Discord or something, and asked the same question without a response, i have a better experience here in SO. This is

Usage of Query System chaincode

限于喜欢 提交于 2019-12-11 09:46:18
问题 Hi I am trying to query a block by with these piece of code by importing ledger package which is part of QSCC but there are some errors when try to invoke please clarify whether this is correct way of doing it. func (t *SimpleChaincode) expt(stub shim.ChaincodeStubInterface, args []string) pb.Response{ var plp ledger.PeerLedgerProvider var pl ledger.PeerLedger lId,err:=plp.List() if err != nil { return shim.Error("Invalid transaction amount, expecting a integer value") } fmt.Println(" List

Is it possible to set the world state(ledger) in a go routine?

青春壹個敷衍的年華 提交于 2019-12-11 09:27:49
问题 I want to start a go routine to check and change the world state daily after init. func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { stub.PutState("xiaoming_wallet", []byte("50")) stub.PutState("xiaoming_toy", []byte("0")) go monthly_check(&stub) return nil, nil } the function is like this func monthly_check(stub *shim.ChaincodeStubInterface) { tc:=time.Tick(24*time.Hour) for range tc{ ... ... (*stub).PutState(..,..) ... ... }}

Hyperledger composer Access Control, allow create in transaction

好久不见. 提交于 2019-12-11 08:43:12
问题 Here is what I want to implement: I want to allow user(kind of participant) to create an asset, but do it only in transaction, whereas outside of this transaction I want deny all user rights to create assets. I tried to solve it using condition in rule .acl file using function: rule UserCanCreateAssetOnlyInTransaction { description: "Deny all participants create access to all userWallets if not in transaction" participant(p): "com.example.User" operation: CREATE resource(r): "com.example

Using cron jobs within Hyperledger Fabric Chaincode

青春壹個敷衍的年華 提交于 2019-12-11 08:03:02
问题 I am attempting to setup a cron job to run on a 24 hour interval within my chaincode. I am trying to use the following library to set up the scheduler: https://github.com/jasonlvhit/gocron. If I run this outside of Fabric in a standalone go file it runs as it should. But running it on a deployed chaincode it is not setting up a new scheduled task. Is there something in Fabric that is preventing this library from working within the chaincode? If that is the case, can you recommend another

IBM Blockchain (Hyperledger) - “Error when deploying chaincode”

喜夏-厌秋 提交于 2019-12-11 07:34:00
问题 I'm following the instructions to deploy some chaincode to the IBM Hyperledger Blockchain, using the swagger API on the IBM Bluemix dashboard. In order to deploy some chaincode, I need to submit a JSON request, which contains the path to the chaincode repository: { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "path": "https://github.com/series0ne/learn-chaincode/tree/master/finished" }, "ctorMsg": { "function": "init", "args": [ "Hello, world" ] },

How to bring an app developed on Hyperledger Composer to production?

戏子无情 提交于 2019-12-11 07:08:45
问题 I'm at the stage of my project where I've Developed the Chaincode (Model,Script,ACL,Queries) Deployed on IBM Cloud Developed Front-end Apps to communicate with the cloud based REST Server Tested the code and business logic through Playground and single user REST server Now I have to add identities, connection-profiles, & business network cards to the mix to make a production-testing ready prototype and to run REST Server on Multi-User Mode. But I'm having trouble with the said things as I can

Error: pathspecs with curl -sSL [shortened-url-here] | bash -s 1.1.0

限于喜欢 提交于 2019-12-11 06:21:42
问题 According to hyperledger-composer tutorial, to deploy network with multi-organization I need to clean previous installation of composer: cd ~/fabric-dev-servers ./stopFabric.sh ./teardownFabric.sh After that, I cloned hyperledger/fabric-sample branch git clone -b issue-6978 https://github.com/sstone1/fabric-samples.git Then, navigate to fabric-sample and download specific binaries from the repository with shortened link curl -sSL [shortened-url-here] | bash -s 1.1.0 Right after that, one

Creating own hyperledger fabric network Error main -> CRIT 003 Cannot define new channel with no Application section

若如初见. 提交于 2019-12-11 06:16:52
问题 I would like to create my hyperledger fabric network but I face an error when I try to create a channel. error on outputChannelCreateTx: Cannot define a new channel with no Application section My configtx file has of course application section, so I dont know what else can be the reason for. 回答1: Application has to be defined or referenced under the channel in the profile and also have an Application section if using *ApplicationDefaults. Profiles: ... ExampleChannel: Consortium: