Hyperledger作曲家如何处理背书 [英] How does Hyperledger composer handle endorsements

查看:69
本文介绍了Hyperledger作曲家如何处理背书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读有关背书政策的信息,例如此处,并且确实了解它们确定了Hyperledger Fabric v1中哪些交易保存在区块链中.

I have been reading about endorsement policies e.g.here and do understand that they determine which transactions are saved in the block chain in Hyperledger Fabric v1.

我想知道如何能够跨多个阶段转移资产,例如如此处所示.是一项要经过多个阶段才能获得批准(即使用背书政策)的交易吗?还是有很多交易,每笔交易都有自己的政策.

I am wondering how I can be able to transfer an asset across multiple stages e.g. as shown here. Is it one transaction that goes through multiple stages in order to be approved i.e. using endorsement policies? Or there are many transactions, each with its own policies.

无论哪种方式,我都希望交易得到其他用户的批准,例如在将其保存或拒绝到区块链之前,请先手动进行管理.背书政策可以帮助我吗?

Either way, I would like to have a transaction approved by a different user e.g. admin MANUALLY before it's saved or rejected on the block chain. Could endorsement policies help me in this?

我的想法是每笔交易通常由1位参与者提交.那么,要求由两个参与者签名的交易的背书策略又如何工作呢?背书人明确地签署交易是不是另外有一个签名过程?

My thinking is that each transaction is usually submitted by 1 participant. Then, how do the endorsement policies that require a transaction to be signed by two participants work? Is it that there is another signing process separately where endorsers sign transactions explicitly?

任何正确方向的指导都将受到高度赞赏.

Any guidance in the right direction will be highly appreciated.

推荐答案

在某种程度上,您可能会将Fabric背书策略与基于应用程序(业务逻辑)的多阶段批准(跨多个组织)相混淆,如图所示.汽车租赁演示,并跟踪车辆的生命周期(后批准等).

To some degree, you may be slightly confusing Fabric endorsement policies with application (business logic) based multi-stage approval (across multi-orgs) as shown in the car lease demo, and following the lifecycle of a vehicle (post-approvals etc).

Fabric认可策略可以例如基于与已部署网络相关的Fabric密钥或身份-并在多组织设置中基于身份定义一组认可者.

A Fabric endorsement policy can be based on Fabric keys or identities relating to the deployed network for example - and define a set of endorsers based on identity in a multi-org setup.

如问题> https://github.com/hyperledger/composer/issues/您所参考的1251 -Composer提供了一个(多组织)示例,该示例(最终)是Fabric背书策略(例如7月4日的-O示例)以及通过"传递的能力如果您要这样做的话,最终的Fabric策略参数的机制.如示例中所示,它们可以与结构身份相关.在此处查看更多信息-> http ://hyperledger-fabric.readthedocs.io/en/release/arch-deep-dive.html?highlight = endorsement#endorsement-policies

As mentioned in the issue https://github.com/hyperledger/composer/issues/1251 you refer to - Composer provides a (multi-org) example of what is (ultimately) a Fabric endorsement policy (eg the -O example on July 4) and the ability to 'pass those on' as a passthrough mechanism for what is ultimately Fabric policy parameters if that's what you want to do. As shown in the example, they can be related to the Fabric identities. See more here -> http://hyperledger-fabric.readthedocs.io/en/release/arch-deep-dive.html?highlight=endorsement#endorsement-policies

关于您描述的批准过程-您可以使用Composer捕获批准过程(其为业务批准过程),因此适当的参与者"(来自任何组织的应用程序用户)会收到请求交易的通知(例如,通过他/她需要生成批准的Composer Events(一个单独的交易-因此分类帐显示它已被批准),然后可以转移资产(批准后触发-例如基于组织中某个角色的批准*) *).

As for your approval process you described - you can capture the approval process (its a business approvals process) using Composer, so the 'appropriate participant' (application user from whatever org) gets notified of a request transaction (eg notified using Composer Events) that he/she needs to generate an approval (a separate transaction - so the ledger shows it was approved), and then the asset can be transferred (triggered upon approval - based on approver from a role in an Org for example**).

**如果愿意,您可以创建一个充当批准者"角色的参与者(一个参与者可以具有多个身份,有权批准"-并且您始终可以跟踪执行了哪个"身份)批准).然后,资产可以(潜在地)转移到另一个中间转移阶段,然后还有另一个[业务]流程步骤将资产转移到下一个阶段(无论是什么阶段).这些组织在相同的分类帐/渠道上共享相同的业务网络,所以对我来说,您可以通过Composer进行此操作.

**If you wish, you can create a Participant that is a role to be the 'Approver' (a participant can have multiple identities, that have authority to 'approve' - and you can always trace 'which' identity performed the approval). The asset may then (potentially) move on to another, intermediate transfer stage, and then there is another [business] process step that takes it to the next stage (whatever that is). The organisations are sharing the same business network on the same ledger/channel, so to me you would do this through Composer.

这篇关于Hyperledger作曲家如何处理背书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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