hyperledger

How to use hyperledger getnative API

老子叫甜甜 提交于 2019-11-29 14:45:19
I came across the getNative API through which one call chaincode from Hyperledger composer. See here: https://github.com/hyperledger/composer/issues/3120 Can someone please tell me exactly how does this work? Say if I have a very simple chaincode with a getter and setter, can I invoke those from the JS code in composer To call the Hyperledger Fabric API in a transaction processor function of composer , the function getNativeAPI must be called. getNativeAPI allow users to call directly of the Fabric shim API which provides the APIs for application developers to implement "Smart Contracts" for

How to upgrade a chaincode after modification?

丶灬走出姿态 提交于 2019-11-29 12:28:16
I am new to hyperledger and is going through the example here . I am tried to play around the chaincode but is now stuck at the part where I am suppose to upgrade the chaincode I have tried to execute the peer chaincode upgrade within the docker peer node: peer chaincode upgrade -n tuna-app -p github.com/tuna-app but end up with the error Error getting (testchainid) orderer endpoint: Error endorsing GetConfigBlock: rpc error: code = Unknown desc = chaincode error (status: 500, message: "GetConfigBlock" request failed authorization check for channel [testchainid]: [Failed to get policy manager

Best practice to save files in blockchain

扶醉桌前 提交于 2019-11-29 10:28:49
问题 What is the best practice to save files as part of a blockchain's data? I have tremendously large files to be saved. Can't we save these file on cloud storage (centralized solution like dropbox), and link them with blockchain data using a file hash? Or is it better to use a distributed file storage like IPFS? Or is there any better solution in term of security, volume, performance, and fault tolerance. 回答1: You do not want to directly use a traditional blockchain. Blockchains are good for

First network in hyperledger

不羁岁月 提交于 2019-11-29 10:24:46
问题 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

fabric-sdk-java 1.4安装说明

可紊 提交于 2019-11-29 09:29:43
Hyperledger Fabric Java SDK是开发基于Hyperledger Fabric区块链的Java应用之必备开发包。本文将介绍如何在Maven、Gradle和Eclipse中安装使用最新1.4版本的Hyperledger Fabric Java SDK。 如果希望快速掌握Fabric区块链的链码及应用开发,建议访问汇智网的在线互动课程: Fabric区块链Java开发详解 Fabric区块链NodeJs开发详解 1、在Maven下使用Fabric Java SDK 在maven配置文件pom.xml中添加对fabric-sdk-java的依赖即可: <!-- https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java --> <dependency> <groupId>org.hyperledger.fabric-sdk-java</groupId> <artifactId>fabric-sdk-java</artifactId> <version>1.4.1</version> </dependency> 2、在Gradle下使用Fabric Java SDK 在gradle配置文件build.gradle中添加对fabric-sdk-java的依赖即可:

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

a 夏天 提交于 2019-11-29 09:22:48
问题 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. 回答1: 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

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

China☆狼群 提交于 2019-11-28 22:17:40
问题 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? 回答1: There are several aspects to Ethereum and Hyperledger which make them quite different. Let me give a somewhat

写在HyperLedger Fabric翻译之前

大兔子大兔子 提交于 2019-11-28 20:43:13
  因为比特币等数字货币的推广,让区块链的知名度越来越高。区块链分为,公有链,联盟链,私有链。从个人了解的知识觉得联盟链的应用程度或高于另外两种。为什么呢?区块链比较核心的作用是解决信用问题,所以私有链的应用场景不是很大(一个人建立一个私有链的商业价值不大),或者完全可以归入到联盟链中。   公有链应用虽然是众心所向,也是最正宗最原始的区块链。但是因为在现在社会中区块链的落地除了理想,还要考虑落地场景的应用可行性和经济可行性。比特币,以太坊虽然影响都较大。但是那都还只是停留在数字货币的炒作阶段,还没有找到满足业务和经济可行性的落地场景。同时从各个国家的监管层面来看,区块链的匿名等特性,很可能成为反恐,反洗钱聚焦的地方。   对于联盟链,因为联盟成员都是经过筛选,选择后才允许进入的。所以在联盟成员的可信度方面是可控的,同是现在的社会中小型的联盟,实现可追溯和的商业场景比较多,对这方面的技术落地可行性比较高。虽然称之为阉割版的区块链,但是我相信在后续的落地中联盟链的速度将优先于其它两种。   以上是个人的一点见解,话题转回来。Fabric的翻译在网上随处可见,为什么自己还要翻译呢。这个更多的是从个人角度考虑的。因为我希望通过文章的翻译让自己浮躁的心能够静下来,同时也希望自己的一些见解能够帮助到别人,这就是自己的最终目的。 来源: https://www.cnblogs.com

Difference between hyperledger composer and hyperledger fabric?

拜拜、爱过 提交于 2019-11-28 19:11:08
I am java developer and new to hyperledger. I am interested in learning it and need to know where to start . fabric vs composer? Hyperledger Composer simplifies application development on top of the Hyperledger Fabric blockchain infrastructure. If you are interested in the blockchain infrastructure, start with the Fabric tutorials . If you are interested in blockchain applications, start with the Composer tutorials . The Fabric tutorials also include samples of low level chaincode development (in golang). Composer is a higher level application development framework. I'd suggest trying both to

Hyperledger区块链技术生态

会有一股神秘感。 提交于 2019-11-28 18:47:48
Hyperledger区块链技术生态 Hyperledger是一个专注于企业级区块链技术并推动区块链跨行业应用的开源项目,孵化并推广一系列区块链技术,包括分布式账本框架,智能合约引擎,客户端库,图形界面,实用程序库和示例应用程序。Hyperledger鼓励重复使用通用构建模块化,并实现DLT组件的快速创新。 Hyperledger框架 Hyperledger Burrow是一款可以使用的智能合约机。Burrow是2014年12月发布的第一款此类产品,它提供了一个模块化区块链客户端,其中包含一个部分符合以太坊虚拟机(EVM)规范的许可智能合约解释器。 Hyperledger Fabric作为开发具有模块化架构的应用程序或解决方案的基础,Hyperledger Fabric允许组件(例如共识和成员服务)即插即用。 Hyperledger Grid是一个基于WebAssembly的项目,用于构建供应链解决方案。它包括一组库,数据模型和SDK,以加速供应链智能合约和客户端界面的开发。 Hyperledger Indy是一种分布式分类账,专为分散身份而设计。它提供工具,库和可重用组件,用于创建和使用基于区块链或其他分布式账本的独立数字身份,以实现互操作性。 Hyperledger Iroha是一个易于使用的模块化分布式区块链平台,具有自己独特的共识和订购服务算法