hyperledger

First network in hyperledger

a 夏天 提交于 2019-11-30 07:41:38
I am trying to work on my first network in Hyperledger Fabric. Using the following documentation http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html I have completed the setup till http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#create-join-channel but when I run the peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com

how we can call one chaincode from another chaincode in fabric 1.0 ?? if anyone having example please share

浪尽此生 提交于 2019-11-30 07:30:59
I want to call one chaincode from another chaincode in fabric 1.0 so I have some questions: 1) can we install two chaincode on single peer 2) if we install two chaincode on different peer, how we can call one into another? 3)if anybody having sample example please share. This is should be pretty straight forward to achieve, here is an example: // Invoke func (am *accountManagement) Invoke(stub shim.ChaincodeStubInterface) peer.Response { actionName, params := stub.GetFunctionAndParameters() if actionName == "callAnotherCC" { chainCodeArgs := util.ToChaincodeArgs("anotherCCFunc", "paramA")

FABRIC returns Error: Got unexpected status: BAD_REQUEST

三世轮回 提交于 2019-11-30 05:46:10
问题 From fabric document create-join-channel, when I execute the command peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem it return error snippet following message: 2017-08-16 01:34:13.902 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP

Hyperledger: get “/bin/bash: ./scripts/script.sh: No such file or directory” when running “./byfn -m up”

℡╲_俬逩灬. 提交于 2019-11-30 04:57:58
问题 I'm a newer for the hyperledger and just studying it by following the tutorials on http://hyperledger-fabric.readthedocs.io. I am trying to build the first network using "first-network" in the fabric-samples. The ./byfn -m generate is OK. But after typing ./byfn -m up , I meet /bin/bash: ./scripts/script.sh: No such file or directory error and the process hangs. What is going wrong? PS: The OS is Windows 10. 回答1: Check to see if you have a local firewall enabled. Depending on your docker

Where do smart contracts reside in blockchain (Ethereum or Hyperledger)

你离开我真会死。 提交于 2019-11-30 02:07:16
So, let us consider a typical trade finance process flow. Exporter deploys a contract that has conditions of the shipment and a hash is generated once the deployment is finished. Questions: 1) Where is the contract stored? 2) How other participants such as customs and importer can access this contract? 3) Can we activate participant level access to the contract on the blockchain? There are several aspects to Ethereum and Hyperledger which make them quite different. Let me give a somewhat simplified answer to not get into too much details and a too long answer. First of all, Ethereum is

Error starting hyperledger fabcar sample application

家住魔仙堡 提交于 2019-11-29 23:46:23
问题 I am trying to install hyperledger-fabric sample application from http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html I am getting error similar to post mentioned here: hyperledger fabric fabcar error 2017-08-24 07:47:16.826 UTC [grpc] Printf -> DEBU 005 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 172.18.0.5:7051: getsockopt: connection refused"; Reconnecting to {peer0.org1.example.com

Add Org or peer in Org dynamically in Hyperledger fabric

不想你离开。 提交于 2019-11-29 22:43:36
I am using http://hyperledger-fabric-doc.readthedocs.io/en/latest/getting_started.html for Hyperledger Fabric setup in Ubuntu VM. As per tutorial (fabric-samples/first-network) which have two organizations with two peers have been created. I wanted to add new organization or new peer in already existing Organization dynamically. Kindly help me know the steps to add dynamically. It isn't to the point of being "dynamic" just yet. However, the reconfiguration is done using the configtxlator tool to read the genesis block and modify it's contents, then submit it as a new transaction that updates

Fabric java sdk 1.4简明教程

我是研究僧i 提交于 2019-11-29 18:51:29
在超级账本Fabric区块链中,应用通过节点的RPC协议接口访问链码。Java应用可以使用官方提供的Fabric-sdk-java开发包来实现对链码的访问,开发包封装了Fabric区块链的GRPC链码访问协议,有利于开发人员聚焦于业务逻辑。不过Fabric-sdk-java的文档质量保持了Hyperledger Fabric产品一贯的不知所云,看起来实在是令人捉急。本文将尝试编写一个最简单的可以访问Fabric链码的Java应用,来帮助你快速上手Farbic区块链的Java应用开发。 如果希望快速掌握Fabric区块链的链码及应用开发,建议访问汇智网的在线互动课程: Fabric区块链Java开发详解 Fabric区块链NodeJs开发详解 基本原理 在Fabric区块链中,应用通过节点的RPC协议接口访问链码: 类似于Shim API对链码通信协议的封装,Fabric Java SDK提供了 对节点RPC协议接口的封装,其入口类为HFClient,对链码的查询和交易操作则 封装在Channel类中: 由于Fabric是许可制区块链,因此应用也需要持有证书和私钥以表征自己的身份,HFClient实例依赖于User接口的实现对象来访问一个特定身份的证书和私钥,因此在访问 链码之前,我们需要首先定义一个简单的User接口实现类。 实现User接口 HFClient

以太坊、EOS、Hyperledger、Cosmos和Cardano等区块链的比较

泄露秘密 提交于 2019-11-29 18:34:18
不同的区块链智能合约和区块链技术现在风靡一时。越来越多的人出于某种原因试图进入这个神奇的世界。如果你是这项技术的新手并正在寻找基于区块链的开发平台的快速入门,那么本指南非常适合你。我们将重点关注和比较的平台是: Ethereum EOS Hyperledger Cosmos Cardano 那么,为什么我们决定关注这5个平台?我们认为这几个平台提供了可用性和功能性的组合。是的,我们也知道其中一些项目并未完全上线,但我们仍然认为项目的潜力足以保证我们的名单上有它一个位置。我们将先介绍每个平台,然后在最后比较它们。 以太坊 毫无疑问,以太坊是智能合约平台的老大。以太坊背后的主要人物是Vitalik Buterin。Buterin对比特币非常着迷,但他意识到区块链技术比仅仅作为支付协议的推动者有更多的用途。他意识到可以使用区块链技术来创建去中心化的应用程序。于是他被启发创造了以太坊。 像比特币一样,以太坊是一种加密货币,然而,也就是这个地方还有些相似性。因为虽然比特币是“第一代”区块链,但以太坊通过成为有史以来第一个第二代区块链打破了局面。以太坊通过在区块链上引入智能合约,彻底改变了加密世界。 智能合约首先由Nick Szabo概念化。这个想法很简单,在双方之间有一套自动执行指令,不需要由第三方监督或执行。这个想法似乎很简单,对吧?然而,智能合约使以太坊能够创建一个环境

How to authenticate to REST API and map to Fabric credentials

拥有回忆 提交于 2019-11-29 15:31:36
问题 How can I create a new user account with username/password to authenticate against composer-rest-server? How would I authenticate with this newly created user account against composer-rest-server? How would I manage the session for that user? How can I map this user to a network participant? Can composer-rest-server user be mapped to more then one network participant (i.e. perform different roles)? Do I need to create a wallet for each composer-rest-server user? How would I share wallets