forked from hyperledger/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-5080] Chaincode API Support for PrivateData
This CR adds the following 6 chaincode APIs which enable chaincode to acess/modify the partitioned private data. A collection name denotes a partition. These will only be included in experimental builds. 1. GetPrivateData(collection, key) 2. PutPrivateData(collection, key, value) 3. DelPrivateData(collection, key) 4. GetPrivateDataByRange(collection, startKey, endKey) 5. GetPrivateDataByPartialCompositeKey(collection, objectType, []keys) 6. GetPrivateDataQueryResult(collection, query) Changes have been made in both shim and peer side. For APIs 4 to 6, ledger support is not added yet. Enabled only TestQueries/TestQueriesPrivateData functions in exectransaction_test.go to perform end-to-end test (chaincode to ledger). Earlier, all test functions in exectransaction_test.go was disabled as it was taking a lot of time to execute. Currently, TestQueries/TestQueriesPrivateData take less than 15 seconds and hence can be enabled for e2e testing Also needed to modify core/chaincode/platforms/golang/platform.go in order to support building chaincode with the experimental tag. Change-Id: I6b026f0628c5c808776f05852c7910f60f4a99c4 Signed-off-by: senthil <cendhu@gmail.com> Signed-off-by: David Enyeart <enyeart@us.ibm.com> Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
- Loading branch information
Showing
17 changed files
with
1,760 additions
and
385 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.