简体   繁体   English

在 Hyperledger Fabric 中涉及私有通道时,公共数据块存储如何更新?

[英]How public data block storage get update when involving private channel in Hyperledger Fabric?

I recently get interesting in Hyperledger Fabric.我最近对 Hyperledger Fabric 产生了兴趣。 I come across the concept of a private channel.我遇到了私人频道的概念。 I seem to get the idea of how it works.我似乎明白它是如何工作的。 However, I got stuck when considering the following scenario on basic money transactions between three parties.但是,在考虑以下三方之间基本货币交易的场景时,我陷入了困境。

在此处输入图像描述

If we consider the above case when Alice wants to send money to Blob in a private channel and then send the money to Sara over the normal use case.如果我们考虑上述情况,Alice 想通过私人渠道向 Blob 汇款,然后通过正常用例将钱汇款给 Sara。 How the peer outside the channel then verify the balance of Alice if they don't have the information about Alice and Blob private transaction?如果通道外的对等方没有 Alice 和 Blob 私人交易的信息,他们如何验证 Alice 的余额?

You can do two ways你可以做两种方式

  • control this in chaincode level在链码级别控制它
  • control this in client level在客户端级别控制它

what you are trying to do is some data present in one channel need to appear in another channel您要做的是一个通道中存在的一些数据需要出现在另一个通道中

you can query other channel data in chaincode itself else query private channel data before you call to public channel您可以在链码本身中查询其他通道数据,或者在调用公共通道之前查询私有通道数据

Remember one thing there is no a concept called private/public channel if an organization is not part of a channel then it will see that channel as a private channel by concept记住一件事,如果组织不是频道的一部分,则没有称为私人/公共频道的概念,那么它将按概念将该频道视为私人频道

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM