forked from aergoio/aergo
/
p2p.pb.go
1654 lines (1491 loc) · 60.5 KB
/
p2p.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
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: p2p.proto
package types
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// 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
// Not all response contains ResultStatus value.
// names from gRPC status
type ResultStatus int32
const (
// OK is returned on success.
ResultStatus_OK ResultStatus = 0
// CANCELED when operation was canceled (typically by the caller).
ResultStatus_CANCELED ResultStatus = 1
// UNKNOWN
ResultStatus_UNKNOWN ResultStatus = 2
// INVALID_ARGUMENT is missing or wrong value of argument
ResultStatus_INVALID_ARGUMENT ResultStatus = 3
// DEADLINE_EXCEEDED timeout
ResultStatus_DEADLINE_EXCEEDED ResultStatus = 4
// NOT_FOUND
ResultStatus_NOT_FOUND ResultStatus = 5
// ALREADY_EXISTS
ResultStatus_ALREADY_EXISTS ResultStatus = 6
// PERMISSION_DENIED
ResultStatus_PERMISSION_DENIED ResultStatus = 7
//
ResultStatus_RESOURCE_EXHAUSTED ResultStatus = 8
//
ResultStatus_FAILED_PRECONDITION ResultStatus = 9
// ABORTED
ResultStatus_ABORTED ResultStatus = 10
//
ResultStatus_OUT_OF_RANGE ResultStatus = 11
// UNIMPLEMENTED indicates operation is not implemented or not
// supported/enabled in this service.
ResultStatus_UNIMPLEMENTED ResultStatus = 12
// INTERNAL errors. Means some invariants expected by underlying
// system has been broken. If you see one of these errors,
// something is very broken.
ResultStatus_INTERNAL ResultStatus = 13
// Unavailable indicates the service is currently unavailable.
// This is a most likely a transient condition and may be corrected
// by retrying with a backoff.
//
// See litmus test above for deciding between FailedPrecondition,
// Aborted, and Unavailable.
ResultStatus_UNAVAILABLE ResultStatus = 14
ResultStatus_DATA_LOSS ResultStatus = 15
// UNAUTHENTICATED indicates the request does not have valid
// authentication credentials for the operation.
ResultStatus_UNAUTHENTICATED ResultStatus = 16
)
var ResultStatus_name = map[int32]string{
0: "OK",
1: "CANCELED",
2: "UNKNOWN",
3: "INVALID_ARGUMENT",
4: "DEADLINE_EXCEEDED",
5: "NOT_FOUND",
6: "ALREADY_EXISTS",
7: "PERMISSION_DENIED",
8: "RESOURCE_EXHAUSTED",
9: "FAILED_PRECONDITION",
10: "ABORTED",
11: "OUT_OF_RANGE",
12: "UNIMPLEMENTED",
13: "INTERNAL",
14: "UNAVAILABLE",
15: "DATA_LOSS",
16: "UNAUTHENTICATED",
}
var ResultStatus_value = map[string]int32{
"OK": 0,
"CANCELED": 1,
"UNKNOWN": 2,
"INVALID_ARGUMENT": 3,
"DEADLINE_EXCEEDED": 4,
"NOT_FOUND": 5,
"ALREADY_EXISTS": 6,
"PERMISSION_DENIED": 7,
"RESOURCE_EXHAUSTED": 8,
"FAILED_PRECONDITION": 9,
"ABORTED": 10,
"OUT_OF_RANGE": 11,
"UNIMPLEMENTED": 12,
"INTERNAL": 13,
"UNAVAILABLE": 14,
"DATA_LOSS": 15,
"UNAUTHENTICATED": 16,
}
func (x ResultStatus) String() string {
return proto.EnumName(ResultStatus_name, int32(x))
}
func (ResultStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{0}
}
// MsgHeader contains common properties of all p2p messages
type MsgHeader struct {
// Deprecated client version.
ClientVersion string `protobuf:"bytes,1,opt,name=clientVersion,proto3" json:"clientVersion,omitempty"`
// unix time
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// allows requesters to use request data when processing a response
Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
// Gossip is flag to have receiver peer gossip the message to neighbors
// Deprecated whether to gossip other peers is determined by subprotocol since version 0.3.0 .
Gossip bool `protobuf:"varint,4,opt,name=gossip,proto3" json:"gossip,omitempty"`
// PeerID is id of node that created the message (not the peer that may have sent it). =base58(mh(sha256(nodePubKey)))
PeerID []byte `protobuf:"bytes,5,opt,name=peerID,proto3" json:"peerID,omitempty"`
// nodePubKey Authoring node Secp256k1 public key (32bytes) - protobufs serielized
NodePubKey []byte `protobuf:"bytes,6,opt,name=nodePubKey,proto3" json:"nodePubKey,omitempty"`
// signature of message data + method specific data by message authoring node. format: string([]bytes)
Sign []byte `protobuf:"bytes,7,opt,name=sign,proto3" json:"sign,omitempty"`
// sub category of message. the receiving peer determines how to deserialize payload data and whether to spread messages to other peers
Subprotocol uint32 `protobuf:"varint,8,opt,name=subprotocol,proto3" json:"subprotocol,omitempty"`
// size of bytes of the payload
Length uint32 `protobuf:"varint,9,opt,name=length,proto3" json:"length,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MsgHeader) Reset() { *m = MsgHeader{} }
func (m *MsgHeader) String() string { return proto.CompactTextString(m) }
func (*MsgHeader) ProtoMessage() {}
func (*MsgHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{0}
}
func (m *MsgHeader) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgHeader.Unmarshal(m, b)
}
func (m *MsgHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MsgHeader.Marshal(b, m, deterministic)
}
func (dst *MsgHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgHeader.Merge(dst, src)
}
func (m *MsgHeader) XXX_Size() int {
return xxx_messageInfo_MsgHeader.Size(m)
}
func (m *MsgHeader) XXX_DiscardUnknown() {
xxx_messageInfo_MsgHeader.DiscardUnknown(m)
}
var xxx_messageInfo_MsgHeader proto.InternalMessageInfo
func (m *MsgHeader) GetClientVersion() string {
if m != nil {
return m.ClientVersion
}
return ""
}
func (m *MsgHeader) GetTimestamp() int64 {
if m != nil {
return m.Timestamp
}
return 0
}
func (m *MsgHeader) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *MsgHeader) GetGossip() bool {
if m != nil {
return m.Gossip
}
return false
}
func (m *MsgHeader) GetPeerID() []byte {
if m != nil {
return m.PeerID
}
return nil
}
func (m *MsgHeader) GetNodePubKey() []byte {
if m != nil {
return m.NodePubKey
}
return nil
}
func (m *MsgHeader) GetSign() []byte {
if m != nil {
return m.Sign
}
return nil
}
func (m *MsgHeader) GetSubprotocol() uint32 {
if m != nil {
return m.Subprotocol
}
return 0
}
func (m *MsgHeader) GetLength() uint32 {
if m != nil {
return m.Length
}
return 0
}
// Deprecated P2PMessage is data structure for aergo v0.2 or earlier. This structure is not used anymore since v0.3.0.
type P2PMessage struct {
Header *MsgHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
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 *P2PMessage) Reset() { *m = P2PMessage{} }
func (m *P2PMessage) String() string { return proto.CompactTextString(m) }
func (*P2PMessage) ProtoMessage() {}
func (*P2PMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{1}
}
func (m *P2PMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_P2PMessage.Unmarshal(m, b)
}
func (m *P2PMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_P2PMessage.Marshal(b, m, deterministic)
}
func (dst *P2PMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_P2PMessage.Merge(dst, src)
}
func (m *P2PMessage) XXX_Size() int {
return xxx_messageInfo_P2PMessage.Size(m)
}
func (m *P2PMessage) XXX_DiscardUnknown() {
xxx_messageInfo_P2PMessage.DiscardUnknown(m)
}
var xxx_messageInfo_P2PMessage proto.InternalMessageInfo
func (m *P2PMessage) GetHeader() *MsgHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *P2PMessage) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
// Ping request message
type Ping struct {
BestBlockHash []byte `protobuf:"bytes,1,opt,name=best_block_hash,json=bestBlockHash,proto3" json:"best_block_hash,omitempty"`
BestHeight uint64 `protobuf:"varint,2,opt,name=best_height,json=bestHeight,proto3" json:"best_height,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Ping) Reset() { *m = Ping{} }
func (m *Ping) String() string { return proto.CompactTextString(m) }
func (*Ping) ProtoMessage() {}
func (*Ping) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{2}
}
func (m *Ping) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Ping.Unmarshal(m, b)
}
func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Ping.Marshal(b, m, deterministic)
}
func (dst *Ping) XXX_Merge(src proto.Message) {
xxx_messageInfo_Ping.Merge(dst, src)
}
func (m *Ping) XXX_Size() int {
return xxx_messageInfo_Ping.Size(m)
}
func (m *Ping) XXX_DiscardUnknown() {
xxx_messageInfo_Ping.DiscardUnknown(m)
}
var xxx_messageInfo_Ping proto.InternalMessageInfo
func (m *Ping) GetBestBlockHash() []byte {
if m != nil {
return m.BestBlockHash
}
return nil
}
func (m *Ping) GetBestHeight() uint64 {
if m != nil {
return m.BestHeight
}
return 0
}
// Ping response message
type Pong struct {
BestBlockHash []byte `protobuf:"bytes,1,opt,name=bestBlockHash,proto3" json:"bestBlockHash,omitempty"`
BestHeight uint64 `protobuf:"varint,2,opt,name=bestHeight,proto3" json:"bestHeight,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Pong) Reset() { *m = Pong{} }
func (m *Pong) String() string { return proto.CompactTextString(m) }
func (*Pong) ProtoMessage() {}
func (*Pong) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{3}
}
func (m *Pong) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Pong.Unmarshal(m, b)
}
func (m *Pong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Pong.Marshal(b, m, deterministic)
}
func (dst *Pong) XXX_Merge(src proto.Message) {
xxx_messageInfo_Pong.Merge(dst, src)
}
func (m *Pong) XXX_Size() int {
return xxx_messageInfo_Pong.Size(m)
}
func (m *Pong) XXX_DiscardUnknown() {
xxx_messageInfo_Pong.DiscardUnknown(m)
}
var xxx_messageInfo_Pong proto.InternalMessageInfo
func (m *Pong) GetBestBlockHash() []byte {
if m != nil {
return m.BestBlockHash
}
return nil
}
func (m *Pong) GetBestHeight() uint64 {
if m != nil {
return m.BestHeight
}
return 0
}
// Status is peer status exchanged during handshake.
type Status struct {
Sender *PeerAddress `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
BestBlockHash []byte `protobuf:"bytes,2,opt,name=bestBlockHash,proto3" json:"bestBlockHash,omitempty"`
BestHeight uint64 `protobuf:"varint,3,opt,name=bestHeight,proto3" json:"bestHeight,omitempty"`
ChainID []byte `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"`
// noExpose means that peer doesn't want to be known to other peers.
NoExpose bool `protobuf:"varint,5,opt,name=noExpose,proto3" json:"noExpose,omitempty"`
// @Deprecated version is used in PeerAddress since aergo v2.
// version of server binary.
Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
// hash of genesis block
Genesis []byte `protobuf:"bytes,7,opt,name=genesis,proto3" json:"genesis,omitempty"`
Certificates []*AgentCertificate `protobuf:"bytes,8,rep,name=certificates,proto3" json:"certificates,omitempty"`
// request to issue agent certificates
IssueCertificate bool `protobuf:"varint,9,opt,name=issueCertificate,proto3" json:"issueCertificate,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Status) Reset() { *m = Status{} }
func (m *Status) String() string { return proto.CompactTextString(m) }
func (*Status) ProtoMessage() {}
func (*Status) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{4}
}
func (m *Status) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Status.Unmarshal(m, b)
}
func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Status.Marshal(b, m, deterministic)
}
func (dst *Status) XXX_Merge(src proto.Message) {
xxx_messageInfo_Status.Merge(dst, src)
}
func (m *Status) XXX_Size() int {
return xxx_messageInfo_Status.Size(m)
}
func (m *Status) XXX_DiscardUnknown() {
xxx_messageInfo_Status.DiscardUnknown(m)
}
var xxx_messageInfo_Status proto.InternalMessageInfo
func (m *Status) GetSender() *PeerAddress {
if m != nil {
return m.Sender
}
return nil
}
func (m *Status) GetBestBlockHash() []byte {
if m != nil {
return m.BestBlockHash
}
return nil
}
func (m *Status) GetBestHeight() uint64 {
if m != nil {
return m.BestHeight
}
return 0
}
func (m *Status) GetChainID() []byte {
if m != nil {
return m.ChainID
}
return nil
}
func (m *Status) GetNoExpose() bool {
if m != nil {
return m.NoExpose
}
return false
}
func (m *Status) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *Status) GetGenesis() []byte {
if m != nil {
return m.Genesis
}
return nil
}
func (m *Status) GetCertificates() []*AgentCertificate {
if m != nil {
return m.Certificates
}
return nil
}
func (m *Status) GetIssueCertificate() bool {
if m != nil {
return m.IssueCertificate
}
return false
}
// GoAwayNotice is sent before host peer is closing connection to remote peer. it contains why the host closing connection.
type GoAwayNotice struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GoAwayNotice) Reset() { *m = GoAwayNotice{} }
func (m *GoAwayNotice) String() string { return proto.CompactTextString(m) }
func (*GoAwayNotice) ProtoMessage() {}
func (*GoAwayNotice) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{5}
}
func (m *GoAwayNotice) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GoAwayNotice.Unmarshal(m, b)
}
func (m *GoAwayNotice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GoAwayNotice.Marshal(b, m, deterministic)
}
func (dst *GoAwayNotice) XXX_Merge(src proto.Message) {
xxx_messageInfo_GoAwayNotice.Merge(dst, src)
}
func (m *GoAwayNotice) XXX_Size() int {
return xxx_messageInfo_GoAwayNotice.Size(m)
}
func (m *GoAwayNotice) XXX_DiscardUnknown() {
xxx_messageInfo_GoAwayNotice.DiscardUnknown(m)
}
var xxx_messageInfo_GoAwayNotice proto.InternalMessageInfo
func (m *GoAwayNotice) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
type AddressesRequest struct {
Sender *PeerAddress `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
MaxSize uint32 `protobuf:"varint,2,opt,name=maxSize,proto3" json:"maxSize,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AddressesRequest) Reset() { *m = AddressesRequest{} }
func (m *AddressesRequest) String() string { return proto.CompactTextString(m) }
func (*AddressesRequest) ProtoMessage() {}
func (*AddressesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{6}
}
func (m *AddressesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddressesRequest.Unmarshal(m, b)
}
func (m *AddressesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddressesRequest.Marshal(b, m, deterministic)
}
func (dst *AddressesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddressesRequest.Merge(dst, src)
}
func (m *AddressesRequest) XXX_Size() int {
return xxx_messageInfo_AddressesRequest.Size(m)
}
func (m *AddressesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AddressesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AddressesRequest proto.InternalMessageInfo
func (m *AddressesRequest) GetSender() *PeerAddress {
if m != nil {
return m.Sender
}
return nil
}
func (m *AddressesRequest) GetMaxSize() uint32 {
if m != nil {
return m.MaxSize
}
return 0
}
type AddressesResponse struct {
Status ResultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
Peers []*PeerAddress `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AddressesResponse) Reset() { *m = AddressesResponse{} }
func (m *AddressesResponse) String() string { return proto.CompactTextString(m) }
func (*AddressesResponse) ProtoMessage() {}
func (*AddressesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{7}
}
func (m *AddressesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddressesResponse.Unmarshal(m, b)
}
func (m *AddressesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddressesResponse.Marshal(b, m, deterministic)
}
func (dst *AddressesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddressesResponse.Merge(dst, src)
}
func (m *AddressesResponse) XXX_Size() int {
return xxx_messageInfo_AddressesResponse.Size(m)
}
func (m *AddressesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AddressesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AddressesResponse proto.InternalMessageInfo
func (m *AddressesResponse) GetStatus() ResultStatus {
if m != nil {
return m.Status
}
return ResultStatus_OK
}
func (m *AddressesResponse) GetPeers() []*PeerAddress {
if m != nil {
return m.Peers
}
return nil
}
// NewBlockNotice is sent to other peers when host node add a block, which is not produced by this host peer (i.e. added block
// that other bp node produced.) It contains just hash and blockNo. The host node will not send notice if target receiving peer
// knows that block already at best effort.
type NewBlockNotice struct {
BlockHash []byte `protobuf:"bytes,1,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
BlockNo uint64 `protobuf:"varint,2,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NewBlockNotice) Reset() { *m = NewBlockNotice{} }
func (m *NewBlockNotice) String() string { return proto.CompactTextString(m) }
func (*NewBlockNotice) ProtoMessage() {}
func (*NewBlockNotice) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{8}
}
func (m *NewBlockNotice) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NewBlockNotice.Unmarshal(m, b)
}
func (m *NewBlockNotice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NewBlockNotice.Marshal(b, m, deterministic)
}
func (dst *NewBlockNotice) XXX_Merge(src proto.Message) {
xxx_messageInfo_NewBlockNotice.Merge(dst, src)
}
func (m *NewBlockNotice) XXX_Size() int {
return xxx_messageInfo_NewBlockNotice.Size(m)
}
func (m *NewBlockNotice) XXX_DiscardUnknown() {
xxx_messageInfo_NewBlockNotice.DiscardUnknown(m)
}
var xxx_messageInfo_NewBlockNotice proto.InternalMessageInfo
func (m *NewBlockNotice) GetBlockHash() []byte {
if m != nil {
return m.BlockHash
}
return nil
}
func (m *NewBlockNotice) GetBlockNo() uint64 {
if m != nil {
return m.BlockNo
}
return 0
}
// BlockProducedNotice is sent when BP created blocks and host peer is BP (or surrogate of BP) and receiving peer is also trusted BP or surrogate of BP.
// It contains whole block information
type BlockProducedNotice struct {
ProducerID []byte `protobuf:"bytes,1,opt,name=producerID,proto3" json:"producerID,omitempty"`
BlockNo uint64 `protobuf:"varint,2,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
Block *Block `protobuf:"bytes,3,opt,name=block,proto3" json:"block,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BlockProducedNotice) Reset() { *m = BlockProducedNotice{} }
func (m *BlockProducedNotice) String() string { return proto.CompactTextString(m) }
func (*BlockProducedNotice) ProtoMessage() {}
func (*BlockProducedNotice) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{9}
}
func (m *BlockProducedNotice) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlockProducedNotice.Unmarshal(m, b)
}
func (m *BlockProducedNotice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BlockProducedNotice.Marshal(b, m, deterministic)
}
func (dst *BlockProducedNotice) XXX_Merge(src proto.Message) {
xxx_messageInfo_BlockProducedNotice.Merge(dst, src)
}
func (m *BlockProducedNotice) XXX_Size() int {
return xxx_messageInfo_BlockProducedNotice.Size(m)
}
func (m *BlockProducedNotice) XXX_DiscardUnknown() {
xxx_messageInfo_BlockProducedNotice.DiscardUnknown(m)
}
var xxx_messageInfo_BlockProducedNotice proto.InternalMessageInfo
func (m *BlockProducedNotice) GetProducerID() []byte {
if m != nil {
return m.ProducerID
}
return nil
}
func (m *BlockProducedNotice) GetBlockNo() uint64 {
if m != nil {
return m.BlockNo
}
return 0
}
func (m *BlockProducedNotice) GetBlock() *Block {
if m != nil {
return m.Block
}
return nil
}
// GetBlockHeadersRequest
type GetBlockHeadersRequest struct {
// Hash indicated referenced block hash. server will return headers from this block.
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
// Block height instead of hash will be used for the first returned block, if hash is nil or empty
Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
Size uint32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
// default is false.
Asc bool `protobuf:"varint,5,opt,name=asc,proto3" json:"asc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetBlockHeadersRequest) Reset() { *m = GetBlockHeadersRequest{} }
func (m *GetBlockHeadersRequest) String() string { return proto.CompactTextString(m) }
func (*GetBlockHeadersRequest) ProtoMessage() {}
func (*GetBlockHeadersRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{10}
}
func (m *GetBlockHeadersRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlockHeadersRequest.Unmarshal(m, b)
}
func (m *GetBlockHeadersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBlockHeadersRequest.Marshal(b, m, deterministic)
}
func (dst *GetBlockHeadersRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBlockHeadersRequest.Merge(dst, src)
}
func (m *GetBlockHeadersRequest) XXX_Size() int {
return xxx_messageInfo_GetBlockHeadersRequest.Size(m)
}
func (m *GetBlockHeadersRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetBlockHeadersRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetBlockHeadersRequest proto.InternalMessageInfo
func (m *GetBlockHeadersRequest) GetHash() []byte {
if m != nil {
return m.Hash
}
return nil
}
func (m *GetBlockHeadersRequest) GetHeight() uint64 {
if m != nil {
return m.Height
}
return 0
}
func (m *GetBlockHeadersRequest) GetOffset() uint64 {
if m != nil {
return m.Offset
}
return 0
}
func (m *GetBlockHeadersRequest) GetSize() uint32 {
if m != nil {
return m.Size
}
return 0
}
func (m *GetBlockHeadersRequest) GetAsc() bool {
if m != nil {
return m.Asc
}
return false
}
// GetBlockResponse contains response of GetBlockRequest.
type GetBlockHeadersResponse struct {
Status ResultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
Hashes [][]byte `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"`
Headers []*BlockHeader `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
HasNext bool `protobuf:"varint,4,opt,name=hasNext,proto3" json:"hasNext,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetBlockHeadersResponse) Reset() { *m = GetBlockHeadersResponse{} }
func (m *GetBlockHeadersResponse) String() string { return proto.CompactTextString(m) }
func (*GetBlockHeadersResponse) ProtoMessage() {}
func (*GetBlockHeadersResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{11}
}
func (m *GetBlockHeadersResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlockHeadersResponse.Unmarshal(m, b)
}
func (m *GetBlockHeadersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBlockHeadersResponse.Marshal(b, m, deterministic)
}
func (dst *GetBlockHeadersResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBlockHeadersResponse.Merge(dst, src)
}
func (m *GetBlockHeadersResponse) XXX_Size() int {
return xxx_messageInfo_GetBlockHeadersResponse.Size(m)
}
func (m *GetBlockHeadersResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetBlockHeadersResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetBlockHeadersResponse proto.InternalMessageInfo
func (m *GetBlockHeadersResponse) GetStatus() ResultStatus {
if m != nil {
return m.Status
}
return ResultStatus_OK
}
func (m *GetBlockHeadersResponse) GetHashes() [][]byte {
if m != nil {
return m.Hashes
}
return nil
}
func (m *GetBlockHeadersResponse) GetHeaders() []*BlockHeader {
if m != nil {
return m.Headers
}
return nil
}
func (m *GetBlockHeadersResponse) GetHasNext() bool {
if m != nil {
return m.HasNext
}
return false
}
// GetBlockRequest request blocks informations, not just single block.
type GetBlockRequest struct {
Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetBlockRequest) Reset() { *m = GetBlockRequest{} }
func (m *GetBlockRequest) String() string { return proto.CompactTextString(m) }
func (*GetBlockRequest) ProtoMessage() {}
func (*GetBlockRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{12}
}
func (m *GetBlockRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlockRequest.Unmarshal(m, b)
}
func (m *GetBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBlockRequest.Marshal(b, m, deterministic)
}
func (dst *GetBlockRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBlockRequest.Merge(dst, src)
}
func (m *GetBlockRequest) XXX_Size() int {
return xxx_messageInfo_GetBlockRequest.Size(m)
}
func (m *GetBlockRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetBlockRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetBlockRequest proto.InternalMessageInfo
func (m *GetBlockRequest) GetHashes() [][]byte {
if m != nil {
return m.Hashes
}
return nil
}
// GetBlockResponse contains response of GetBlockRequest.
type GetBlockResponse struct {
Status ResultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
Blocks []*Block `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"`
HasNext bool `protobuf:"varint,3,opt,name=hasNext,proto3" json:"hasNext,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetBlockResponse) Reset() { *m = GetBlockResponse{} }
func (m *GetBlockResponse) String() string { return proto.CompactTextString(m) }
func (*GetBlockResponse) ProtoMessage() {}
func (*GetBlockResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{13}
}
func (m *GetBlockResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlockResponse.Unmarshal(m, b)
}
func (m *GetBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBlockResponse.Marshal(b, m, deterministic)
}
func (dst *GetBlockResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBlockResponse.Merge(dst, src)
}
func (m *GetBlockResponse) XXX_Size() int {
return xxx_messageInfo_GetBlockResponse.Size(m)
}
func (m *GetBlockResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetBlockResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetBlockResponse proto.InternalMessageInfo
func (m *GetBlockResponse) GetStatus() ResultStatus {
if m != nil {
return m.Status
}
return ResultStatus_OK
}
func (m *GetBlockResponse) GetBlocks() []*Block {
if m != nil {
return m.Blocks
}
return nil
}
func (m *GetBlockResponse) GetHasNext() bool {
if m != nil {
return m.HasNext
}
return false
}
type NewTransactionsNotice struct {
TxHashes [][]byte `protobuf:"bytes,1,rep,name=txHashes,proto3" json:"txHashes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NewTransactionsNotice) Reset() { *m = NewTransactionsNotice{} }
func (m *NewTransactionsNotice) String() string { return proto.CompactTextString(m) }
func (*NewTransactionsNotice) ProtoMessage() {}
func (*NewTransactionsNotice) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{14}
}
func (m *NewTransactionsNotice) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NewTransactionsNotice.Unmarshal(m, b)
}
func (m *NewTransactionsNotice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NewTransactionsNotice.Marshal(b, m, deterministic)
}
func (dst *NewTransactionsNotice) XXX_Merge(src proto.Message) {
xxx_messageInfo_NewTransactionsNotice.Merge(dst, src)
}
func (m *NewTransactionsNotice) XXX_Size() int {
return xxx_messageInfo_NewTransactionsNotice.Size(m)
}
func (m *NewTransactionsNotice) XXX_DiscardUnknown() {
xxx_messageInfo_NewTransactionsNotice.DiscardUnknown(m)
}
var xxx_messageInfo_NewTransactionsNotice proto.InternalMessageInfo
func (m *NewTransactionsNotice) GetTxHashes() [][]byte {
if m != nil {
return m.TxHashes
}
return nil
}
type GetTransactionsRequest struct {
Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetTransactionsRequest) Reset() { *m = GetTransactionsRequest{} }
func (m *GetTransactionsRequest) String() string { return proto.CompactTextString(m) }
func (*GetTransactionsRequest) ProtoMessage() {}
func (*GetTransactionsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_p2p_6496de2d566cf566, []int{15}
}
func (m *GetTransactionsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetTransactionsRequest.Unmarshal(m, b)
}
func (m *GetTransactionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetTransactionsRequest.Marshal(b, m, deterministic)