-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable unaware threshold signature endorsement
This commit contains the following two seemingly unrelated changes: 1. Deduplicate endorsements in createTx ------------------------------------- This commit makes createTx de-duplicate endorsers according to their identity. Meaning, when multiple but identical endorsements (same identity) are passed to the createTx function, it returns a transaction with unique endorsements, and without repeated endorsers. Since at validation, endorsers are anyway de-duplicated, this commit preserves current system behavior. 2. Support identity based endorsement policy in discovery ------------------------------------------------------ Currently, whenever a chaincode's endorsement policy contains an identity principal, discovery rejects the policy, saying that it contains a principal it does not support. This commit simply makes discovery classify the principal. Making clients and gateways unaware of a threshold signature scheme ------------------------------------------------------------------- This commit enables advanced use cases, in which case the endorsements collected for transaction submission contain identical identities that represent a threshold or aggregation signature scheme. In such a case, peers can be deployed with custom endorsement plugins and generate a threshold/aggregation signature, but the flow of service discovery, the client, and peer gateway remains the same: 1. The client and the gateway interact as usual, and the gateway collects endorsements from several peers 2. The peers, using the endorsement plugin, engage in a protocol at which end they all return the same endorsement 3. The gateway submits the transaction (this time, with a single endorsement) to the orderer In such a case, the endorsement policy needs to be an OR over two mutually exclusive cases: 1. An AND over a set of organizational principals (such as Org1.Peer and Org2.Peer) 2. An OR over one or more identities (which can only be signed in collaboration among the peers) In such a case, discovery will always return only combinations of the former kind, but the endorsement policy itself that will take place upon transaction validation may be of the latter kind. Change-Id: I9193187ae6b08791f8762a9d325442d156c4f828 Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
- Loading branch information
Showing
5 changed files
with
153 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters