forked from tw-bc-group/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.pb.go
853 lines (769 loc) · 31.1 KB
/
common.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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: common/common.proto
package common // import "github.com/hyperledger/fabric/protos/common"
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
// These status codes are intended to resemble selected HTTP status codes
type Status int32
const (
Status_UNKNOWN Status = 0
Status_SUCCESS Status = 200
Status_BAD_REQUEST Status = 400
Status_FORBIDDEN Status = 403
Status_NOT_FOUND Status = 404
Status_REQUEST_ENTITY_TOO_LARGE Status = 413
Status_INTERNAL_SERVER_ERROR Status = 500
Status_NOT_IMPLEMENTED Status = 501
Status_SERVICE_UNAVAILABLE Status = 503
)
var Status_name = map[int32]string{
0: "UNKNOWN",
200: "SUCCESS",
400: "BAD_REQUEST",
403: "FORBIDDEN",
404: "NOT_FOUND",
413: "REQUEST_ENTITY_TOO_LARGE",
500: "INTERNAL_SERVER_ERROR",
501: "NOT_IMPLEMENTED",
503: "SERVICE_UNAVAILABLE",
}
var Status_value = map[string]int32{
"UNKNOWN": 0,
"SUCCESS": 200,
"BAD_REQUEST": 400,
"FORBIDDEN": 403,
"NOT_FOUND": 404,
"REQUEST_ENTITY_TOO_LARGE": 413,
"INTERNAL_SERVER_ERROR": 500,
"NOT_IMPLEMENTED": 501,
"SERVICE_UNAVAILABLE": 503,
}
func (x Status) String() string {
return proto.EnumName(Status_name, int32(x))
}
func (Status) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{0}
}
type HeaderType int32
const (
HeaderType_MESSAGE HeaderType = 0
HeaderType_CONFIG HeaderType = 1
HeaderType_CONFIG_UPDATE HeaderType = 2
HeaderType_ENDORSER_TRANSACTION HeaderType = 3
HeaderType_ORDERER_TRANSACTION HeaderType = 4
HeaderType_DELIVER_SEEK_INFO HeaderType = 5
HeaderType_CHAINCODE_PACKAGE HeaderType = 6
HeaderType_PEER_ADMIN_OPERATION HeaderType = 8
HeaderType_TOKEN_TRANSACTION HeaderType = 9
)
var HeaderType_name = map[int32]string{
0: "MESSAGE",
1: "CONFIG",
2: "CONFIG_UPDATE",
3: "ENDORSER_TRANSACTION",
4: "ORDERER_TRANSACTION",
5: "DELIVER_SEEK_INFO",
6: "CHAINCODE_PACKAGE",
8: "PEER_ADMIN_OPERATION",
9: "TOKEN_TRANSACTION",
}
var HeaderType_value = map[string]int32{
"MESSAGE": 0,
"CONFIG": 1,
"CONFIG_UPDATE": 2,
"ENDORSER_TRANSACTION": 3,
"ORDERER_TRANSACTION": 4,
"DELIVER_SEEK_INFO": 5,
"CHAINCODE_PACKAGE": 6,
"PEER_ADMIN_OPERATION": 8,
"TOKEN_TRANSACTION": 9,
}
func (x HeaderType) String() string {
return proto.EnumName(HeaderType_name, int32(x))
}
func (HeaderType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{1}
}
// This enum enlists indexes of the block metadata array
type BlockMetadataIndex int32
const (
BlockMetadataIndex_SIGNATURES BlockMetadataIndex = 0
BlockMetadataIndex_LAST_CONFIG BlockMetadataIndex = 1
BlockMetadataIndex_TRANSACTIONS_FILTER BlockMetadataIndex = 2
BlockMetadataIndex_ORDERER BlockMetadataIndex = 3
)
var BlockMetadataIndex_name = map[int32]string{
0: "SIGNATURES",
1: "LAST_CONFIG",
2: "TRANSACTIONS_FILTER",
3: "ORDERER",
}
var BlockMetadataIndex_value = map[string]int32{
"SIGNATURES": 0,
"LAST_CONFIG": 1,
"TRANSACTIONS_FILTER": 2,
"ORDERER": 3,
}
func (x BlockMetadataIndex) String() string {
return proto.EnumName(BlockMetadataIndex_name, int32(x))
}
func (BlockMetadataIndex) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{2}
}
// LastConfig is the encoded value for the Metadata message which is encoded in the LAST_CONFIGURATION block metadata index
type LastConfig struct {
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LastConfig) Reset() { *m = LastConfig{} }
func (m *LastConfig) String() string { return proto.CompactTextString(m) }
func (*LastConfig) ProtoMessage() {}
func (*LastConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{0}
}
func (m *LastConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LastConfig.Unmarshal(m, b)
}
func (m *LastConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LastConfig.Marshal(b, m, deterministic)
}
func (dst *LastConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_LastConfig.Merge(dst, src)
}
func (m *LastConfig) XXX_Size() int {
return xxx_messageInfo_LastConfig.Size(m)
}
func (m *LastConfig) XXX_DiscardUnknown() {
xxx_messageInfo_LastConfig.DiscardUnknown(m)
}
var xxx_messageInfo_LastConfig proto.InternalMessageInfo
func (m *LastConfig) GetIndex() uint64 {
if m != nil {
return m.Index
}
return 0
}
// Metadata is a common structure to be used to encode block metadata
type Metadata struct {
Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
Signatures []*MetadataSignature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Metadata) Reset() { *m = Metadata{} }
func (m *Metadata) String() string { return proto.CompactTextString(m) }
func (*Metadata) ProtoMessage() {}
func (*Metadata) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{1}
}
func (m *Metadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Metadata.Unmarshal(m, b)
}
func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Metadata.Marshal(b, m, deterministic)
}
func (dst *Metadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_Metadata.Merge(dst, src)
}
func (m *Metadata) XXX_Size() int {
return xxx_messageInfo_Metadata.Size(m)
}
func (m *Metadata) XXX_DiscardUnknown() {
xxx_messageInfo_Metadata.DiscardUnknown(m)
}
var xxx_messageInfo_Metadata proto.InternalMessageInfo
func (m *Metadata) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
func (m *Metadata) GetSignatures() []*MetadataSignature {
if m != nil {
return m.Signatures
}
return nil
}
type MetadataSignature struct {
SignatureHeader []byte `protobuf:"bytes,1,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"`
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 *MetadataSignature) Reset() { *m = MetadataSignature{} }
func (m *MetadataSignature) String() string { return proto.CompactTextString(m) }
func (*MetadataSignature) ProtoMessage() {}
func (*MetadataSignature) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{2}
}
func (m *MetadataSignature) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MetadataSignature.Unmarshal(m, b)
}
func (m *MetadataSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MetadataSignature.Marshal(b, m, deterministic)
}
func (dst *MetadataSignature) XXX_Merge(src proto.Message) {
xxx_messageInfo_MetadataSignature.Merge(dst, src)
}
func (m *MetadataSignature) XXX_Size() int {
return xxx_messageInfo_MetadataSignature.Size(m)
}
func (m *MetadataSignature) XXX_DiscardUnknown() {
xxx_messageInfo_MetadataSignature.DiscardUnknown(m)
}
var xxx_messageInfo_MetadataSignature proto.InternalMessageInfo
func (m *MetadataSignature) GetSignatureHeader() []byte {
if m != nil {
return m.SignatureHeader
}
return nil
}
func (m *MetadataSignature) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type Header struct {
ChannelHeader []byte `protobuf:"bytes,1,opt,name=channel_header,json=channelHeader,proto3" json:"channel_header,omitempty"`
SignatureHeader []byte `protobuf:"bytes,2,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Header) Reset() { *m = Header{} }
func (m *Header) String() string { return proto.CompactTextString(m) }
func (*Header) ProtoMessage() {}
func (*Header) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{3}
}
func (m *Header) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Header.Unmarshal(m, b)
}
func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Header.Marshal(b, m, deterministic)
}
func (dst *Header) XXX_Merge(src proto.Message) {
xxx_messageInfo_Header.Merge(dst, src)
}
func (m *Header) XXX_Size() int {
return xxx_messageInfo_Header.Size(m)
}
func (m *Header) XXX_DiscardUnknown() {
xxx_messageInfo_Header.DiscardUnknown(m)
}
var xxx_messageInfo_Header proto.InternalMessageInfo
func (m *Header) GetChannelHeader() []byte {
if m != nil {
return m.ChannelHeader
}
return nil
}
func (m *Header) GetSignatureHeader() []byte {
if m != nil {
return m.SignatureHeader
}
return nil
}
// Header is a generic replay prevention and identity message to include in a signed payload
type ChannelHeader struct {
Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
// Version indicates message protocol version
Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
// Timestamp is the local time when the message was created
// by the sender
Timestamp *timestamp.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Identifier of the channel this message is bound for
ChannelId string `protobuf:"bytes,4,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
// An unique identifier that is used end-to-end.
// - set by higher layers such as end user or SDK
// - passed to the endorser (which will check for uniqueness)
// - as the header is passed along unchanged, it will be
// be retrieved by the committer (uniqueness check here as well)
// - to be stored in the ledger
TxId string `protobuf:"bytes,5,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`
// The epoch in which this header was generated, where epoch is defined based on block height
// Epoch in which the response has been generated. This field identifies a
// logical window of time. A proposal response is accepted by a peer only if
// two conditions hold:
// 1. the epoch specified in the message is the current epoch
// 2. this message has been only seen once during this epoch (i.e. it hasn't
// been replayed)
Epoch uint64 `protobuf:"varint,6,opt,name=epoch,proto3" json:"epoch,omitempty"`
// Extension that may be attached based on the header type
Extension []byte `protobuf:"bytes,7,opt,name=extension,proto3" json:"extension,omitempty"`
// If mutual TLS is employed, this represents
// the hash of the client's TLS certificate
TlsCertHash []byte `protobuf:"bytes,8,opt,name=tls_cert_hash,json=tlsCertHash,proto3" json:"tls_cert_hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ChannelHeader) Reset() { *m = ChannelHeader{} }
func (m *ChannelHeader) String() string { return proto.CompactTextString(m) }
func (*ChannelHeader) ProtoMessage() {}
func (*ChannelHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{4}
}
func (m *ChannelHeader) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChannelHeader.Unmarshal(m, b)
}
func (m *ChannelHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ChannelHeader.Marshal(b, m, deterministic)
}
func (dst *ChannelHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChannelHeader.Merge(dst, src)
}
func (m *ChannelHeader) XXX_Size() int {
return xxx_messageInfo_ChannelHeader.Size(m)
}
func (m *ChannelHeader) XXX_DiscardUnknown() {
xxx_messageInfo_ChannelHeader.DiscardUnknown(m)
}
var xxx_messageInfo_ChannelHeader proto.InternalMessageInfo
func (m *ChannelHeader) GetType() int32 {
if m != nil {
return m.Type
}
return 0
}
func (m *ChannelHeader) GetVersion() int32 {
if m != nil {
return m.Version
}
return 0
}
func (m *ChannelHeader) GetTimestamp() *timestamp.Timestamp {
if m != nil {
return m.Timestamp
}
return nil
}
func (m *ChannelHeader) GetChannelId() string {
if m != nil {
return m.ChannelId
}
return ""
}
func (m *ChannelHeader) GetTxId() string {
if m != nil {
return m.TxId
}
return ""
}
func (m *ChannelHeader) GetEpoch() uint64 {
if m != nil {
return m.Epoch
}
return 0
}
func (m *ChannelHeader) GetExtension() []byte {
if m != nil {
return m.Extension
}
return nil
}
func (m *ChannelHeader) GetTlsCertHash() []byte {
if m != nil {
return m.TlsCertHash
}
return nil
}
type SignatureHeader struct {
// Creator of the message, a marshaled msp.SerializedIdentity
Creator []byte `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
// Arbitrary number that may only be used once. Can be used to detect replay attacks.
Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SignatureHeader) Reset() { *m = SignatureHeader{} }
func (m *SignatureHeader) String() string { return proto.CompactTextString(m) }
func (*SignatureHeader) ProtoMessage() {}
func (*SignatureHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{5}
}
func (m *SignatureHeader) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignatureHeader.Unmarshal(m, b)
}
func (m *SignatureHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignatureHeader.Marshal(b, m, deterministic)
}
func (dst *SignatureHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignatureHeader.Merge(dst, src)
}
func (m *SignatureHeader) XXX_Size() int {
return xxx_messageInfo_SignatureHeader.Size(m)
}
func (m *SignatureHeader) XXX_DiscardUnknown() {
xxx_messageInfo_SignatureHeader.DiscardUnknown(m)
}
var xxx_messageInfo_SignatureHeader proto.InternalMessageInfo
func (m *SignatureHeader) GetCreator() []byte {
if m != nil {
return m.Creator
}
return nil
}
func (m *SignatureHeader) GetNonce() []byte {
if m != nil {
return m.Nonce
}
return nil
}
// Payload is the message contents (and header to allow for signing)
type Payload struct {
// Header is included to provide identity and prevent replay
Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// Data, the encoding of which is defined by the type in the header
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Payload) Reset() { *m = Payload{} }
func (m *Payload) String() string { return proto.CompactTextString(m) }
func (*Payload) ProtoMessage() {}
func (*Payload) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{6}
}
func (m *Payload) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Payload.Unmarshal(m, b)
}
func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Payload.Marshal(b, m, deterministic)
}
func (dst *Payload) XXX_Merge(src proto.Message) {
xxx_messageInfo_Payload.Merge(dst, src)
}
func (m *Payload) XXX_Size() int {
return xxx_messageInfo_Payload.Size(m)
}
func (m *Payload) XXX_DiscardUnknown() {
xxx_messageInfo_Payload.DiscardUnknown(m)
}
var xxx_messageInfo_Payload proto.InternalMessageInfo
func (m *Payload) GetHeader() *Header {
if m != nil {
return m.Header
}
return nil
}
func (m *Payload) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
// Envelope wraps a Payload with a signature so that the message may be authenticated
type Envelope struct {
// A marshaled Payload
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
// A signature by the creator specified in the Payload header
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 *Envelope) Reset() { *m = Envelope{} }
func (m *Envelope) String() string { return proto.CompactTextString(m) }
func (*Envelope) ProtoMessage() {}
func (*Envelope) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{7}
}
func (m *Envelope) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Envelope.Unmarshal(m, b)
}
func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Envelope.Marshal(b, m, deterministic)
}
func (dst *Envelope) XXX_Merge(src proto.Message) {
xxx_messageInfo_Envelope.Merge(dst, src)
}
func (m *Envelope) XXX_Size() int {
return xxx_messageInfo_Envelope.Size(m)
}
func (m *Envelope) XXX_DiscardUnknown() {
xxx_messageInfo_Envelope.DiscardUnknown(m)
}
var xxx_messageInfo_Envelope proto.InternalMessageInfo
func (m *Envelope) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func (m *Envelope) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
// This is finalized block structure to be shared among the orderer and peer
// Note that the BlockHeader chains to the previous BlockHeader, and the BlockData hash is embedded
// in the BlockHeader. This makes it natural and obvious that the Data is included in the hash, but
// the Metadata is not.
type Block struct {
Header *BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
Data *BlockData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Metadata *BlockMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Block) Reset() { *m = Block{} }
func (m *Block) String() string { return proto.CompactTextString(m) }
func (*Block) ProtoMessage() {}
func (*Block) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{8}
}
func (m *Block) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Block.Unmarshal(m, b)
}
func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Block.Marshal(b, m, deterministic)
}
func (dst *Block) XXX_Merge(src proto.Message) {
xxx_messageInfo_Block.Merge(dst, src)
}
func (m *Block) XXX_Size() int {
return xxx_messageInfo_Block.Size(m)
}
func (m *Block) XXX_DiscardUnknown() {
xxx_messageInfo_Block.DiscardUnknown(m)
}
var xxx_messageInfo_Block proto.InternalMessageInfo
func (m *Block) GetHeader() *BlockHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *Block) GetData() *BlockData {
if m != nil {
return m.Data
}
return nil
}
func (m *Block) GetMetadata() *BlockMetadata {
if m != nil {
return m.Metadata
}
return nil
}
// BlockHeader is the element of the block which forms the block chain
// The block header is hashed using the configured chain hashing algorithm
// over the ASN.1 encoding of the BlockHeader
type BlockHeader struct {
Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
PreviousHash []byte `protobuf:"bytes,2,opt,name=previous_hash,json=previousHash,proto3" json:"previous_hash,omitempty"`
DataHash []byte `protobuf:"bytes,3,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BlockHeader) Reset() { *m = BlockHeader{} }
func (m *BlockHeader) String() string { return proto.CompactTextString(m) }
func (*BlockHeader) ProtoMessage() {}
func (*BlockHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{9}
}
func (m *BlockHeader) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlockHeader.Unmarshal(m, b)
}
func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BlockHeader.Marshal(b, m, deterministic)
}
func (dst *BlockHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_BlockHeader.Merge(dst, src)
}
func (m *BlockHeader) XXX_Size() int {
return xxx_messageInfo_BlockHeader.Size(m)
}
func (m *BlockHeader) XXX_DiscardUnknown() {
xxx_messageInfo_BlockHeader.DiscardUnknown(m)
}
var xxx_messageInfo_BlockHeader proto.InternalMessageInfo
func (m *BlockHeader) GetNumber() uint64 {
if m != nil {
return m.Number
}
return 0
}
func (m *BlockHeader) GetPreviousHash() []byte {
if m != nil {
return m.PreviousHash
}
return nil
}
func (m *BlockHeader) GetDataHash() []byte {
if m != nil {
return m.DataHash
}
return nil
}
type BlockData struct {
Data [][]byte `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BlockData) Reset() { *m = BlockData{} }
func (m *BlockData) String() string { return proto.CompactTextString(m) }
func (*BlockData) ProtoMessage() {}
func (*BlockData) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{10}
}
func (m *BlockData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlockData.Unmarshal(m, b)
}
func (m *BlockData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BlockData.Marshal(b, m, deterministic)
}
func (dst *BlockData) XXX_Merge(src proto.Message) {
xxx_messageInfo_BlockData.Merge(dst, src)
}
func (m *BlockData) XXX_Size() int {
return xxx_messageInfo_BlockData.Size(m)
}
func (m *BlockData) XXX_DiscardUnknown() {
xxx_messageInfo_BlockData.DiscardUnknown(m)
}
var xxx_messageInfo_BlockData proto.InternalMessageInfo
func (m *BlockData) GetData() [][]byte {
if m != nil {
return m.Data
}
return nil
}
type BlockMetadata struct {
Metadata [][]byte `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BlockMetadata) Reset() { *m = BlockMetadata{} }
func (m *BlockMetadata) String() string { return proto.CompactTextString(m) }
func (*BlockMetadata) ProtoMessage() {}
func (*BlockMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_common_b374fafc5e1c956e, []int{11}
}
func (m *BlockMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlockMetadata.Unmarshal(m, b)
}
func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BlockMetadata.Marshal(b, m, deterministic)
}
func (dst *BlockMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_BlockMetadata.Merge(dst, src)
}
func (m *BlockMetadata) XXX_Size() int {
return xxx_messageInfo_BlockMetadata.Size(m)
}
func (m *BlockMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_BlockMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_BlockMetadata proto.InternalMessageInfo
func (m *BlockMetadata) GetMetadata() [][]byte {
if m != nil {
return m.Metadata
}
return nil
}
func init() {
proto.RegisterType((*LastConfig)(nil), "common.LastConfig")
proto.RegisterType((*Metadata)(nil), "common.Metadata")
proto.RegisterType((*MetadataSignature)(nil), "common.MetadataSignature")
proto.RegisterType((*Header)(nil), "common.Header")
proto.RegisterType((*ChannelHeader)(nil), "common.ChannelHeader")
proto.RegisterType((*SignatureHeader)(nil), "common.SignatureHeader")
proto.RegisterType((*Payload)(nil), "common.Payload")
proto.RegisterType((*Envelope)(nil), "common.Envelope")
proto.RegisterType((*Block)(nil), "common.Block")
proto.RegisterType((*BlockHeader)(nil), "common.BlockHeader")
proto.RegisterType((*BlockData)(nil), "common.BlockData")
proto.RegisterType((*BlockMetadata)(nil), "common.BlockMetadata")
proto.RegisterEnum("common.Status", Status_name, Status_value)
proto.RegisterEnum("common.HeaderType", HeaderType_name, HeaderType_value)
proto.RegisterEnum("common.BlockMetadataIndex", BlockMetadataIndex_name, BlockMetadataIndex_value)
}
func init() { proto.RegisterFile("common/common.proto", fileDescriptor_common_b374fafc5e1c956e) }
var fileDescriptor_common_b374fafc5e1c956e = []byte{
// 959 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0xcf, 0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