-
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.
C2C invocation for confidential contracts.
This PR addresses chaincode to chaincode invocation for confidential contracts (https://jira.hyperledger.org/browse/FAB-67). In order to achieve the goal the chaincode handler has been modified to contruct proper ephemeral transactions and security contexts. Let us consider the following scenario to describe the modification apported by this PR. Let us say that we have two chaincodes: A and B where A invokes B at some point of its computation. When a user invoke a chaincode A, using transaction tx, the certificate that the user has put in tx is passed to B when A invokes it. In this way, for example, chaincode B can perfom attribute-based access control. In addition, each chaincode can access it is own encrypted state and modify it in a proper way without affecting other chaincodes' state. This PR has been tested by adding a unit test in exectransaction_test.go. The unit tests, verify that C2C invocation can be perfomed when security is enabled. What will come next: 1. Chaincode to chaincode query. 2. Additional fields transfered to the invoked chaincode to support access control based on signature. Change-Id: I649d1953ac76e8af32d917a089a454fc0bba9fc1 Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
- Loading branch information
Showing
2 changed files
with
113 additions
and
18 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