-
Notifications
You must be signed in to change notification settings - Fork 8.8k
/
proposal_response.pb.go
332 lines (301 loc) · 13.9 KB
/
proposal_response.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: peer/proposal_response.proto
package peer // import "github.com/hyperledger/fabric/protos/peer"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// A ProposalResponse is returned from an endorser to the proposal submitter.
// The idea is that this message contains the endorser's response to the
// request of a client to perform an action over a chaincode (or more
// generically on the ledger); the response might be success/error (conveyed in
// the Response field) together with a description of the action and a
// signature over it by that endorser. If a sufficient number of distinct
// endorsers agree on the same action and produce signature to that effect, a
// transaction can be generated and sent for ordering.
type ProposalResponse struct {
// Version indicates message protocol version
Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// Timestamp is the time that the message
// was created as defined by the sender
Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// A response message indicating whether the
// endorsement of the action was successful
Response *Response `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
// The payload of response. It is the bytes of ProposalResponsePayload
Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
// The endorsement of the proposal, basically
// the endorser's signature over the payload
Endorsement *Endorsement `protobuf:"bytes,6,opt,name=endorsement,proto3" json:"endorsement,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProposalResponse) Reset() { *m = ProposalResponse{} }
func (m *ProposalResponse) String() string { return proto.CompactTextString(m) }
func (*ProposalResponse) ProtoMessage() {}
func (*ProposalResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_proposal_response_22a755721b685f40, []int{0}
}
func (m *ProposalResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalResponse.Unmarshal(m, b)
}
func (m *ProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProposalResponse.Marshal(b, m, deterministic)
}
func (dst *ProposalResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposalResponse.Merge(dst, src)
}
func (m *ProposalResponse) XXX_Size() int {
return xxx_messageInfo_ProposalResponse.Size(m)
}
func (m *ProposalResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ProposalResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ProposalResponse proto.InternalMessageInfo
func (m *ProposalResponse) GetVersion() int32 {
if m != nil {
return m.Version
}
return 0
}
func (m *ProposalResponse) GetTimestamp() *timestamp.Timestamp {
if m != nil {
return m.Timestamp
}
return nil
}
func (m *ProposalResponse) GetResponse() *Response {
if m != nil {
return m.Response
}
return nil
}
func (m *ProposalResponse) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func (m *ProposalResponse) GetEndorsement() *Endorsement {
if m != nil {
return m.Endorsement
}
return nil
}
// A response with a representation similar to an HTTP response that can
// be used within another message.
type Response struct {
// A status code that should follow the HTTP status codes.
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
// A message associated with the response code.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// A payload that can be used to include metadata with this response.
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Response) Reset() { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage() {}
func (*Response) Descriptor() ([]byte, []int) {
return fileDescriptor_proposal_response_22a755721b685f40, []int{1}
}
func (m *Response) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Response.Unmarshal(m, b)
}
func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Response.Marshal(b, m, deterministic)
}
func (dst *Response) XXX_Merge(src proto.Message) {
xxx_messageInfo_Response.Merge(dst, src)
}
func (m *Response) XXX_Size() int {
return xxx_messageInfo_Response.Size(m)
}
func (m *Response) XXX_DiscardUnknown() {
xxx_messageInfo_Response.DiscardUnknown(m)
}
var xxx_messageInfo_Response proto.InternalMessageInfo
func (m *Response) GetStatus() int32 {
if m != nil {
return m.Status
}
return 0
}
func (m *Response) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
func (m *Response) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
// ProposalResponsePayload is the payload of a proposal response. This message
// is the "bridge" between the client's request and the endorser's action in
// response to that request. Concretely, for chaincodes, it contains a hashed
// representation of the proposal (proposalHash) and a representation of the
// chaincode state changes and events inside the extension field.
type ProposalResponsePayload struct {
// Hash of the proposal that triggered this response. The hash is used to
// link a response with its proposal, both for bookeeping purposes on an
// asynchronous system and for security reasons (accountability,
// non-repudiation). The hash usually covers the entire Proposal message
// (byte-by-byte). However this implies that the hash can only be verified
// if the entire proposal message is available when ProposalResponsePayload is
// included in a transaction or stored in the ledger. For confidentiality
// reasons, with chaincodes it might be undesirable to store the proposal
// payload in the ledger. If the type is CHAINCODE, this is handled by
// separating the proposal's header and
// the payload: the header is always hashed in its entirety whereas the
// payload can either be hashed fully, or only its hash may be hashed, or
// nothing from the payload can be hashed. The PayloadVisibility field in the
// Header's extension controls to which extent the proposal payload is
// "visible" in the sense that was just explained.
ProposalHash []byte `protobuf:"bytes,1,opt,name=proposal_hash,json=proposalHash,proto3" json:"proposal_hash,omitempty"`
// Extension should be unmarshaled to a type-specific message. The type of
// the extension in any proposal response depends on the type of the proposal
// that the client selected when the proposal was initially sent out. In
// particular, this information is stored in the type field of a Header. For
// chaincode, it's a ChaincodeAction message
Extension []byte `protobuf:"bytes,2,opt,name=extension,proto3" json:"extension,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProposalResponsePayload) Reset() { *m = ProposalResponsePayload{} }
func (m *ProposalResponsePayload) String() string { return proto.CompactTextString(m) }
func (*ProposalResponsePayload) ProtoMessage() {}
func (*ProposalResponsePayload) Descriptor() ([]byte, []int) {
return fileDescriptor_proposal_response_22a755721b685f40, []int{2}
}
func (m *ProposalResponsePayload) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalResponsePayload.Unmarshal(m, b)
}
func (m *ProposalResponsePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProposalResponsePayload.Marshal(b, m, deterministic)
}
func (dst *ProposalResponsePayload) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposalResponsePayload.Merge(dst, src)
}
func (m *ProposalResponsePayload) XXX_Size() int {
return xxx_messageInfo_ProposalResponsePayload.Size(m)
}
func (m *ProposalResponsePayload) XXX_DiscardUnknown() {
xxx_messageInfo_ProposalResponsePayload.DiscardUnknown(m)
}
var xxx_messageInfo_ProposalResponsePayload proto.InternalMessageInfo
func (m *ProposalResponsePayload) GetProposalHash() []byte {
if m != nil {
return m.ProposalHash
}
return nil
}
func (m *ProposalResponsePayload) GetExtension() []byte {
if m != nil {
return m.Extension
}
return nil
}
// An endorsement is a signature of an endorser over a proposal response. By
// producing an endorsement message, an endorser implicitly "approves" that
// proposal response and the actions contained therein. When enough
// endorsements have been collected, a transaction can be generated out of a
// set of proposal responses. Note that this message only contains an identity
// and a signature but no signed payload. This is intentional because
// endorsements are supposed to be collected in a transaction, and they are all
// expected to endorse a single proposal response/action (many endorsements
// over a single proposal response)
type Endorsement struct {
// Identity of the endorser (e.g. its certificate)
Endorser []byte `protobuf:"bytes,1,opt,name=endorser,proto3" json:"endorser,omitempty"`
// Signature of the payload included in ProposalResponse concatenated with
// the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Endorsement) Reset() { *m = Endorsement{} }
func (m *Endorsement) String() string { return proto.CompactTextString(m) }
func (*Endorsement) ProtoMessage() {}
func (*Endorsement) Descriptor() ([]byte, []int) {
return fileDescriptor_proposal_response_22a755721b685f40, []int{3}
}
func (m *Endorsement) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Endorsement.Unmarshal(m, b)
}
func (m *Endorsement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Endorsement.Marshal(b, m, deterministic)
}
func (dst *Endorsement) XXX_Merge(src proto.Message) {
xxx_messageInfo_Endorsement.Merge(dst, src)
}
func (m *Endorsement) XXX_Size() int {
return xxx_messageInfo_Endorsement.Size(m)
}
func (m *Endorsement) XXX_DiscardUnknown() {
xxx_messageInfo_Endorsement.DiscardUnknown(m)
}
var xxx_messageInfo_Endorsement proto.InternalMessageInfo
func (m *Endorsement) GetEndorser() []byte {
if m != nil {
return m.Endorser
}
return nil
}
func (m *Endorsement) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func init() {
proto.RegisterType((*ProposalResponse)(nil), "protos.ProposalResponse")
proto.RegisterType((*Response)(nil), "protos.Response")
proto.RegisterType((*ProposalResponsePayload)(nil), "protos.ProposalResponsePayload")
proto.RegisterType((*Endorsement)(nil), "protos.Endorsement")
}
func init() {
proto.RegisterFile("peer/proposal_response.proto", fileDescriptor_proposal_response_22a755721b685f40)
}
var fileDescriptor_proposal_response_22a755721b685f40 = []byte{
// 367 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x51, 0x4b, 0xfb, 0x30,
0x14, 0xc5, 0xe9, 0xfe, 0xff, 0xcd, 0x2d, 0x9b, 0x30, 0x2a, 0x68, 0x19, 0x03, 0x47, 0x7d, 0x99,
0x20, 0x29, 0x28, 0x82, 0xcf, 0x03, 0xd1, 0xc7, 0x11, 0xc4, 0x07, 0x11, 0x24, 0xdd, 0xee, 0xd2,
0x62, 0xdb, 0x84, 0xdc, 0x54, 0xdc, 0x07, 0xf6, 0x7b, 0x48, 0xd3, 0xa6, 0xab, 0xe2, 0xd3, 0x38,
0x77, 0x27, 0xbf, 0x7b, 0xcf, 0xed, 0x25, 0x73, 0x05, 0xa0,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