Hyperledger Fabric如何确保Couchdb中状态的完整性? [英] How does Hyperledger Fabric ensure the integrity of state in couchdb?

查看:79
本文介绍了Hyperledger Fabric如何确保Couchdb中状态的完整性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Fabric 1.x版中,您可以将Couchdb用作状态存储. Fabric如何确保状态的完整性?例如,如果有人通过直接访问特定节点上的Couchdb来操纵Fabric之外的状态该怎么办.至少可能导致该节点与网络的其余部分不一致.

In version 1.x of Fabric you can use Couchdb as a state store. How does Fabric ensure the integrity of the state? For example, what if someone manipulated the state outside of Fabric by directly accessing Couchdb on a specific node. At a minimum that could cause that node to be inconsistent with the rest of the network.

推荐答案

检测某人在同伴之一中是否处于操纵和调节状态的方法是利用并仔细定义认可策略.

The way to detect someone has manipulated and tempered state in one of the peers is to leverage and carefully define endorsement policies.

例如,假设您有两个组织,每个组织都有两个对等方:OrgA,OrgB和peer1_orgA,peer2_orgA,peer1_orgB,peer2_orgB.因此,您可以定义一个背书策略,该策略将要求所有4个对等方的背书.接下来,假设peer1_orgA被盗用并且伪造了状态.

For example suppose you have two organizations and each have two peers: OrgA, OrgB and peer1_orgA, peer2_orgA, peer1_orgB, peer2_orgB. Hence you can define an endorsement policy which will require endorsement of all 4 peers. Next, suppose peer1_orgA got compromised and state forged.

由于客户端必须满足背书策略,它将向所有对等方发送交易建议,所以对等方将模拟交易并根据哈希RWSet的状态和签名返回RWSet.

Since client has to satisfy the endorsement policy it will send transaction proposal to all peers, peers will simulate transaction and return RWSet based on the state and signature on hashed RWSet.

现在,由于peer1_orgA的状态已伪造,它将返回不同的RWSet,因此签名将有所不同,因此客户端将无法再满足背书策略,而且它将发现peer1_orgA的结果具有发散.

Now, since state of peer1_orgA forged it will return different RWSet and therefore signature will differ as a consequence client won't be able to satisfy the endorsement policy moreover it will be able to discover that result of peer1_orgA has diverged.

这使您可以防止在状态中分叉,并可以确保状态的完整性,从而避免不确定性.

This allows you to prevent fork in the state, as well as takes care of non-determinism ensuring integrity of the state.

这篇关于Hyperledger Fabric如何确保Couchdb中状态的完整性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆