eiger-p2p/proto_files/tendermint/crypto/proof.pb.go

1422 lines
32 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: tendermint/crypto/proof.proto
package crypto
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
)
// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Proof struct {
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
LeafHash []byte `protobuf:"bytes,3,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"`
Aunts [][]byte `protobuf:"bytes,4,rep,name=aunts,proto3" json:"aunts,omitempty"`
}
func (m *Proof) Reset() { *m = Proof{} }
func (m *Proof) String() string { return proto.CompactTextString(m) }
func (*Proof) ProtoMessage() {}
func (*Proof) Descriptor() ([]byte, []int) {
return fileDescriptor_6b60b6ba2ab5b856, []int{0}
}
func (m *Proof) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Proof.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 *Proof) XXX_Merge(src proto.Message) {
xxx_messageInfo_Proof.Merge(m, src)
}
func (m *Proof) XXX_Size() int {
return m.Size()
}
func (m *Proof) XXX_DiscardUnknown() {
xxx_messageInfo_Proof.DiscardUnknown(m)
}
var xxx_messageInfo_Proof proto.InternalMessageInfo
func (m *Proof) GetTotal() int64 {
if m != nil {
return m.Total
}
return 0
}
func (m *Proof) GetIndex() int64 {
if m != nil {
return m.Index
}
return 0
}
func (m *Proof) GetLeafHash() []byte {
if m != nil {
return m.LeafHash
}
return nil
}
func (m *Proof) GetAunts() [][]byte {
if m != nil {
return m.Aunts
}
return nil
}
type ValueOp struct {
// Encoded in ProofOp.Key.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// To encode in ProofOp.Data
Proof *Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
}
func (m *ValueOp) Reset() { *m = ValueOp{} }
func (m *ValueOp) String() string { return proto.CompactTextString(m) }
func (*ValueOp) ProtoMessage() {}
func (*ValueOp) Descriptor() ([]byte, []int) {
return fileDescriptor_6b60b6ba2ab5b856, []int{1}
}
func (m *ValueOp) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ValueOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ValueOp.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 *ValueOp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ValueOp.Merge(m, src)
}
func (m *ValueOp) XXX_Size() int {
return m.Size()
}
func (m *ValueOp) XXX_DiscardUnknown() {
xxx_messageInfo_ValueOp.DiscardUnknown(m)
}
var xxx_messageInfo_ValueOp proto.InternalMessageInfo
func (m *ValueOp) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *ValueOp) GetProof() *Proof {
if m != nil {
return m.Proof
}
return nil
}
type DominoOp struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"`
Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"`
}
func (m *DominoOp) Reset() { *m = DominoOp{} }
func (m *DominoOp) String() string { return proto.CompactTextString(m) }
func (*DominoOp) ProtoMessage() {}
func (*DominoOp) Descriptor() ([]byte, []int) {
return fileDescriptor_6b60b6ba2ab5b856, []int{2}
}
func (m *DominoOp) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DominoOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DominoOp.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 *DominoOp) XXX_Merge(src proto.Message) {
xxx_messageInfo_DominoOp.Merge(m, src)
}
func (m *DominoOp) XXX_Size() int {
return m.Size()
}
func (m *DominoOp) XXX_DiscardUnknown() {
xxx_messageInfo_DominoOp.DiscardUnknown(m)
}
var xxx_messageInfo_DominoOp proto.InternalMessageInfo
func (m *DominoOp) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *DominoOp) GetInput() string {
if m != nil {
return m.Input
}
return ""
}
func (m *DominoOp) GetOutput() string {
if m != nil {
return m.Output
}
return ""
}
// ProofOp defines an operation used for calculating Merkle root
// The data could be arbitrary format, providing nessecary data
// for example neighbouring node hash
type ProofOp struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *ProofOp) Reset() { *m = ProofOp{} }
func (m *ProofOp) String() string { return proto.CompactTextString(m) }
func (*ProofOp) ProtoMessage() {}
func (*ProofOp) Descriptor() ([]byte, []int) {
return fileDescriptor_6b60b6ba2ab5b856, []int{3}
}
func (m *ProofOp) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ProofOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ProofOp.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 *ProofOp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProofOp.Merge(m, src)
}
func (m *ProofOp) XXX_Size() int {
return m.Size()
}
func (m *ProofOp) XXX_DiscardUnknown() {
xxx_messageInfo_ProofOp.DiscardUnknown(m)
}
var xxx_messageInfo_ProofOp proto.InternalMessageInfo
func (m *ProofOp) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *ProofOp) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *ProofOp) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
// ProofOps is Merkle proof defined by the list of ProofOps
type ProofOps struct {
Ops []ProofOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops"`
}
func (m *ProofOps) Reset() { *m = ProofOps{} }
func (m *ProofOps) String() string { return proto.CompactTextString(m) }
func (*ProofOps) ProtoMessage() {}
func (*ProofOps) Descriptor() ([]byte, []int) {
return fileDescriptor_6b60b6ba2ab5b856, []int{4}
}
func (m *ProofOps) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ProofOps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ProofOps.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 *ProofOps) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProofOps.Merge(m, src)
}
func (m *ProofOps) XXX_Size() int {
return m.Size()
}
func (m *ProofOps) XXX_DiscardUnknown() {
xxx_messageInfo_ProofOps.DiscardUnknown(m)
}
var xxx_messageInfo_ProofOps proto.InternalMessageInfo
func (m *ProofOps) GetOps() []ProofOp {
if m != nil {
return m.Ops
}
return nil
}
func init() {
proto.RegisterType((*Proof)(nil), "tendermint.crypto.Proof")
proto.RegisterType((*ValueOp)(nil), "tendermint.crypto.ValueOp")
proto.RegisterType((*DominoOp)(nil), "tendermint.crypto.DominoOp")
proto.RegisterType((*ProofOp)(nil), "tendermint.crypto.ProofOp")
proto.RegisterType((*ProofOps)(nil), "tendermint.crypto.ProofOps")
}
func init() { proto.RegisterFile("tendermint/crypto/proof.proto", fileDescriptor_6b60b6ba2ab5b856) }
var fileDescriptor_6b60b6ba2ab5b856 = []byte{
// 351 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xbb, 0x4e, 0xc3, 0x30,
0x14, 0x4d, 0xea, 0xf4, 0x75, 0xdb, 0x01, 0xac, 0x0a, 0x45, 0x45, 0x84, 0x28, 0x53, 0xa6, 0x44,
0x2a, 0x0b, 0x13, 0x43, 0x61, 0x40, 0x30, 0x14, 0x79, 0x60, 0x60, 0x41, 0x6e, 0xeb, 0x36, 0x11,
0x6d, 0x6c, 0x25, 0x8e, 0x44, 0xff, 0x82, 0xcf, 0xea, 0xd8, 0x91, 0x09, 0xa1, 0xf6, 0x47, 0x90,
0xed, 0xa0, 0x16, 0x55, 0x6c, 0xe7, 0x71, 0x7d, 0x7c, 0xac, 0x6b, 0xb8, 0x90, 0x2c, 0x9b, 0xb2,
0x7c, 0x99, 0x66, 0x32, 0x9e, 0xe4, 0x2b, 0x21, 0x79, 0x2c, 0x72, 0xce, 0x67, 0x91, 0xc8, 0xb9,
0xe4, 0xf8, 0x74, 0x6f, 0x47, 0xc6, 0xee, 0xf7, 0xe6, 0x7c, 0xce, 0xb5, 0x1b, 0x2b, 0x64, 0x06,
0x83, 0x19, 0xd4, 0x9f, 0xd4, 0x39, 0xdc, 0x83, 0xba, 0xe4, 0x92, 0x2e, 0x5c, 0xdb, 0xb7, 0x43,
0x44, 0x0c, 0x51, 0x6a, 0x9a, 0x4d, 0xd9, 0xbb, 0x5b, 0x33, 0xaa, 0x26, 0xf8, 0x1c, 0xda, 0x0b,
0x46, 0x67, 0xaf, 0x09, 0x2d, 0x12, 0x17, 0xf9, 0x76, 0xd8, 0x25, 0x2d, 0x25, 0xdc, 0xd3, 0x22,
0x51, 0x47, 0x68, 0x99, 0xc9, 0xc2, 0x75, 0x7c, 0x14, 0x76, 0x89, 0x21, 0xc1, 0x23, 0x34, 0x9f,
0xe9, 0xa2, 0x64, 0x23, 0x81, 0x4f, 0x00, 0xbd, 0xb1, 0x95, 0xbe, 0xa7, 0x4b, 0x14, 0xc4, 0x11,
0xd4, 0x75, 0x79, 0x7d, 0x4b, 0x67, 0xe0, 0x46, 0x47, 0xed, 0x23, 0x5d, 0x92, 0x98, 0xb1, 0xe0,
0x01, 0x5a, 0x77, 0x7c, 0x99, 0x66, 0xfc, 0x6f, 0x5a, 0xdb, 0xa4, 0xe9, 0xce, 0xa2, 0x94, 0x3a,
0xad, 0x4d, 0x0c, 0xc1, 0x67, 0xd0, 0xe0, 0xa5, 0x54, 0x32, 0xd2, 0x72, 0xc5, 0x82, 0x5b, 0x68,
0xea, 0xec, 0x91, 0xc0, 0x18, 0x1c, 0xb9, 0x12, 0xac, 0xca, 0xd2, 0xf8, 0x37, 0xbe, 0xb6, 0x2f,
0x8b, 0xc1, 0x99, 0x52, 0x49, 0xab, 0x77, 0x6b, 0x1c, 0xdc, 0x40, 0xab, 0x0a, 0x29, 0xf0, 0x00,
0x10, 0x17, 0x85, 0x6b, 0xfb, 0x28, 0xec, 0x0c, 0xfa, 0xff, 0x3d, 0x65, 0x24, 0x86, 0xce, 0xfa,
0xeb, 0xd2, 0x22, 0x6a, 0x78, 0x48, 0xd6, 0x5b, 0xcf, 0xde, 0x6c, 0x3d, 0xfb, 0x7b, 0xeb, 0xd9,
0x1f, 0x3b, 0xcf, 0xda, 0xec, 0x3c, 0xeb, 0x73, 0xe7, 0x59, 0x2f, 0xd7, 0xf3, 0x54, 0x26, 0xe5,
0x38, 0x9a, 0xf0, 0x65, 0x7c, 0xb0, 0xf2, 0x03, 0x68, 0x56, 0x7a, 0xf4, 0x1d, 0xc6, 0x0d, 0x6d,
0x5c, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0x43, 0x5d, 0xb9, 0x45, 0x2a, 0x02, 0x00, 0x00,
}
func (m *Proof) 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 *Proof) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Aunts) > 0 {
for iNdEx := len(m.Aunts) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Aunts[iNdEx])
copy(dAtA[i:], m.Aunts[iNdEx])
i = encodeVarintProof(dAtA, i, uint64(len(m.Aunts[iNdEx])))
i--
dAtA[i] = 0x22
}
}
if len(m.LeafHash) > 0 {
i -= len(m.LeafHash)
copy(dAtA[i:], m.LeafHash)
i = encodeVarintProof(dAtA, i, uint64(len(m.LeafHash)))
i--
dAtA[i] = 0x1a
}
if m.Index != 0 {
i = encodeVarintProof(dAtA, i, uint64(m.Index))
i--
dAtA[i] = 0x10
}
if m.Total != 0 {
i = encodeVarintProof(dAtA, i, uint64(m.Total))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *ValueOp) 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 *ValueOp) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ValueOp) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Proof != nil {
{
size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintProof(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.Key) > 0 {
i -= len(m.Key)
copy(dAtA[i:], m.Key)
i = encodeVarintProof(dAtA, i, uint64(len(m.Key)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *DominoOp) 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 *DominoOp) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DominoOp) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Output) > 0 {
i -= len(m.Output)
copy(dAtA[i:], m.Output)
i = encodeVarintProof(dAtA, i, uint64(len(m.Output)))
i--
dAtA[i] = 0x1a
}
if len(m.Input) > 0 {
i -= len(m.Input)
copy(dAtA[i:], m.Input)
i = encodeVarintProof(dAtA, i, uint64(len(m.Input)))
i--
dAtA[i] = 0x12
}
if len(m.Key) > 0 {
i -= len(m.Key)
copy(dAtA[i:], m.Key)
i = encodeVarintProof(dAtA, i, uint64(len(m.Key)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *ProofOp) 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 *ProofOp) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ProofOp) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Data) > 0 {
i -= len(m.Data)
copy(dAtA[i:], m.Data)
i = encodeVarintProof(dAtA, i, uint64(len(m.Data)))
i--
dAtA[i] = 0x1a
}
if len(m.Key) > 0 {
i -= len(m.Key)
copy(dAtA[i:], m.Key)
i = encodeVarintProof(dAtA, i, uint64(len(m.Key)))
i--
dAtA[i] = 0x12
}
if len(m.Type) > 0 {
i -= len(m.Type)
copy(dAtA[i:], m.Type)
i = encodeVarintProof(dAtA, i, uint64(len(m.Type)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *ProofOps) 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 *ProofOps) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ProofOps) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Ops) > 0 {
for iNdEx := len(m.Ops) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Ops[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintProof(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintProof(dAtA []byte, offset int, v uint64) int {
offset -= sovProof(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Proof) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Total != 0 {
n += 1 + sovProof(uint64(m.Total))
}
if m.Index != 0 {
n += 1 + sovProof(uint64(m.Index))
}
l = len(m.LeafHash)
if l > 0 {
n += 1 + l + sovProof(uint64(l))
}
if len(m.Aunts) > 0 {
for _, b := range m.Aunts {
l = len(b)
n += 1 + l + sovProof(uint64(l))
}
}
return n
}
func (m *ValueOp) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovProof(uint64(l))
}
if m.Proof != nil {
l = m.Proof.Size()
n += 1 + l + sovProof(uint64(l))
}
return n
}
func (m *DominoOp) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovProof(uint64(l))
}
l = len(m.Input)
if l > 0 {
n += 1 + l + sovProof(uint64(l))
}
l = len(m.Output)
if l > 0 {
n += 1 + l + sovProof(uint64(l))
}
return n
}
func (m *ProofOp) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Type)
if l > 0 {
n += 1 + l + sovProof(uint64(l))
}
l = len(m.Key)
if l > 0 {
n += 1 + l + sovProof(uint64(l))
}
l = len(m.Data)
if l > 0 {
n += 1 + l + sovProof(uint64(l))
}
return n
}
func (m *ProofOps) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Ops) > 0 {
for _, e := range m.Ops {
l = e.Size()
n += 1 + l + sovProof(uint64(l))
}
}
return n
}
func sovProof(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozProof(x uint64) (n int) {
return sovProof(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Proof) 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 ErrIntOverflowProof
}
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: Proof: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
}
m.Total = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Total |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
}
m.Index = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Index |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LeafHash", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthProof
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LeafHash = append(m.LeafHash[:0], dAtA[iNdEx:postIndex]...)
if m.LeafHash == nil {
m.LeafHash = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Aunts", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthProof
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Aunts = append(m.Aunts, make([]byte, postIndex-iNdEx))
copy(m.Aunts[len(m.Aunts)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipProof(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthProof
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ValueOp) 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 ErrIntOverflowProof
}
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: ValueOp: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ValueOp: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthProof
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
if m.Key == nil {
m.Key = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthProof
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Proof == nil {
m.Proof = &Proof{}
}
if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipProof(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthProof
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *DominoOp) 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 ErrIntOverflowProof
}
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: DominoOp: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DominoOp: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
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 ErrInvalidLengthProof
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
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 ErrInvalidLengthProof
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Input = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
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 ErrInvalidLengthProof
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Output = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipProof(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthProof
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ProofOp) 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 ErrIntOverflowProof
}
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: ProofOp: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ProofOp: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
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 ErrInvalidLengthProof
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Type = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthProof
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
if m.Key == nil {
m.Key = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthProof
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
if m.Data == nil {
m.Data = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipProof(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthProof
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ProofOps) 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 ErrIntOverflowProof
}
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: ProofOps: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ProofOps: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ops", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowProof
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthProof
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthProof
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Ops = append(m.Ops, ProofOp{})
if err := m.Ops[len(m.Ops)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipProof(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthProof
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipProof(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, ErrIntOverflowProof
}
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, ErrIntOverflowProof
}
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, ErrIntOverflowProof
}
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, ErrInvalidLengthProof
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupProof
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthProof
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthProof = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowProof = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupProof = fmt.Errorf("proto: unexpected end of group")
)