diff --git a/Makefile b/Makefile index b8687739..ba400f9e 100644 --- a/Makefile +++ b/Makefile @@ -20,3 +20,6 @@ lint: test: go test -v -failfast ./... + +generate: + go generate ./waku/v2/protocol/pb/generate.go \ No newline at end of file diff --git a/go.mod b/go.mod index a2928c33..d33fd6db 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( contrib.go.opencensus.io/exporter/prometheus v0.3.0 github.com/cruxic/go-hmac-drbg v0.0.0-20170206035330-84c46983886d github.com/ethereum/go-ethereum v1.10.4 + github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.2 github.com/ipfs/go-ds-sql v0.2.0 github.com/ipfs/go-log v1.0.5 diff --git a/waku/tools/tools.go b/waku/tools/tools.go new file mode 100644 index 00000000..ed05ecbc --- /dev/null +++ b/waku/tools/tools.go @@ -0,0 +1,9 @@ +//go:build tools +// +build tools + +// tools is a dummy package that will be ignored for builds, but included for dependencies +package tools + +import ( + _ "github.com/gogo/protobuf/protoc-gen-gofast" +) diff --git a/waku/v2/protocol/pb/generate.go b/waku/v2/protocol/pb/generate.go new file mode 100644 index 00000000..a75336ee --- /dev/null +++ b/waku/v2/protocol/pb/generate.go @@ -0,0 +1,6 @@ +package pb + +//go:generate protoc -I. --gofast_out=. ./waku_filter.proto +//go:generate protoc -I. --gofast_out=. ./waku_lightpush.proto +//go:generate protoc -I. --gofast_out=. ./waku_message.proto +//go:generate protoc -I. --gofast_out=. ./waku_store.proto diff --git a/waku/v2/protocol/pb/waku_message.pb.go b/waku/v2/protocol/pb/waku_message.pb.go index 0c0d6802..8930d373 100644 --- a/waku/v2/protocol/pb/waku_message.pb.go +++ b/waku/v2/protocol/pb/waku_message.pb.go @@ -103,25 +103,25 @@ func (m *WakuMessage) GetProof() []byte { } func init() { - proto.RegisterType((*WakuMessage)(nil), "protocol.WakuMessage") + proto.RegisterType((*WakuMessage)(nil), "pb.WakuMessage") } func init() { proto.RegisterFile("waku_message.proto", fileDescriptor_6f0a20862b3bf714) } var fileDescriptor_6f0a20862b3bf714 = []byte{ - // 186 bytes of a gzipped FileDescriptorProto + // 184 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2a, 0x4f, 0xcc, 0x2e, - 0x8d, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, - 0x00, 0x53, 0xc9, 0xf9, 0x39, 0x4a, 0x33, 0x19, 0xb9, 0xb8, 0xc3, 0x13, 0xb3, 0x4b, 0x7d, 0x21, - 0xf2, 0x42, 0x12, 0x5c, 0xec, 0x05, 0x89, 0x95, 0x39, 0xf9, 0x89, 0x29, 0x12, 0x8c, 0x0a, 0x8c, - 0x1a, 0x3c, 0x41, 0x30, 0xae, 0x90, 0x12, 0x17, 0x4f, 0x72, 0x7e, 0x5e, 0x49, 0x6a, 0x5e, 0x49, - 0x48, 0x7e, 0x41, 0x66, 0xb2, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x8a, 0x18, 0x48, 0x77, - 0x59, 0x6a, 0x51, 0x71, 0x66, 0x7e, 0x9e, 0x04, 0xb3, 0x02, 0xa3, 0x06, 0x6f, 0x10, 0x8c, 0x2b, - 0x24, 0xc3, 0xc5, 0x59, 0x92, 0x99, 0x9b, 0x5a, 0x5c, 0x92, 0x98, 0x5b, 0x20, 0xc1, 0xa2, 0xc0, - 0xa8, 0xc1, 0x18, 0x84, 0x10, 0x10, 0x12, 0xe1, 0x62, 0x2d, 0x28, 0xca, 0xcf, 0x4f, 0x93, 0x10, - 0x05, 0xdb, 0x09, 0xe1, 0x38, 0x09, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, - 0x47, 0x72, 0x8c, 0x33, 0x1e, 0xcb, 0x31, 0x24, 0xb1, 0x81, 0xdd, 0x6d, 0x0c, 0x08, 0x00, 0x00, - 0xff, 0xff, 0xb0, 0xa0, 0x70, 0x06, 0xd4, 0x00, 0x00, 0x00, + 0x8d, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, + 0x2a, 0x48, 0x52, 0x9a, 0xc9, 0xc8, 0xc5, 0x1d, 0x9e, 0x98, 0x5d, 0xea, 0x0b, 0x91, 0x11, 0x92, + 0xe0, 0x62, 0x2f, 0x48, 0xac, 0xcc, 0xc9, 0x4f, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, + 0x82, 0x71, 0x85, 0x94, 0xb8, 0x78, 0x92, 0xf3, 0xf3, 0x4a, 0x52, 0xf3, 0x4a, 0x42, 0xf2, 0x0b, + 0x32, 0x93, 0x25, 0x98, 0x14, 0x18, 0x35, 0x38, 0x83, 0x50, 0xc4, 0x40, 0xba, 0xcb, 0x52, 0x8b, + 0x8a, 0x33, 0xf3, 0xf3, 0x24, 0x98, 0x15, 0x18, 0x35, 0x78, 0x83, 0x60, 0x5c, 0x21, 0x19, 0x2e, + 0xce, 0x92, 0xcc, 0xdc, 0xd4, 0xe2, 0x92, 0xc4, 0xdc, 0x02, 0x09, 0x16, 0x05, 0x46, 0x0d, 0xc6, + 0x20, 0x84, 0x80, 0x90, 0x08, 0x17, 0x6b, 0x41, 0x51, 0x7e, 0x7e, 0x9a, 0x84, 0x28, 0xd8, 0x4e, + 0x08, 0xc7, 0x49, 0xe0, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, + 0x9c, 0xf1, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0xec, 0x70, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x0a, 0xc6, 0x91, 0x28, 0xce, 0x00, 0x00, 0x00, } func (m *WakuMessage) Marshal() (dAtA []byte, err error) { diff --git a/waku/v2/protocol/pb/waku_store.pb.go b/waku/v2/protocol/pb/waku_store.pb.go index ad6809dd..144b92ec 100644 --- a/waku/v2/protocol/pb/waku_store.pb.go +++ b/waku/v2/protocol/pb/waku_store.pb.go @@ -1,12 +1,15 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: waku_store.proto package pb import ( + encoding_binary "encoding/binary" fmt "fmt" proto "github.com/golang/protobuf/proto" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -85,18 +88,26 @@ func (*Index) ProtoMessage() {} func (*Index) Descriptor() ([]byte, []int) { return fileDescriptor_ca6891f77a46e680, []int{0} } - func (m *Index) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Index.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Index.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Index.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Index) XXX_Merge(src proto.Message) { xxx_messageInfo_Index.Merge(m, src) } func (m *Index) XXX_Size() int { - return xxx_messageInfo_Index.Size(m) + return m.Size() } func (m *Index) XXX_DiscardUnknown() { xxx_messageInfo_Index.DiscardUnknown(m) @@ -140,18 +151,26 @@ func (*PagingInfo) ProtoMessage() {} func (*PagingInfo) Descriptor() ([]byte, []int) { return fileDescriptor_ca6891f77a46e680, []int{1} } - func (m *PagingInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PagingInfo.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *PagingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PagingInfo.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_PagingInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *PagingInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_PagingInfo.Merge(m, src) } func (m *PagingInfo) XXX_Size() int { - return xxx_messageInfo_PagingInfo.Size(m) + return m.Size() } func (m *PagingInfo) XXX_DiscardUnknown() { xxx_messageInfo_PagingInfo.DiscardUnknown(m) @@ -193,18 +212,26 @@ func (*ContentFilter) ProtoMessage() {} func (*ContentFilter) Descriptor() ([]byte, []int) { return fileDescriptor_ca6891f77a46e680, []int{2} } - func (m *ContentFilter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ContentFilter.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ContentFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ContentFilter.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ContentFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *ContentFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_ContentFilter.Merge(m, src) } func (m *ContentFilter) XXX_Size() int { - return xxx_messageInfo_ContentFilter.Size(m) + return m.Size() } func (m *ContentFilter) XXX_DiscardUnknown() { xxx_messageInfo_ContentFilter.DiscardUnknown(m) @@ -236,18 +263,26 @@ func (*HistoryQuery) ProtoMessage() {} func (*HistoryQuery) Descriptor() ([]byte, []int) { return fileDescriptor_ca6891f77a46e680, []int{3} } - func (m *HistoryQuery) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HistoryQuery.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *HistoryQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HistoryQuery.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_HistoryQuery.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *HistoryQuery) XXX_Merge(src proto.Message) { xxx_messageInfo_HistoryQuery.Merge(m, src) } func (m *HistoryQuery) XXX_Size() int { - return xxx_messageInfo_HistoryQuery.Size(m) + return m.Size() } func (m *HistoryQuery) XXX_DiscardUnknown() { xxx_messageInfo_HistoryQuery.DiscardUnknown(m) @@ -306,18 +341,26 @@ func (*HistoryResponse) ProtoMessage() {} func (*HistoryResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ca6891f77a46e680, []int{4} } - func (m *HistoryResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HistoryResponse.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *HistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HistoryResponse.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_HistoryResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *HistoryResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_HistoryResponse.Merge(m, src) } func (m *HistoryResponse) XXX_Size() int { - return xxx_messageInfo_HistoryResponse.Size(m) + return m.Size() } func (m *HistoryResponse) XXX_DiscardUnknown() { xxx_messageInfo_HistoryResponse.DiscardUnknown(m) @@ -361,18 +404,26 @@ func (*HistoryRPC) ProtoMessage() {} func (*HistoryRPC) Descriptor() ([]byte, []int) { return fileDescriptor_ca6891f77a46e680, []int{5} } - func (m *HistoryRPC) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HistoryRPC.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *HistoryRPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HistoryRPC.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_HistoryRPC.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *HistoryRPC) XXX_Merge(src proto.Message) { xxx_messageInfo_HistoryRPC.Merge(m, src) } func (m *HistoryRPC) XXX_Size() int { - return xxx_messageInfo_HistoryRPC.Size(m) + return m.Size() } func (m *HistoryRPC) XXX_DiscardUnknown() { xxx_messageInfo_HistoryRPC.DiscardUnknown(m) @@ -412,42 +463,1387 @@ func init() { proto.RegisterType((*HistoryRPC)(nil), "pb.HistoryRPC") } -func init() { - proto.RegisterFile("waku_store.proto", fileDescriptor_ca6891f77a46e680) -} +func init() { proto.RegisterFile("waku_store.proto", fileDescriptor_ca6891f77a46e680) } var fileDescriptor_ca6891f77a46e680 = []byte{ - // 509 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x6f, 0x6b, 0x13, 0x41, - 0x10, 0xc6, 0xbb, 0xf9, 0xd7, 0xdc, 0x24, 0xa6, 0x71, 0x04, 0x39, 0x8b, 0x4a, 0x3c, 0xb0, 0x04, - 0x84, 0x2b, 0xa4, 0x20, 0xf8, 0x32, 0x26, 0x2d, 0x06, 0x35, 0xa9, 0xdb, 0x6a, 0x5f, 0x86, 0xcb, - 0xdd, 0x18, 0x96, 0xda, 0xdb, 0xeb, 0xee, 0x9e, 0x5a, 0x5f, 0xfb, 0x6d, 0xfc, 0x1e, 0x7e, 0x01, - 0xbf, 0x90, 0xdc, 0x66, 0xf3, 0x17, 0xc1, 0x97, 0xf3, 0xcc, 0xef, 0xf2, 0x3c, 0x33, 0xb3, 0x81, - 0xf6, 0xb7, 0xe8, 0x3a, 0x9f, 0x6a, 0x23, 0x15, 0x85, 0x99, 0x92, 0x46, 0x62, 0x29, 0x9b, 0x1d, - 0xa2, 0x55, 0x6f, 0x48, 0xeb, 0x68, 0xee, 0xf4, 0x20, 0x86, 0xea, 0x28, 0x4d, 0xe8, 0x3b,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 0xf6, 0xb8, 0x7c, 0xd1, 0xc6, 0x63, 0xa8, 0x2b, - 0x97, 0xca, 0xcd, 0xf6, 0xe0, 0x1f, 0x81, 0xf9, 0x0a, 0x9a, 0xd5, 0xec, 0x9f, 0xee, 0xe4, 0x6f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0xcf, 0xa2, 0x96, 0xa0, 0x03, 0x00, 0x00, + // 534 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xdf, 0x6a, 0x13, 0x4f, + 0x14, 0xc7, 0x3b, 0xf9, 0xd7, 0xec, 0x49, 0x7e, 0xe9, 0xfe, 0x8e, 0x20, 0x6b, 0xd1, 0x10, 0x17, + 0x2c, 0x01, 0x61, 0x0b, 0x29, 0x08, 0x5e, 0xa6, 0x49, 0x8b, 0x41, 0x4d, 0xea, 0xb4, 0xda, 0xcb, + 0xb0, 0xd9, 0x3d, 0x86, 0xa1, 0x76, 0x77, 0x3b, 0xb3, 0xab, 0xd6, 0x6b, 0x1f, 0xc2, 0x77, 0xf0, + 0x3d, 0xc4, 0x4b, 0xc1, 0x17, 0x90, 0xf8, 0x22, 0xb2, 0x93, 0xc9, 0x5f, 0x04, 0x2f, 0xcf, 0xf7, + 0x7c, 0x36, 0xdf, 0xef, 0x39, 0x67, 0x02, 0xf6, 0x07, 0xff, 0x2a, 0x1b, 0xab, 0x34, 0x96, 0xe4, + 0x25, 0x32, 0x4e, 0x63, 0x2c, 0x24, 0x93, 0x7d, 0xd4, 0xea, 0x35, 0x29, 0xe5, 0x4f, 0x8d, 0xee, + 0x06, 0x50, 0x1e, 0x44, 0x21, 0x7d, 0xc4, 0xbb, 0x50, 0x09, 0xc5, 0x94, 0x54, 0xea, 0xb0, 0x16, + 0x6b, 0xd7, 0xb9, 0xa9, 0xd0, 0x85, 0xba, 0xa4, 0x80, 0xc4, 0x7b, 0x92, 0x17, 0xe2, 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0xbf, 0x66, 0x4d, 0xf6, 0xe5, + 0x77, 0x73, 0x67, 0x52, 0xd1, 0x7f, 0xc3, 0xa3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x5c, + 0xa1, 0x0e, 0xb2, 0x03, 0x00, 0x00, } + +func (m *Index) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Index) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Index) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.SenderTime != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SenderTime)))) + i-- + dAtA[i] = 0x19 + } + if m.ReceiverTime != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ReceiverTime)))) + i-- + dAtA[i] = 0x11 + } + if len(m.Digest) > 0 { + i -= len(m.Digest) + copy(dAtA[i:], m.Digest) + i = encodeVarintWakuStore(dAtA, i, uint64(len(m.Digest))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PagingInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PagingInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PagingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Direction != 0 { + i = encodeVarintWakuStore(dAtA, i, uint64(m.Direction)) + i-- + dAtA[i] = 0x18 + } + if m.Cursor != nil { + { + size, err := m.Cursor.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWakuStore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.PageSize != 0 { + i = encodeVarintWakuStore(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ContentFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContentFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContentFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ContentTopic) > 0 { + i -= len(m.ContentTopic) + copy(dAtA[i:], m.ContentTopic) + i = encodeVarintWakuStore(dAtA, i, uint64(len(m.ContentTopic))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HistoryQuery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HistoryQuery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HistoryQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.EndTime != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.EndTime)))) + i-- + dAtA[i] = 0x31 + } + if m.StartTime != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.StartTime)))) + i-- + dAtA[i] = 0x29 + } + if m.PagingInfo != nil { + { + size, err := m.PagingInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWakuStore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.ContentFilters) > 0 { + for iNdEx := len(m.ContentFilters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContentFilters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWakuStore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.PubsubTopic) > 0 { + i -= len(m.PubsubTopic) + copy(dAtA[i:], m.PubsubTopic) + i = encodeVarintWakuStore(dAtA, i, uint64(len(m.PubsubTopic))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func (m *HistoryResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HistoryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HistoryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Error != 0 { + i = encodeVarintWakuStore(dAtA, i, uint64(m.Error)) + i-- + dAtA[i] = 0x20 + } + if m.PagingInfo != nil { + { + size, err := m.PagingInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWakuStore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Messages) > 0 { + for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWakuStore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + return len(dAtA) - i, nil +} + +func (m *HistoryRPC) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HistoryRPC) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HistoryRPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Response != nil { + { + size, err := m.Response.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWakuStore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Query != nil { + { + size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWakuStore(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintWakuStore(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintWakuStore(dAtA []byte, offset int, v uint64) int { + offset -= sovWakuStore(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Index) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Digest) + if l > 0 { + n += 1 + l + sovWakuStore(uint64(l)) + } + if m.ReceiverTime != 0 { + n += 9 + } + if m.SenderTime != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PagingInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PageSize != 0 { + n += 1 + sovWakuStore(uint64(m.PageSize)) + } + if m.Cursor != nil { + l = m.Cursor.Size() + n += 1 + l + sovWakuStore(uint64(l)) + } + if m.Direction != 0 { + n += 1 + sovWakuStore(uint64(m.Direction)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContentFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContentTopic) + if l > 0 { + n += 1 + l + sovWakuStore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HistoryQuery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PubsubTopic) + if l > 0 { + n += 1 + l + sovWakuStore(uint64(l)) + } + if len(m.ContentFilters) > 0 { + for _, e := range m.ContentFilters { + l = e.Size() + n += 1 + l + sovWakuStore(uint64(l)) + } + } + if m.PagingInfo != nil { + l = m.PagingInfo.Size() + n += 1 + l + sovWakuStore(uint64(l)) + } + if m.StartTime != 0 { + n += 9 + } + if m.EndTime != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HistoryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Messages) > 0 { + for _, e := range m.Messages { + l = e.Size() + n += 1 + l + sovWakuStore(uint64(l)) + } + } + if m.PagingInfo != nil { + l = m.PagingInfo.Size() + n += 1 + l + sovWakuStore(uint64(l)) + } + if m.Error != 0 { + n += 1 + sovWakuStore(uint64(m.Error)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HistoryRPC) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovWakuStore(uint64(l)) + } + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovWakuStore(uint64(l)) + } + if m.Response != nil { + l = m.Response.Size() + n += 1 + l + sovWakuStore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovWakuStore(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozWakuStore(x uint64) (n int) { + return sovWakuStore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Index) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Index: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Index: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Digest = append(m.Digest[:0], dAtA[iNdEx:postIndex]...) + if m.Digest == nil { + m.Digest = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceiverTime", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.ReceiverTime = float64(math.Float64frombits(v)) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderTime", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.SenderTime = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipWakuStore(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWakuStore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PagingInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PagingInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PagingInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cursor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Cursor == nil { + m.Cursor = &Index{} + } + if err := m.Cursor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType) + } + m.Direction = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Direction |= PagingInfo_Direction(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWakuStore(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWakuStore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContentFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContentFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContentFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContentTopic", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContentTopic = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWakuStore(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWakuStore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HistoryQuery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HistoryQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HistoryQuery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PubsubTopic", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PubsubTopic = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContentFilters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContentFilters = append(m.ContentFilters, &ContentFilter{}) + if err := m.ContentFilters[len(m.ContentFilters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PagingInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PagingInfo == nil { + m.PagingInfo = &PagingInfo{} + } + if err := m.PagingInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.StartTime = float64(math.Float64frombits(v)) + case 6: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.EndTime = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipWakuStore(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWakuStore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HistoryResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HistoryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HistoryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Messages = append(m.Messages, &WakuMessage{}) + if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PagingInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PagingInfo == nil { + m.PagingInfo = &PagingInfo{} + } + if err := m.PagingInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + m.Error = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Error |= HistoryResponse_Error(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWakuStore(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWakuStore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HistoryRPC) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HistoryRPC: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HistoryRPC: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &HistoryQuery{} + } + if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWakuStore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWakuStore + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWakuStore + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Response == nil { + m.Response = &HistoryResponse{} + } + if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWakuStore(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWakuStore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipWakuStore(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWakuStore + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWakuStore + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWakuStore + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthWakuStore + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupWakuStore + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthWakuStore + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthWakuStore = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowWakuStore = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupWakuStore = fmt.Errorf("proto: unexpected end of group") +)