blockchain

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" ] },

Chaincode is instantiated but doesn't appear in the list of instantiated codes

痴心易碎 提交于 2019-12-11 06:47:48
问题 I am running Hyperledger Fabric 1.4.0 I have 1 org ( Org1 ), 2 peers ( peer0 , peer1 ) and two orderers ( ord0 , ord1 ). The peers use couchdb as a storage backend. I am able to successfully install my chaincode, then instantiate it. Looking at peer0 logs, the docker image is built and the container started. peer0 also receives and acknowledges the REGISTER request sent by the chaincode binary within the container: 2019-06-24 10:15:57.003 UTC [dockercontroller] createContainer -> DEBU b563

IllegalFlowLogicException: A FlowLogicRef cannot be constructed for FlowLogic

两盒软妹~` 提交于 2019-12-11 06:19:34
问题 In my Corda I am trying to call a flow using RPC but I am getting this error while making the call to initiate the flow: net.corda.core.flows.IllegalFlowLogicException: A FlowLogicRef cannot be constructed for FlowLogic of type com.example.flow.PolicyFlow$Initiator: due to missing constructor for arguments: [class com.example.state.PolicyState] My Flow is shown in the snippet below: public SignedTransaction call() throws FlowException { class SignTxFlow extends SignTransactionFlow { private

Is it possible to use a third party CA in Hyperledger Fabrics for production phase

谁都会走 提交于 2019-12-11 06:06:55
问题 I am working in a company where we are using the hyperledger fabric to build our application. we have been using the fabric CA till now. Now for the production phase we are planning to move to third party ca provider. I have read the documentation of the Fabric CA (https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/) for understanding how it works. I have been looking in the Stackoverflow Fabric tag (https://stackoverflow.com/questions/tagged/hyperledger-fabric) if i could find some

How are Hyperledger transactions ordered in a block?

↘锁芯ラ 提交于 2019-12-11 05:11:08
问题 In Bitcoin blockchain a node/peer will order transactions, create a block, does the PoW and "announces" this block to the other miners. Once the other miners agree (by hashing the block+nounce+etc...) that the block is valid it is part of the blockchain. But in Hyperledger (as far as I understood) the VPs don't do mining (and hence don't spread the mined block). So how does the individual VPs order them so that all VPs have the same ordered transactions of blocks? 回答1: For the Fabric

Error while generating REST api using hyperledger composer-rest-server in centOS

自古美人都是妖i 提交于 2019-12-11 04:26:41
问题 I'm able to deploy business network using hyperledger composer in CentOS linux server but while generating REST apis using composer-rest-server i'm getting connection error? [root@bctlpblockchain03 ~]#composer network ping -c admin@tutorial-network The connection to the network was successfully tested: tutorial-network version: 0.15.2 participant: org.hyperledger.composer.system.NetworkAdmin#admin Command succeeded [root@bctlpblockchain03 ~]# composer-rest-server ? Enter the name of the

Event Hub has been Shutdown on Fabric Writing your first Application

北城以北 提交于 2019-12-11 02:38:02
问题 I am currently trying to run through the example first application for Hyperledger Fabric here -> http://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html I am unable to get past calling node invoke.js Originally I was getting the same error as this question Error invoking chaincode using Node.js SDK [TypeError: Cannot read property 'getConnectivityState' of undefined] But after reverting to grpc@1.9.1 I get the following result: I am able to do everything up to the node

How to create participant , there identities via rest api that generated by composer rest server without importing cards via /importwallets?

只愿长相守 提交于 2019-12-11 01:18:58
问题 I have created bna and deployed in composer rest server by enabling passport and multi-user, How to create participant, their identities via rest API that generated by composer rest server without importing cards via import wallets? and there is no proper documentation for this. 回答1: assuming you've done a /Wallet/Import of an identity that can issue other identities: eg. REST Endpoint /Wallets/Import browse for file your exported admin card eg. netadmin.card and Import it. use the POST

用Docker构建⼀个区块链工作和开发环境(下)

落花浮王杯 提交于 2019-12-10 16:39:43
上一篇奠定了基础的知识点以后,我们开始区块链之旅了! 我们要做的第一件事是将“geth”节点连接到以太坊生产网络,从而保证我们的本地区块链同步,并为其他工具打开服务端口 - 当然也是在容器中运行。 通过“docker run”命令,启动镜像“ethereum / client-go”。 RUN命令具有以下参数: “-it”以交互模式启动容器,并将容器的标准输出发送到我们的终端。当以后重新启动容器时,我们可以选择在后台运行该进程,但是现在我们要看看发生了什么。 “ - -name”给容器以逻辑名“ethereum”,我们稍后可以使用它来访问这个实例。 “-p 30303:30303 -p 8545:8545 -p 8546:8546”公开并且将三个端口从容器内部映射到外部。 “-v /opt/docker/ethereum:/root/.ethereum”将主机目录“/ opt / docker / ethereum”(我们要存储区块链数据的位置)挂载到位置“/ root / .ethereum“。后者是“geth”在使用root用户帐户启动时存储所有信息的默认位置。 这个镜像的ENTRYPOINT命令“geth”可以通过INSPECTing可视化来调用,就像我们在主机上直接运行时使用该工具一样。请注意,容器命令行参数不能(容易)过后更改,如果需要不同的命令行

How do you convert between Substrate specific types and Rust primitive types?

ε祈祈猫儿з 提交于 2019-12-10 15:59:55
问题 Using the Substrate blockchain framework, how can I convert between Substrate specific types and Rust primitive types and vice versa? For example: Convert a time ( T::Moment ) to a u64 Convert a u64 to a T::Balance etc... 回答1: For the latest in Substrate master Substrate has removed As in favor of From / Into . An assumption is made that all types are at least u32 . From the trait SimpleArithmatic , the following are implemented: From : u8 , u16 , u32 TryFrom : u64 , u128 , usize TryInto : u8