hyperledger

Fabric创建channel与加入channel之cli操作步骤

匿名 (未验证) 提交于 2019-12-02 22:56:40
首先确认环境必须已经启动hyperledger/fabric-tools。 一.创建channel 1.进入cli docker exec -it cli bash 2.设置环境变量,默认在peer0上做创建。 export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp export CORE_PEER_ADDRESS=peer0.org1.example.com:7051 export CORE_PEER_LOCALMSPID="Org1MSP" export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt 3.创建channel export CHANNEL_NAME=mychannel peer channel create -o orderer

Error: 2 UNKNOWN: access denied: channel [contentbackchainchannel] creator org

谁说胖子不能爱 提交于 2019-12-02 21:29:55
I've fabric network setup with two orgs; orchestratororg and participantorg. With user of orchestratororg I can invoke or query chaincode but when trying to query with user of participantorg I get an error as follows: "Error: 2 UNKNOWN: access denied: channel [contentbackchainchannel] creator org [ParticipantOrgMSP]" You can access my network setup under Network config Tariq Try to use following commands, Inside fabric-tools folder ./teardownFabric.sh ./startFabric.sh ./createPeerAdminCard.sh Then go to business card and run following. Make sure you already created archive file for your

How to add a new peer to an existing Hyperledger Fabric network?

老子叫甜甜 提交于 2019-12-02 21:25:27
When you create a hyperledger fabric network, you define organizations, orderers and peers in crypto-config.yaml and configtx.yaml . But how do you add a new organization or a new peer to an existing organization in a network that is already setup? Run cryptogen and configtxgen pointing to config files that contain only the new organizations/peers? Re-generate everything? Abdul Wahab You can achieve this by generating the crypto material (using cryptogen extends ) for the new peer, spawning the new peer and joining that peer to the existing channel on the network to sync-up. You can find the

How does Hyperledger Fabric enforces ACL?

╄→尐↘猪︶ㄣ 提交于 2019-12-02 19:17:15
问题 I would like to know how either Fabric or composer can enforce Access Control Logic (ACL). As I read through the documents, ACL is a way to control permission to peers within a channel. When I, as a peer, have a local copy of the ledger, what would prevent me from reading the data that I locally have, although in ACL I am denied to have access? In this case I am talking only about ACL without using the new feature private data collections. I appreciate any help. Thank you very much. 回答1:

Hyperledger Composer - ACL Rule with function in condition

拜拜、爱过 提交于 2019-12-02 18:54:39
问题 I'm trying to write a little complexer logic in the condition of an ACL Rule as always the p.getIdentifier() == r.getIdentifier() , because in my fault it isn't possible. These are my models: participant Customer identified by customerID { o String customerID o String name ... } asset A identified by aID { o String aID --> Customer customer } asset B identified by bID { o String bID --> A a } Now I want to give the Customer access to see all B assets, but only where the relationship to A

Something wrong on deploy chaincode for hyperledger v1.0

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 17:14:41
问题 I have tried to use docker toolbox to setup Hyperledger V1.0 in my local machines. I according to this document: http://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html But when I tried to deploy chaincode. $node deploy.js I got an error message: info: Returning a new winston logger with default configurations info: [Chain.js]: Constructed Chain instance: name - fabric-client1, securityEnabled: true, TCert download batch size: 10, network mode: true info: [Peer.js]: Peer.const -

Hyperledger Fabric 安装

耗尽温柔 提交于 2019-12-02 16:59:35
  前一篇已经准备好了运行环境,本篇将介绍Fabric的安装以及测试网络环境    Fabric的安装   HyperFabric安装大致可以分成两种,     第一:使用自带在脚本安装,可以下载fabric-sample和二进制文件到操作系统,简化安装过程。     第二:以源码在方式进行本地编译安装,此方式相对第一种比较复杂,需手动编译生存相应工具。   本次将以第一种方式进行讲解,后续将以专门在篇幅介绍第二种方式进行安装。   第一种安装方式步骤如下:     1. 创建目录:单独创建目录,方便后续管理       mkdir hyfa && cd hyfa     2. 新建bootstrap.sh并添加内容       vim bootstrap.sh       将最新hyperledger-fabric项目中sripts下bootstrap.sh内容拷贝到该文件,或者直接下载文件进行覆盖均可。       https://github.com/hyperledger/fabric/blob/master/scripts/bootstrap.sh     3.修改权限       chmod +x bootstrap.sh     4.执行脚本文件       sudo ./bootstrap.sh 1.4.0 (如果执行失败,可再次执行该命令,已下载的不会重新下载)

how to access the 'eventEmitted' field in transaction history of hyperledger fabric

只谈情不闲聊 提交于 2019-12-02 16:21:19
问题 I am working on hyperledger fabric.I want to access the 'eventEmitted' field in transaction history of hyperledger fabric. /*transaction history*/ "transactionType": "com.acn.hps.aops.ims.addingEvidence", "eventsEmitted": [ { "$class": "com.acn.hps.aops.ims.BasicEvent", "evidenceId": "100", "eventId": "b66fd1c38754519339172905d916497376029ad9620ba5f19999fb73cf1d8b58#0", "timestamp": "2018-03-01T08:36:41.164Z" } ] I was able to query the Transaction type and got the result, but now to access

Hyperledger Fabric 环境搭建

守給你的承諾、 提交于 2019-12-02 14:15:47
  前两个月间断的用业余时间在网上查了些相关的环境搭建步骤,没有比较完善的,且版本都比较旧了。最近国家响应区块链技术,于是在图书馆中无疑发现了一本关于hyperledger fabric相关的书籍,有些内容写的比较清晰简洁,结合自己实测经验,在此笔记一下。    环境搭建:     操作系统: 建议64位ubuntu16.04, 内存2G以上,硬盘30G以上 (自己也测试过windows,装了个虚拟机即可)      工具:        1.git(用户获取git相关源码及内容)         sudo apt update         sudo apt install git        2.安装 curl (用于下载东西)         sudo apt install curl        3.安装docker         检查是否已安装: docker --version         安装最新版:           sudo apt update           sudo apt install docker.io         查看版本: docker--version 输出类似如下版本信息:Docker version 17.03.2-ce, build f5ec1e2        4.安装 docker-compose        

Difference between various blockchain protocols [closed]

女生的网名这么多〃 提交于 2019-12-02 14:14:48
As the developers are constantly using different network protocols of blockchain such as Hyperledger, multichain, Ethereum, Corda, and others. Community will appreciate if the developers & blockchain enthusiasts can pour in some key differences between various types of blockchains as mentioned above. Thanks ! christo4ferris This is a good question, though not one easily addressed with a simple answer. As @Mat0 commented above, one difference is the approaches that the various platforms are using to achieve consensus. Some use proof of work (PoW), others use variants of byzantine fault tolerant