blockchain

Implement inter-channel security among the peers within the same channel in Hyperledger Fabric V1.0

。_饼干妹妹 提交于 2019-12-05 22:45:00
I have successfully create a Hyperledger Fabric v1.0 network locally by following the steps Building Your First Network and communicating to this network from my java application using fabric-sdk-java . Here it created the certificates using cryptogen tools and is able to invoke/query chaincode through each of the peers which participating in the same channel. My implementations is like: I have four organisations Org1, Org2, Org3 and Org4 each having one peer. When Org1 creating an asset A1 with quantity 100 using the chaincode C1, it has to share this asset among the peers like Org2.peer0 A1:

How to get all existing channels in Hyperledger 1.0 (Node SDK)

回眸只為那壹抹淺笑 提交于 2019-12-05 22:00:54
I am using the Node SDK with Hyperledger 1.0 and want to check if a channel with a specific name exists. Is there a way to query all existing channels? And is there a way to get a channel by name? You cannot see all available channels, while you can leverage CSCC (Configuration System Chaincode) GetChannels API to get a list of channels client eligible to. You just need to invoke chaincode named CSCC. The CSCC is the system chaincode, meaning it inherently built in into peer binary and loaded and "instantiate" during peer startup. You can find details here . Considering NodeJS the request will

How to change Endorsement policies

走远了吗. 提交于 2019-12-05 19:37:58
I changed the endorsement policy from "OR" to "AND" with BYFN and instantiate the Chaincode. But, the data in the ledger is not changed even after the Invoke is executed. I confirmed "OR" condition is working.(data in the ledger is changed) Kindly let me know how I can solve it. peer chaincode instantiate -o orderer.example.com:7050 --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 -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a", "100",

Chaincode (smart contract) interactions within and across channels in Hyperledger Fabric

纵然是瞬间 提交于 2019-12-05 17:39:37
Consider the Organization-Peer setup in a Hyperledger Fabric network as shown in the image. Org 1 has two peers, Org 2 has one peer - all of which exist inside the same channel - X. Org 3 has one peer which exist outside in a different channel. The peers have distinct chaincodes(c1, c2, c3 & c4) installed in each of them with the functions as explained. write() - put a key-value pair into the ledger update() - update a value for an existing key read() - query an existing key-value pair Now on to few questions. Can c3 invoke c2 to update a key's value (as c3 do not have update() function)? Can

Issue to run curl command in windows 7 Docker Quickstart Terminal

早过忘川 提交于 2019-12-05 14:10:52
I am trying out the steps for setting up a sample hyperledger fabric1.0 network as per the steps mentioned here on windows 7. As part of this I am following these steps for Hyperledger Fabric Samples . Since my OS is Windows7 64bit , I am using Docker Toolbox But my problem here is, while running the following command in Docker Quickstart Terminal curl -sSL https://goo.gl/iX9dek ¦ bash I am getting the error bash: line 1: syntax error near unexpected token `newline' bash: line 1: <HTML> I also found a note in the steps like If you get an error running the above curl command, you may have too

A Hybrid Blockchain Ledger for Supply Chain Visibility

烈酒焚心 提交于 2019-12-05 10:40:46
Abstract 通过提高贸易伙伴的可见度来优化实物分销可直接影响产品成本。然而,当前的供应链信息系统通常缺乏经济有效地将地面实况信息近乎实时地传递给所有利益相关者,最重要的是在运输过程中向供应商和客户传递的能力。本文提出了一种通过点对点架构解决这一差距的解决方案,该架构可以支持在供应链的物流分配阶段对可见性和及时交付信息的不断增长的需求。所提出的解决方案的附加特征包括传递给贸易伙伴的信息的可扩展性,隐私性和有效性。该解决方案使小型,中型和大型企业能够通过私有区块链子分类账以动态和以货物为中心的方式进行交互,该子分类帐将每批货物的托管链转移数字化。此私人分类帐中的信息由公共事件分类帐增强,该分类帐近乎实时地反映货件的移动。第三方监视器通过将事件形式的物理接近度发布到公共分类帐,从而验证货物的地理位置。 INTRODUCTION 全球供应链(SC)是供应商,制造商,仓储商,运营商和客户之间交互和权衡的复杂而动态的组合,以便在合适的时间和正确的条件下提供正确的产品[1]。典型的SC包括八个主要流程:客户关系管理,客户服务管理,需求管理,订单履行,制造管理,供应商关系管理,产品开发和退货管理[2]。支持这些流程中的权衡决策以便最大化利润而不仅仅是为了最小化成本的数据分布在全球SC中,系统和基础数据的所有权根据所做出的决策类型而变化。在过去的二十年中,企业解决方案已经开发出来

hyperledger fabric invoke.js “Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP]”

两盒软妹~` 提交于 2019-12-05 07:49:05
问题 I am able to invoke my chaincode from docker cli successfully (fabric-shim). i ran enrollAdmin.js and registerUser.js sucessfully, but when i try to run invoke.js or query.js, i get Error: 2 UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] . 回答1: Though there are limited information shows above, the peer log give the essential hint about the problem: WARN 044 channel [mychannel]: MSP error: the supplied identity is not valid: x509: certificate signed by unknown authority

How can the transaction certificates in Hyperledger be used to enforce privacy?

我是研究僧i 提交于 2019-12-05 03:59:36
问题 I am creating a blockchain app in Hyperledger that performs a bidding process for a manufacturing company. The bidding process involves 4 suppliers (Supplier A to Supplier D). The one with the lowest bid wins. I am able to create the chaincode for this. However, since it is a blockchain, the suppliers can see each other's bid (e.g., by simply looking at the contents of the blocks). In addition, the non-winning suppliers will know who actually won the bidding process. I want to enforce the

Get token balance with Ethereum RPC?

无人久伴 提交于 2019-12-05 02:57:07
问题 how display balance of token through Ethereum RPC? $id = 0; $data = array(); $data['jsonrpc'] = '2.0'; $data['id'] = $id++; $data['method'] = 'eth_call'; $data['params'] = [['from' => '0x0...', 'to' => '0x0...', 'data' => 'contract byte code here 0x0...'], 'latest']; $ch = curl_init(); ... Return: {"jsonrpc":"2.0","id":0,"result":"0x"} What to do next? Call contract method balanceOf? How to do that? 回答1: To get token balance with eth_call you need to and data parameter. to is contract address

区块链(Blockchain)-应用场景

左心房为你撑大大i 提交于 2019-12-05 02:55:52
典型应用场景 科技创新,应用为王。 一项新技术能否最终落地普及,取决于很多影响因素。其中很关键的一点便是能否找到合适的应用场景。以比特币网络为代表的大规模数字货币系统,长时间自治运行,支持了传统金融系统都难以实现的全球范围即时可靠交易。这为区块链技术的应用潜力引发了无限遐想。如果未来基于区块链技术构造的商业价值网络成为现实,所有的交易都将高效完成且无法伪造;所有签署的合同都能按照约定严格执行。这将极大降低整个商业体系运转的成本,同时大大提高社会沟通协作的效率。从这个意义上讲,基于区块链技术构建的未来商业网络,将可能引发继互联网之后又一次巨大的产业变革。 目前,金融交易系统已经开始验证和使用区块链系统。包括征信管理、跨国交易、跨组织合作、资源共享和物联网等诸多领域,也涌现出大量有趣的应用案例。本章将通过剖析这些典型的应用场景,展现区块链技术为不同行业带来的创新潜力。 一、应用场景概览 区块链技术已经从单纯的技术探讨走向了应用落地的阶段。国内外已经出现大量与之相关的企业和团队。有些企业已经结合自身业务摸索出了颇具特色的应用场景,更多的企业还处于不断探索和验证的阶段。 实际上,要找到合适的应用场景,还是要从区块链技术自身的特性出发进行分析。 区块链在不引入第三方中介机构的前提下,可以提供去中心化、不可篡改、安全可靠等特性保证。因此,所有直接或间接依赖于第三方担保机构的活动