hyperledger

Why Chaincode instantiate giving error trying to connect to local peer?

筅森魡賤 提交于 2020-01-16 14:46:12
问题 Hi Everyone I have successfully installed the chaincode on my all peers. So when I am trying to instantiate chaincode it is giving me following error which are mentioned below. Please help me with this , I am new to this thing so may be i missed somewhere something. I have referred some of the question related to this but i did not get anything. First Command - root@7485ef4909d6:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.indirasoft.com:7050 -C

Can I pass objects to a Hyperledger Fabric transaction?

淺唱寂寞╮ 提交于 2020-01-16 08:49:07
问题 I have a network set up that is based on the fabcar example. Customized the chaincode and the folder structure, and it all seems to compile and fire up just fine. But now, I am trying to find out whether I can use function Contract.submitTransaction() (found in invoke.ts and covered in the docs) or a more applicable function to pass somewhat more complex arguments for custom type Shipment which is based on type Car of the original example. In the example, Car is simply a flat type of string s

Cannot create channels with new orgs in Fabric, got error: Attempted to include a member which is not in the consortium

限于喜欢 提交于 2020-01-16 00:41:40
问题 Here is what I need to do in steps: Create a fabric network with 2 orgs: Org1 and Org2. Create a channel between them: publicchannel. now add an Org3 using steps from this tutorial by fabric: https://hyperledger-fabric.readthedocs.io/en/latest/channel_update_tutorial.html Create a new channel: org3org1channel, between org3 and org1. I'm experiencing problems with step 4, it is returning: Error: got unexpected status: BAD_REQUEST -- Attempted to include a member which is not in the consortium

How to add a new orderer in a running hyperledger fabric network using raft?

偶尔善良 提交于 2020-01-14 10:08:38
问题 I want to add a new orderer to my existing running network. Currently my network is as follows : docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 998b93eb81c6 hyperledger/fabric-tools:latest "/bin/bash" About a minute ago Up About a minute cli 87bada2d914b hyperledger/fabric-orderer:latest "orderer" About a minute ago Up About a minute 0.0.0.0:8050->7050/tcp orderer2.example.com 5907f35bb5b4 hyperledger/fabric-orderer:latest "orderer" About a minute ago Up About a minute 0.0

Chaincode for Developers Cli error terminal 3

吃可爱长大的小学妹 提交于 2020-01-14 04:06:27
问题 I am trying to deploy chaincode using the chain code for developers tutorial "http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html". I was able to complete the steps till Terminal 2 but get an Error in the command "docker exec -it cli bash" for Terminal 3. Output for Terminal 1: []Received message REGISTER from shim peer | 2017-08-22 23:29:26.025 UTC [chaincode] HandleMessage -> DEBU 1a9 []Fabric side Handling ChaincodeMessage of type: REGISTER in state created peer | 2017-08

Transaction not found on remote peer

僤鯓⒐⒋嵵緔 提交于 2020-01-14 03:45:06
问题 I'm trying to setup simple blockchain network with Hyperledger fabric v1.0 on 2 instances. My scenario Instance A: Orderer and Peer0 Instance B: Peer1 I basically followed the "Use the native binaries" section of "Getting Started" page. What I tried is I started 1 orderer and 1 peer on instanceA. I installed, instantiated, invoked and made a query the example chaincode. Then I started 1 peer on instanceB. I could let peer1 on instanceB join my channel from instanceA. I could install the

Hyperledger Fabric v1.1.0环境搭建

限于喜欢 提交于 2020-01-14 00:42:07
一、搭建基础环境 参考:https://www.cnblogs.com/sky-cheng/p/12150822.html 二、下载Hyperledger Fabric 源代码 查看$GOPATH环境变量 [root@localhost home]# echo $GOPATH /home/go 在/home/go下建立如下目录 [root@localhost home]# mkdir -p /home/go/src/github.com/hyperledger [root@localhost home]# 进入新建的目录,下载Fabric源代码 [root@localhost home]# cd /home/go/src/github.com/hyperledger/ [root@localhost hyperledger]# git clone https://github.com/hyperledger/fabric.git 正克隆到 'fabric'... remote: Enumerating objects: 12, done. remote: Counting objects: 100% (12/12), done. remote: Compressing objects: 100% (11/11), done. remote: Total 125935 (delta

初学Hyperledger indy day2

别说谁变了你拦得住时间么 提交于 2020-01-13 15:25:02
参考: https://blog.csdn.net/li_jiachuan/category_8094510.html identity owner(我们自己) claims(关于identity owner的不同类型的assertions,在数字身份业界中的称呼) issuer(颁发者,可信机构) verifier(验证者,需要相信claims的个人或公司) verifiable claims(定义、交换和验证数字凭证的一个标准的方式) Decentralized identifier,DID(去中心化的身份标识) PKI的问题 PKI的本质问题是它很笨重,昂贵并且是中心化的 当今浏览器中使用的PKI依赖于一些数量(几百个)certificate authorities(CAs)作为roots of trust。 从声誉好的CAs那里获得certificates是需要花费时间和精力的。能够称为一个CA被描述为有执照来印钱,因为这些中心化的roots of trust被构建到了浏览器和其他的软件当中。这就是为什么大多数的数字证书(digital certificates)是由公司购买的,而不是个人。这个对于个人来讲太难应用。 更糟糕的是,在我们的数字信任基础设施(digital trust infrastructure)中插入了这样一个中间人会造成危险

hyperledger fabric共识组件分析 --背书策略

℡╲_俬逩灬. 提交于 2020-01-13 12:47:58
在fabric中,共识过程意味着多个节点对于某一批交易的发生顺序、合法性以及它们对账本状态的更新结构达成一致的观点。满足共识则意味着多个节点可以始终保证相同的状态,对于以同样顺序到达的交易可以进行一致的处理。 具体来看,fabric中的共识包括背书、排序和验证三个环节的保障。 我们先来研究下背书策略。 一.什么是背书策略 chaincode在实例化的时候,需要指定背书策略。这里的背书策略就是需要什么节点背书交易才能生效。 发起交易的时候,发起端(一般是SDK),需要指定交易发给哪些节点进行背书验证(fabric不会自动发送),而是由sdk发送。发送后等待背书节点的返回,收集到足够的背书后将交易发送给orderer(排序节点或称共识节点)进行排序打包分发。最后,当每个Peer接受到block数据后,会对其中的交易进行验证,如果交易不符合背书策略,就不会在本地生效,所以真正验证背书是在这一步。 二.Endorsement policy 设计 背书策略有两个主要组成部分: 主体(principal):P定义了期望的签名来源实体 门槛(thshold gate):T有两个参数:整数t(阈值)和n个主体,表示从这n个主体中获取t个签名 例如: T(2, 'A', 'B', 'C')表示需要A、B、C中任意2个主体的签名背书 T(1, 'A', T(2, 'B', 'C')

hyperledger fabric first_network example create channel got BAD_REQUEST

不羁的心 提交于 2020-01-13 06:02:25
问题 I have been following tutorial on hyper ledger website: https://hyperledger-fabric.readthedocs.io/en/release/build_network.html#behind-scenes. I was able to run ./byfn.sh -m generate ./byfn.sh -m up This setup run all the way through of showning the end. like: ===================== All GOOD, BYFN execution completed ===================== _____ _ _ ____ | ____| | \ | | | _ \ | _| | \| | | | | | | |___ | |\ | | |_| | |_____| |_| \_| |____/ ./byfn.sh -m down Then I begun to follow the tutorial