-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
To prepare for the implementation of chaincode gRPC server, this patch updates protobuf definitions to the latest ones. Signed-off-by: Taku Shimosawa <taku.shimosawa@hal.hitachi.com>
- Loading branch information
Showing
11 changed files
with
152 additions
and
51 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Copyright the Hyperledger Fabric contributors. All rights reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
syntax = "proto3"; | ||
|
||
option go_package = "github.com/hyperledger/fabric-protos-go/peer"; | ||
option java_package = "org.hyperledger.fabric.protos.peer"; | ||
|
||
package protos; | ||
|
||
import "common/policies.proto"; | ||
import "peer/policy.proto"; | ||
|
||
// CollectionConfigPackage represents an array of CollectionConfig | ||
// messages; the extra struct is required because repeated oneof is | ||
// forbidden by the protobuf syntax | ||
message CollectionConfigPackage { | ||
repeated CollectionConfig config = 1; | ||
} | ||
|
||
// CollectionConfig defines the configuration of a collection object; | ||
// it currently contains a single, static type. | ||
// Dynamic collections are deferred. | ||
message CollectionConfig { | ||
oneof payload { | ||
StaticCollectionConfig static_collection_config = 1; | ||
} | ||
} | ||
|
||
|
||
// StaticCollectionConfig constitutes the configuration parameters of a | ||
// static collection object. Static collections are collections that are | ||
// known at chaincode instantiation time, and that cannot be changed. | ||
// Dynamic collections are deferred. | ||
message StaticCollectionConfig { | ||
// the name of the collection inside the denoted chaincode | ||
string name = 1; | ||
// a reference to a policy residing / managed in the config block | ||
// to define which orgs have access to this collection’s private data | ||
CollectionPolicyConfig member_orgs_policy = 2; | ||
// The minimum number of peers private data will be sent to upon | ||
// endorsement. The endorsement would fail if dissemination to at least | ||
// this number of peers is not achieved. | ||
int32 required_peer_count = 3; | ||
// The maximum number of peers that private data will be sent to | ||
// upon endorsement. This number has to be bigger than required_peer_count. | ||
int32 maximum_peer_count = 4; | ||
// The number of blocks after which the collection data expires. | ||
// For instance if the value is set to 10, a key last modified by block number 100 | ||
// will be purged at block number 111. A zero value is treated same as MaxUint64 | ||
uint64 block_to_live = 5; | ||
// The member only read access denotes whether only collection member clients | ||
// can read the private data (if set to true), or even non members can | ||
// read the data (if set to false, for example if you want to implement more granular | ||
// access logic in the chaincode) | ||
bool member_only_read = 6; | ||
// The member only write access denotes whether only collection member clients | ||
// can write the private data (if set to true), or even non members can | ||
// write the data (if set to false, for example if you want to implement more granular | ||
// access logic in the chaincode) | ||
bool member_only_write = 7; | ||
// a reference to a policy residing / managed in the config block | ||
// to define the endorsement policy for this collection | ||
ApplicationPolicy endorsement_policy= 8; | ||
} | ||
|
||
|
||
// Collection policy configuration. Initially, the configuration can only | ||
// contain a SignaturePolicy. In the future, the SignaturePolicy may be a | ||
// more general Policy. Instead of containing the actual policy, the | ||
// configuration may in the future contain a string reference to a policy. | ||
message CollectionPolicyConfig { | ||
oneof payload { | ||
// Initially, only a signature policy is supported. | ||
common.SignaturePolicyEnvelope signature_policy = 1; | ||
// Later, the SignaturePolicy will be replaced by a Policy. | ||
// Policy policy = 1; | ||
// A reference to a Policy is planned to be added later. | ||
// string reference = 2; | ||
} | ||
} |
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