File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -126,3 +126,9 @@ message ChaincodeData {
126
126
// InstantiationPolicy for the chaincode
127
127
common.SignaturePolicyEnvelope instantiation_policy = 8 ;
128
128
}
129
+
130
+ // ChaincodeAdditionalParams - parameters passed to chaincode to notify about peer capabilities
131
+ message ChaincodeAdditionalParams {
132
+ bool use_write_batch = 1 ; // an indication that the peer can handle state write batches
133
+ uint32 max_size_write_batch = 2 ; // maximum size of batches with write state
134
+ }
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ message ChaincodeMessage {
38
38
PUT_STATE_METADATA = 21 ;
39
39
GET_PRIVATE_DATA_HASH = 22 ;
40
40
PURGE_PRIVATE_DATA = 23 ;
41
+ WRITE_BATCH_STATE = 24 ;
41
42
}
42
43
43
44
Type type = 1 ;
@@ -88,6 +89,29 @@ message PutStateMetadata {
88
89
StateMetadata metadata = 4 ;
89
90
}
90
91
92
+ // WriteBatchState - set of records for state changes sent by the batch
93
+ message WriteBatchState {
94
+ repeated WriteRecord rec = 1 ;
95
+ }
96
+
97
+ // WriteRecord - single record with changes in the state of different types.
98
+ // Filled in depending on the type.
99
+ message WriteRecord {
100
+ enum Type {
101
+ UNDEFINED = 0 ;
102
+ PUT_STATE = 9 ;
103
+ DEL_STATE = 10 ;
104
+ PUT_STATE_METADATA = 21 ;
105
+ PURGE_PRIVATE_DATA = 23 ;
106
+ }
107
+
108
+ string key = 1 ;
109
+ bytes value = 2 ;
110
+ string collection = 3 ;
111
+ StateMetadata metadata = 4 ;
112
+ Type type = 5 ;
113
+ }
114
+
91
115
// DelState is the payload of a ChaincodeMessage. It contains a key which
92
116
// needs to be recorded in the transaction's write set as a delete operation.
93
117
// If the collection is specified, the key needs to be recorded in the
You can’t perform that action at this time.
0 commit comments