Using endorsements in Hyperledger Composer to design a process

后端 未结 2 1428
离开以前
离开以前 2021-01-01 08:23

NB: I am seeking to understand how endorsements works in general. This will help me determine how to design applications when using Hyperledger Composer.

When I read

2条回答
  •  粉色の甜心
    2021-01-01 08:29

    The endorsement process is described in the docs. That said, in simple terms, the process of endorsement involves an endorsing peer signing the read/write set of a transaction proposal with its certificate. This basically says: the peer identified by the signing certificate asserts that these are the read/write sets of the proposed transaction simulation.

    A client that invokes a proposed transaction will need knowledge of the endorsement policy for that channel/chaincode so that it can transmit the proposed transaction to each of the endorsing peers (or to a sufficient subset of endorsing peers to satisfy the policy). When it has received the responses from each endorsing peer, it will check that the transaction is valid and then broadcast the endorsed transaction to the ordering service, which will add it to a block and broadcast to the validating peers for that channel.

    Validating peers will then validate the endorsement policy of the channel/chaincode against the transactions in a block to ensure that:

    1. all endorsements are valid (i.e. they are valid signatures from valid certificates over the expected message)
    2. there are an appropriate number of endorsements
    3. endorsements come from the expected source(s)

    If the endorsement policy is satisfied, then the transaction is committed and the world state updated with the read/write set.

    At present, Composer cannot manage the endorsement policy, but this is definitely on the development roadmap.

提交回复
热议问题