Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit 61b439e

Browse files
committed
FAB-11411 Fabric protobuf sync
Change-Id: Id72293923735f1d536f8858bd2d47fe47f4b1bf2 Signed-off-by: rickr <cr22rc@gmail.com>
1 parent 1475a3d commit 61b439e

File tree

14 files changed

+86
-75
lines changed

14 files changed

+86
-75
lines changed

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@
313313
<show>public</show>
314314
<doctitle>Hyperledger Fabric Java SDK</doctitle>
315315
<nohelp>true</nohelp>
316+
<failOnError>true</failOnError>
316317
</configuration>
317318
</plugin>
318319
<plugin>
@@ -623,6 +624,7 @@
623624
<show>public</show>
624625
<doctitle>Hyperledger Fabric Java SDK</doctitle>
625626
<nohelp>true</nohelp>
627+
<failOnError>true</failOnError>
626628
</configuration>
627629
<executions>
628630
<execution>

src/main/proto/common/configuration.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ message Capabilities {
8686
// if the need arises in the future. For the time being, a capability being in the
8787
// capabilities map requires that that capability be supported.
8888
message Capability {
89-
}
89+
}

src/main/proto/discovery/protocol.proto

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,13 @@ message ConfigResult {
124124
map<string, Endpoints> orderers = 2;
125125
}
126126

127-
// PeerMembershipQuery requests PeerMembershipResult
127+
// PeerMembershipQuery requests PeerMembershipResult.
128+
// The filter field may be optionally populated in order
129+
// for the peer membership to be filtered according to
130+
// chaincodes that are installed on peers and collection
131+
// access control policies.
128132
message PeerMembershipQuery {
129-
133+
ChaincodeInterest filter = 1;
130134
}
131135

132136
// PeerMembershipResult contains peers mapped by their organizations (MSP_ID)

src/main/proto/gossip/message.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ enum PullMsgType {
199199
// certain data blocks from a remote peer
200200
message DataRequest {
201201
uint64 nonce = 1;
202-
repeated string digests = 2;
202+
repeated bytes digests = 2;
203203
PullMsgType msg_type = 3;
204204
}
205205

@@ -223,7 +223,7 @@ message DataUpdate {
223223
// to the initator peer and contains the data items it has
224224
message DataDigest {
225225
uint64 nonce = 1;
226-
repeated string digests = 2; // Maybe change this to bitmap later on
226+
repeated bytes digests = 2; // Maybe change this to bitmap later on
227227
PullMsgType msg_type = 3;
228228
}
229229

src/main/proto/msp/identities.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Copyright IBM Corp. All Rights Reserved.
44
SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
78
syntax = "proto3";
89

910
option go_package = "github.com/hyperledger/fabric/protos/msp";

src/main/proto/msp/msp_principal.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ message MSPPrincipal {
5757
// groupping of entities, per MSP affiliation
5858
// E.g., this can well be represented by an MSP's
5959
// Organization unit
60-
IDENTITY = 2; // Denotes a principal that consists of a single
60+
IDENTITY = 2; // Denotes a principal that consists of a single
6161
// identity
6262
ANONYMITY = 3; // Denotes a principal that can be used to enforce
6363
// an identity to be anonymous or nominal.

src/main/proto/peer/chaincode.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,10 @@ message ChaincodeInvocationSpec {
104104
message LifecycleEvent {
105105
string chaincode_name = 1;
106106
}
107+
108+
// ChaincodeInstallPackage stores the necessary information about a chaincode.
109+
message ChaincodeInstallPackage {
110+
string type = 1;
111+
string path = 2;
112+
bytes code_package = 3;
113+
}

src/main/proto/peer/chaincode_event.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ option go_package = "github.com/hyperledger/fabric/protos/peer";
2222
//ChaincodeEvent is used for events and registrations that are specific to chaincode
2323
//string type - "chaincode"
2424
message ChaincodeEvent {
25-
string chaincode_id = 1;
26-
string tx_id = 2;
27-
string event_name = 3;
28-
bytes payload = 4;
25+
string chaincode_id = 1;
26+
string tx_id = 2;
27+
string event_name = 3;
28+
bytes payload = 4;
2929
}

src/main/proto/peer/events.proto

Lines changed: 56 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
/*
2-
Copyright IBM Corp. 2016 All Rights Reserved.
2+
Copyright IBM Corp. All Rights Reserved.
33
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
4+
SPDX-License-Identifier: Apache-2.0
155
*/
166

177
syntax = "proto3";
@@ -27,6 +17,60 @@ option go_package = "github.com/hyperledger/fabric/protos/peer";
2717

2818
package protos;
2919

20+
// FilteredBlock is a minimal set of information about a block
21+
message FilteredBlock {
22+
string channel_id = 1;
23+
uint64 number = 2; // The position in the blockchain
24+
repeated FilteredTransaction filtered_transactions = 4;
25+
}
26+
27+
// FilteredTransaction is a minimal set of information about a transaction
28+
// within a block
29+
message FilteredTransaction {
30+
string txid = 1;
31+
common.HeaderType type = 2;
32+
TxValidationCode tx_validation_code = 3;
33+
oneof Data {
34+
FilteredTransactionActions transaction_actions = 4;
35+
}
36+
}
37+
38+
// FilteredTransactionActions is a wrapper for array of TransactionAction
39+
// message from regular block
40+
message FilteredTransactionActions {
41+
repeated FilteredChaincodeAction chaincode_actions = 1;
42+
}
43+
44+
// FilteredChaincodeAction is a minimal set of information about an action
45+
// within a transaction
46+
message FilteredChaincodeAction {
47+
ChaincodeEvent chaincode_event = 1;
48+
}
49+
50+
// DeliverResponse
51+
message DeliverResponse {
52+
oneof Type {
53+
common.Status status = 1;
54+
common.Block block = 2;
55+
FilteredBlock filtered_block = 3;
56+
}
57+
}
58+
59+
service Deliver {
60+
// deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with
61+
// Payload data as a marshaled orderer.SeekInfo message,
62+
// then a stream of block replies is received
63+
rpc Deliver (stream common.Envelope) returns (stream DeliverResponse) {
64+
}
65+
// deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with
66+
// Payload data as a marshaled orderer.SeekInfo message,
67+
// then a stream of **filtered** block replies is received
68+
rpc DeliverFiltered (stream common.Envelope) returns (stream DeliverResponse) {
69+
}
70+
}
71+
72+
//---------- producer events ---------
73+
3074
//----Event objects----
3175

3276
enum EventType {
@@ -75,37 +119,6 @@ message Unregister {
75119
repeated Interest events = 1;
76120
}
77121

78-
//FilteredBlock is sent by producers and contains minimal information
79-
//about the block.
80-
message FilteredBlock {
81-
string channel_id = 1;
82-
uint64 number = 2; // The position in the blockchain
83-
repeated FilteredTransaction filtered_transactions = 4;
84-
}
85-
86-
//FilteredTransaction is a minimal set of information about a transaction
87-
//within a block.
88-
message FilteredTransaction {
89-
string txid = 1;
90-
common.HeaderType type = 2;
91-
TxValidationCode tx_validation_code = 3;
92-
oneof Data {
93-
FilteredTransactionActions transaction_actions = 4;
94-
}
95-
}
96-
97-
// FilteredTransactionActions is a wrapper for array of TransactionAction
98-
// message from regular block
99-
message FilteredTransactionActions {
100-
repeated FilteredChaincodeAction chaincode_actions = 1;
101-
}
102-
103-
//FilteredChaincodeAction is a minimal set of information about an action within a
104-
//transaction.
105-
message FilteredChaincodeAction {
106-
ChaincodeEvent chaincode_event = 1;
107-
}
108-
109122
// SignedEvent is used for any communication between consumer and producer
110123
message SignedEvent {
111124
// Signature over the event bytes
@@ -147,24 +160,4 @@ service Events {
147160
// event chatting using Event
148161
rpc Chat (stream SignedEvent) returns (stream Event) {
149162
}
150-
}
151-
152-
// DeliverResponse
153-
message DeliverResponse {
154-
oneof Type {
155-
common.Status status = 1;
156-
common.Block block = 2;
157-
FilteredBlock filtered_block = 3;
158-
}
159-
}
160-
161-
service Deliver {
162-
// deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with Payload data as a marshaled orderer.SeekInfo message,
163-
// then a stream of block replies is received.
164-
rpc Deliver (stream common.Envelope) returns (stream DeliverResponse) {
165-
}
166-
// deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with Payload data as a marshaled orderer.SeekInfo message,
167-
// then a stream of **filtered** block replies is received.
168-
rpc DeliverFiltered (stream common.Envelope) returns (stream DeliverResponse) {
169-
}
170163
}

src/main/proto/peer/transaction.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ enum TxValidationCode {
137137
BAD_RESPONSE_PAYLOAD = 21;
138138
BAD_RWSET = 22;
139139
ILLEGAL_WRITESET = 23;
140+
INVALID_WRITESET = 24;
140141
NOT_VALIDATED = 254;
141142
INVALID_OTHER_REASON = 255;
142143
}

0 commit comments

Comments
 (0)