Hyperledger Fabric:获得一个或多个同行的认可 [英] Hyperledger Fabric: Getting endorsement from one vs. multiple peers

查看:70
本文介绍了Hyperledger Fabric:获得一个或多个同行的认可的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

鉴于所有对等方都运行相同的链码并具有相同的分类帐,选择一个或多个对等方进行背书有什么区别吗?获得多个同行的认可不是多余的吗?

Given the fact that all peers are running the same chaincode and have same ledger, does it make any difference whether one or multiple peers are chosen for endorsement? Isn't getting endorsement from multiple peers redundant?

推荐答案

混合账本结构通过将交易流分为三个步骤来使用订单执行模型:

Hyperledger fabric uses order-execute model by separating the transaction flow into three steps:

  • 执行交易并检查其正确性,从而认可它,
  • 通过(可插入的)共识协议
  • 订购交易,并且
  • 在将交易提交到分类账之前,根据特定于应用程序的背书策略验证交易.
  • execute a transaction and check its correctness, thereby endorsing it,
  • order transactions via a (pluggable) consensus protocol, and
  • validate transactions against an application-specific endorsement policy before committing them to the ledger.

当同位体获得交易时,它将根据其持有的当前状态数据执行交易以模拟交易.

When a peer gets a transaction, it executes transactions against the current state data held by it to simulate the transaction.

多次对等背书的最可能原因是在执行交易时确保对等体之间的并发状态并确保正确的交易执行.这是确保链码执行期间读取的数据未更改并因此执行结果所必需的仍然有效,可以提交到分类帐状态数据库.

The most probable reason for multiple peer endorsement is to ensure concurrent states across peers upon execution of the transaction and ensuring correct transaction execution, This is necessary to ensure data that was read during chaincode execution has not changed, and therefore the execution results are still valid and can be committed to the ledger state database.

这篇关于Hyperledger Fabric:获得一个或多个同行的认可的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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