github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/proto/tendermint/crypto/proof.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/crypto/proof.proto 3 4 package crypto 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 type Proof struct { 27 Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` 28 Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` 29 LeafHash []byte `protobuf:"bytes,3,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"` 30 Aunts [][]byte `protobuf:"bytes,4,rep,name=aunts,proto3" json:"aunts,omitempty"` 31 } 32 33 func (m *Proof) Reset() { *m = Proof{} } 34 func (m *Proof) String() string { return proto.CompactTextString(m) } 35 func (*Proof) ProtoMessage() {} 36 func (*Proof) Descriptor() ([]byte, []int) { 37 return fileDescriptor_6b60b6ba2ab5b856, []int{0} 38 } 39 func (m *Proof) XXX_Unmarshal(b []byte) error { 40 return m.Unmarshal(b) 41 } 42 func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 if deterministic { 44 return xxx_messageInfo_Proof.Marshal(b, m, deterministic) 45 } else { 46 b = b[:cap(b)] 47 n, err := m.MarshalToSizedBuffer(b) 48 if err != nil { 49 return nil, err 50 } 51 return b[:n], nil 52 } 53 } 54 func (m *Proof) XXX_Merge(src proto.Message) { 55 xxx_messageInfo_Proof.Merge(m, src) 56 } 57 func (m *Proof) XXX_Size() int { 58 return m.Size() 59 } 60 func (m *Proof) XXX_DiscardUnknown() { 61 xxx_messageInfo_Proof.DiscardUnknown(m) 62 } 63 64 var xxx_messageInfo_Proof proto.InternalMessageInfo 65 66 func (m *Proof) GetTotal() int64 { 67 if m != nil { 68 return m.Total 69 } 70 return 0 71 } 72 73 func (m *Proof) GetIndex() int64 { 74 if m != nil { 75 return m.Index 76 } 77 return 0 78 } 79 80 func (m *Proof) GetLeafHash() []byte { 81 if m != nil { 82 return m.LeafHash 83 } 84 return nil 85 } 86 87 func (m *Proof) GetAunts() [][]byte { 88 if m != nil { 89 return m.Aunts 90 } 91 return nil 92 } 93 94 type ValueOp struct { 95 // Encoded in ProofOp.Key. 96 Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 97 // To encode in ProofOp.Data 98 Proof *Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` 99 } 100 101 func (m *ValueOp) Reset() { *m = ValueOp{} } 102 func (m *ValueOp) String() string { return proto.CompactTextString(m) } 103 func (*ValueOp) ProtoMessage() {} 104 func (*ValueOp) Descriptor() ([]byte, []int) { 105 return fileDescriptor_6b60b6ba2ab5b856, []int{1} 106 } 107 func (m *ValueOp) XXX_Unmarshal(b []byte) error { 108 return m.Unmarshal(b) 109 } 110 func (m *ValueOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 111 if deterministic { 112 return xxx_messageInfo_ValueOp.Marshal(b, m, deterministic) 113 } else { 114 b = b[:cap(b)] 115 n, err := m.MarshalToSizedBuffer(b) 116 if err != nil { 117 return nil, err 118 } 119 return b[:n], nil 120 } 121 } 122 func (m *ValueOp) XXX_Merge(src proto.Message) { 123 xxx_messageInfo_ValueOp.Merge(m, src) 124 } 125 func (m *ValueOp) XXX_Size() int { 126 return m.Size() 127 } 128 func (m *ValueOp) XXX_DiscardUnknown() { 129 xxx_messageInfo_ValueOp.DiscardUnknown(m) 130 } 131 132 var xxx_messageInfo_ValueOp proto.InternalMessageInfo 133 134 func (m *ValueOp) GetKey() []byte { 135 if m != nil { 136 return m.Key 137 } 138 return nil 139 } 140 141 func (m *ValueOp) GetProof() *Proof { 142 if m != nil { 143 return m.Proof 144 } 145 return nil 146 } 147 148 type DominoOp struct { 149 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 150 Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` 151 Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` 152 } 153 154 func (m *DominoOp) Reset() { *m = DominoOp{} } 155 func (m *DominoOp) String() string { return proto.CompactTextString(m) } 156 func (*DominoOp) ProtoMessage() {} 157 func (*DominoOp) Descriptor() ([]byte, []int) { 158 return fileDescriptor_6b60b6ba2ab5b856, []int{2} 159 } 160 func (m *DominoOp) XXX_Unmarshal(b []byte) error { 161 return m.Unmarshal(b) 162 } 163 func (m *DominoOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 164 if deterministic { 165 return xxx_messageInfo_DominoOp.Marshal(b, m, deterministic) 166 } else { 167 b = b[:cap(b)] 168 n, err := m.MarshalToSizedBuffer(b) 169 if err != nil { 170 return nil, err 171 } 172 return b[:n], nil 173 } 174 } 175 func (m *DominoOp) XXX_Merge(src proto.Message) { 176 xxx_messageInfo_DominoOp.Merge(m, src) 177 } 178 func (m *DominoOp) XXX_Size() int { 179 return m.Size() 180 } 181 func (m *DominoOp) XXX_DiscardUnknown() { 182 xxx_messageInfo_DominoOp.DiscardUnknown(m) 183 } 184 185 var xxx_messageInfo_DominoOp proto.InternalMessageInfo 186 187 func (m *DominoOp) GetKey() string { 188 if m != nil { 189 return m.Key 190 } 191 return "" 192 } 193 194 func (m *DominoOp) GetInput() string { 195 if m != nil { 196 return m.Input 197 } 198 return "" 199 } 200 201 func (m *DominoOp) GetOutput() string { 202 if m != nil { 203 return m.Output 204 } 205 return "" 206 } 207 208 // ProofOp defines an operation used for calculating Merkle root 209 // The data could be arbitrary format, providing nessecary data 210 // for example neighbouring node hash 211 type ProofOp struct { 212 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 213 Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` 214 Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` 215 } 216 217 func (m *ProofOp) Reset() { *m = ProofOp{} } 218 func (m *ProofOp) String() string { return proto.CompactTextString(m) } 219 func (*ProofOp) ProtoMessage() {} 220 func (*ProofOp) Descriptor() ([]byte, []int) { 221 return fileDescriptor_6b60b6ba2ab5b856, []int{3} 222 } 223 func (m *ProofOp) XXX_Unmarshal(b []byte) error { 224 return m.Unmarshal(b) 225 } 226 func (m *ProofOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 227 if deterministic { 228 return xxx_messageInfo_ProofOp.Marshal(b, m, deterministic) 229 } else { 230 b = b[:cap(b)] 231 n, err := m.MarshalToSizedBuffer(b) 232 if err != nil { 233 return nil, err 234 } 235 return b[:n], nil 236 } 237 } 238 func (m *ProofOp) XXX_Merge(src proto.Message) { 239 xxx_messageInfo_ProofOp.Merge(m, src) 240 } 241 func (m *ProofOp) XXX_Size() int { 242 return m.Size() 243 } 244 func (m *ProofOp) XXX_DiscardUnknown() { 245 xxx_messageInfo_ProofOp.DiscardUnknown(m) 246 } 247 248 var xxx_messageInfo_ProofOp proto.InternalMessageInfo 249 250 func (m *ProofOp) GetType() string { 251 if m != nil { 252 return m.Type 253 } 254 return "" 255 } 256 257 func (m *ProofOp) GetKey() []byte { 258 if m != nil { 259 return m.Key 260 } 261 return nil 262 } 263 264 func (m *ProofOp) GetData() []byte { 265 if m != nil { 266 return m.Data 267 } 268 return nil 269 } 270 271 // ProofOps is Merkle proof defined by the list of ProofOps 272 type ProofOps struct { 273 Ops []ProofOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops"` 274 } 275 276 func (m *ProofOps) Reset() { *m = ProofOps{} } 277 func (m *ProofOps) String() string { return proto.CompactTextString(m) } 278 func (*ProofOps) ProtoMessage() {} 279 func (*ProofOps) Descriptor() ([]byte, []int) { 280 return fileDescriptor_6b60b6ba2ab5b856, []int{4} 281 } 282 func (m *ProofOps) XXX_Unmarshal(b []byte) error { 283 return m.Unmarshal(b) 284 } 285 func (m *ProofOps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 286 if deterministic { 287 return xxx_messageInfo_ProofOps.Marshal(b, m, deterministic) 288 } else { 289 b = b[:cap(b)] 290 n, err := m.MarshalToSizedBuffer(b) 291 if err != nil { 292 return nil, err 293 } 294 return b[:n], nil 295 } 296 } 297 func (m *ProofOps) XXX_Merge(src proto.Message) { 298 xxx_messageInfo_ProofOps.Merge(m, src) 299 } 300 func (m *ProofOps) XXX_Size() int { 301 return m.Size() 302 } 303 func (m *ProofOps) XXX_DiscardUnknown() { 304 xxx_messageInfo_ProofOps.DiscardUnknown(m) 305 } 306 307 var xxx_messageInfo_ProofOps proto.InternalMessageInfo 308 309 func (m *ProofOps) GetOps() []ProofOp { 310 if m != nil { 311 return m.Ops 312 } 313 return nil 314 } 315 316 func init() { 317 proto.RegisterType((*Proof)(nil), "seitendermint.crypto.Proof") 318 proto.RegisterType((*ValueOp)(nil), "seitendermint.crypto.ValueOp") 319 proto.RegisterType((*DominoOp)(nil), "seitendermint.crypto.DominoOp") 320 proto.RegisterType((*ProofOp)(nil), "seitendermint.crypto.ProofOp") 321 proto.RegisterType((*ProofOps)(nil), "seitendermint.crypto.ProofOps") 322 } 323 324 func init() { proto.RegisterFile("tendermint/crypto/proof.proto", fileDescriptor_6b60b6ba2ab5b856) } 325 326 var fileDescriptor_6b60b6ba2ab5b856 = []byte{ 327 // 366 bytes of a gzipped FileDescriptorProto 328 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xbf, 0x4f, 0xc2, 0x40, 329 0x18, 0x6d, 0x69, 0xf9, 0x75, 0x30, 0x98, 0x0b, 0x31, 0x8d, 0x84, 0xda, 0x74, 0xea, 0x42, 0x1b, 330 0x31, 0x6e, 0x2e, 0xa2, 0x83, 0x71, 0x10, 0xd3, 0x81, 0xc1, 0xc5, 0x1c, 0x70, 0xd0, 0x46, 0xe8, 331 0x77, 0xe9, 0x5d, 0x13, 0xf9, 0x2f, 0xfc, 0xb3, 0x18, 0x19, 0x9d, 0x8c, 0x81, 0x7f, 0xc4, 0xdc, 332 0x5d, 0x0d, 0x1a, 0x8d, 0xdb, 0x7b, 0xaf, 0xef, 0xde, 0xf7, 0xbe, 0xf4, 0x43, 0x3d, 0x41, 0xb3, 333 0x19, 0xcd, 0x57, 0x69, 0x26, 0xa2, 0x69, 0xbe, 0x66, 0x02, 0x22, 0x96, 0x03, 0xcc, 0x43, 0x96, 334 0x83, 0x00, 0xdc, 0xe1, 0x34, 0x3d, 0x38, 0x42, 0xed, 0x38, 0xe9, 0x2c, 0x60, 0x01, 0xca, 0x10, 335 0x49, 0xa4, 0xbd, 0xfe, 0x1c, 0x55, 0x1f, 0xe4, 0x53, 0xdc, 0x41, 0x55, 0x01, 0x82, 0x2c, 0x1d, 336 0xd3, 0x33, 0x03, 0x2b, 0xd6, 0x44, 0xaa, 0x69, 0x36, 0xa3, 0x2f, 0x4e, 0x45, 0xab, 0x8a, 0xe0, 337 0x2e, 0x6a, 0x2e, 0x29, 0x99, 0x3f, 0x25, 0x84, 0x27, 0x8e, 0xe5, 0x99, 0x41, 0x3b, 0x6e, 0x48, 338 0xe1, 0x96, 0xf0, 0x44, 0x3e, 0x21, 0x45, 0x26, 0xb8, 0x63, 0x7b, 0x56, 0xd0, 0x8e, 0x35, 0xf1, 339 0xef, 0x51, 0x7d, 0x4c, 0x96, 0x05, 0x1d, 0x31, 0x7c, 0x84, 0xac, 0x67, 0xba, 0x56, 0x73, 0xda, 340 0xb1, 0x84, 0xf8, 0x0c, 0x55, 0x55, 0x7f, 0x35, 0xa5, 0x35, 0xe8, 0x86, 0x7f, 0x2d, 0x10, 0xaa, 341 0x9e, 0xb1, 0x76, 0xfa, 0x77, 0xa8, 0x71, 0x03, 0xab, 0x34, 0x83, 0x9f, 0x81, 0x4d, 0x1d, 0xa8, 342 0x6a, 0xb3, 0x42, 0xa8, 0xc0, 0x66, 0xac, 0x09, 0x3e, 0x46, 0x35, 0x28, 0x84, 0x94, 0x2d, 0x25, 343 0x97, 0xcc, 0xbf, 0x46, 0x75, 0x95, 0x3d, 0x62, 0x18, 0x23, 0x5b, 0xac, 0x19, 0x2d, 0xb3, 0x14, 344 0xfe, 0x8a, 0xaf, 0x1c, 0xfa, 0x62, 0x64, 0xcf, 0x88, 0x20, 0xe5, 0xea, 0x0a, 0xfb, 0x57, 0xa8, 345 0x51, 0x86, 0x70, 0x7c, 0x81, 0x2c, 0x60, 0xdc, 0x31, 0x3d, 0x2b, 0x68, 0x0d, 0x7a, 0xff, 0x6c, 346 0x33, 0x62, 0x43, 0x7b, 0xf3, 0x7e, 0x6a, 0xc4, 0xd2, 0x3f, 0x1c, 0x6f, 0x76, 0xae, 0xb9, 0xdd, 347 0xb9, 0xe6, 0xc7, 0xce, 0x35, 0x5f, 0xf7, 0xae, 0xb1, 0xdd, 0xbb, 0xc6, 0xdb, 0xde, 0x35, 0x1e, 348 0x2f, 0x17, 0xa9, 0x48, 0x8a, 0x49, 0x38, 0x85, 0x55, 0x44, 0xf2, 0xb4, 0x4f, 0xb2, 0x69, 0x02, 349 0x79, 0xc4, 0x69, 0xda, 0xff, 0x76, 0x0a, 0xfa, 0xe7, 0xfe, 0xba, 0x8d, 0x49, 0x4d, 0x7d, 0x38, 350 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xc3, 0x21, 0x1d, 0x37, 0x02, 0x00, 0x00, 351 } 352 353 func (m *Proof) Marshal() (dAtA []byte, err error) { 354 size := m.Size() 355 dAtA = make([]byte, size) 356 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 357 if err != nil { 358 return nil, err 359 } 360 return dAtA[:n], nil 361 } 362 363 func (m *Proof) MarshalTo(dAtA []byte) (int, error) { 364 size := m.Size() 365 return m.MarshalToSizedBuffer(dAtA[:size]) 366 } 367 368 func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error) { 369 i := len(dAtA) 370 _ = i 371 var l int 372 _ = l 373 if len(m.Aunts) > 0 { 374 for iNdEx := len(m.Aunts) - 1; iNdEx >= 0; iNdEx-- { 375 i -= len(m.Aunts[iNdEx]) 376 copy(dAtA[i:], m.Aunts[iNdEx]) 377 i = encodeVarintProof(dAtA, i, uint64(len(m.Aunts[iNdEx]))) 378 i-- 379 dAtA[i] = 0x22 380 } 381 } 382 if len(m.LeafHash) > 0 { 383 i -= len(m.LeafHash) 384 copy(dAtA[i:], m.LeafHash) 385 i = encodeVarintProof(dAtA, i, uint64(len(m.LeafHash))) 386 i-- 387 dAtA[i] = 0x1a 388 } 389 if m.Index != 0 { 390 i = encodeVarintProof(dAtA, i, uint64(m.Index)) 391 i-- 392 dAtA[i] = 0x10 393 } 394 if m.Total != 0 { 395 i = encodeVarintProof(dAtA, i, uint64(m.Total)) 396 i-- 397 dAtA[i] = 0x8 398 } 399 return len(dAtA) - i, nil 400 } 401 402 func (m *ValueOp) Marshal() (dAtA []byte, err error) { 403 size := m.Size() 404 dAtA = make([]byte, size) 405 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 406 if err != nil { 407 return nil, err 408 } 409 return dAtA[:n], nil 410 } 411 412 func (m *ValueOp) MarshalTo(dAtA []byte) (int, error) { 413 size := m.Size() 414 return m.MarshalToSizedBuffer(dAtA[:size]) 415 } 416 417 func (m *ValueOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { 418 i := len(dAtA) 419 _ = i 420 var l int 421 _ = l 422 if m.Proof != nil { 423 { 424 size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) 425 if err != nil { 426 return 0, err 427 } 428 i -= size 429 i = encodeVarintProof(dAtA, i, uint64(size)) 430 } 431 i-- 432 dAtA[i] = 0x12 433 } 434 if len(m.Key) > 0 { 435 i -= len(m.Key) 436 copy(dAtA[i:], m.Key) 437 i = encodeVarintProof(dAtA, i, uint64(len(m.Key))) 438 i-- 439 dAtA[i] = 0xa 440 } 441 return len(dAtA) - i, nil 442 } 443 444 func (m *DominoOp) Marshal() (dAtA []byte, err error) { 445 size := m.Size() 446 dAtA = make([]byte, size) 447 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 448 if err != nil { 449 return nil, err 450 } 451 return dAtA[:n], nil 452 } 453 454 func (m *DominoOp) MarshalTo(dAtA []byte) (int, error) { 455 size := m.Size() 456 return m.MarshalToSizedBuffer(dAtA[:size]) 457 } 458 459 func (m *DominoOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { 460 i := len(dAtA) 461 _ = i 462 var l int 463 _ = l 464 if len(m.Output) > 0 { 465 i -= len(m.Output) 466 copy(dAtA[i:], m.Output) 467 i = encodeVarintProof(dAtA, i, uint64(len(m.Output))) 468 i-- 469 dAtA[i] = 0x1a 470 } 471 if len(m.Input) > 0 { 472 i -= len(m.Input) 473 copy(dAtA[i:], m.Input) 474 i = encodeVarintProof(dAtA, i, uint64(len(m.Input))) 475 i-- 476 dAtA[i] = 0x12 477 } 478 if len(m.Key) > 0 { 479 i -= len(m.Key) 480 copy(dAtA[i:], m.Key) 481 i = encodeVarintProof(dAtA, i, uint64(len(m.Key))) 482 i-- 483 dAtA[i] = 0xa 484 } 485 return len(dAtA) - i, nil 486 } 487 488 func (m *ProofOp) Marshal() (dAtA []byte, err error) { 489 size := m.Size() 490 dAtA = make([]byte, size) 491 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 492 if err != nil { 493 return nil, err 494 } 495 return dAtA[:n], nil 496 } 497 498 func (m *ProofOp) MarshalTo(dAtA []byte) (int, error) { 499 size := m.Size() 500 return m.MarshalToSizedBuffer(dAtA[:size]) 501 } 502 503 func (m *ProofOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { 504 i := len(dAtA) 505 _ = i 506 var l int 507 _ = l 508 if len(m.Data) > 0 { 509 i -= len(m.Data) 510 copy(dAtA[i:], m.Data) 511 i = encodeVarintProof(dAtA, i, uint64(len(m.Data))) 512 i-- 513 dAtA[i] = 0x1a 514 } 515 if len(m.Key) > 0 { 516 i -= len(m.Key) 517 copy(dAtA[i:], m.Key) 518 i = encodeVarintProof(dAtA, i, uint64(len(m.Key))) 519 i-- 520 dAtA[i] = 0x12 521 } 522 if len(m.Type) > 0 { 523 i -= len(m.Type) 524 copy(dAtA[i:], m.Type) 525 i = encodeVarintProof(dAtA, i, uint64(len(m.Type))) 526 i-- 527 dAtA[i] = 0xa 528 } 529 return len(dAtA) - i, nil 530 } 531 532 func (m *ProofOps) Marshal() (dAtA []byte, err error) { 533 size := m.Size() 534 dAtA = make([]byte, size) 535 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 536 if err != nil { 537 return nil, err 538 } 539 return dAtA[:n], nil 540 } 541 542 func (m *ProofOps) MarshalTo(dAtA []byte) (int, error) { 543 size := m.Size() 544 return m.MarshalToSizedBuffer(dAtA[:size]) 545 } 546 547 func (m *ProofOps) MarshalToSizedBuffer(dAtA []byte) (int, error) { 548 i := len(dAtA) 549 _ = i 550 var l int 551 _ = l 552 if len(m.Ops) > 0 { 553 for iNdEx := len(m.Ops) - 1; iNdEx >= 0; iNdEx-- { 554 { 555 size, err := m.Ops[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 556 if err != nil { 557 return 0, err 558 } 559 i -= size 560 i = encodeVarintProof(dAtA, i, uint64(size)) 561 } 562 i-- 563 dAtA[i] = 0xa 564 } 565 } 566 return len(dAtA) - i, nil 567 } 568 569 func encodeVarintProof(dAtA []byte, offset int, v uint64) int { 570 offset -= sovProof(v) 571 base := offset 572 for v >= 1<<7 { 573 dAtA[offset] = uint8(v&0x7f | 0x80) 574 v >>= 7 575 offset++ 576 } 577 dAtA[offset] = uint8(v) 578 return base 579 } 580 func (m *Proof) Size() (n int) { 581 if m == nil { 582 return 0 583 } 584 var l int 585 _ = l 586 if m.Total != 0 { 587 n += 1 + sovProof(uint64(m.Total)) 588 } 589 if m.Index != 0 { 590 n += 1 + sovProof(uint64(m.Index)) 591 } 592 l = len(m.LeafHash) 593 if l > 0 { 594 n += 1 + l + sovProof(uint64(l)) 595 } 596 if len(m.Aunts) > 0 { 597 for _, b := range m.Aunts { 598 l = len(b) 599 n += 1 + l + sovProof(uint64(l)) 600 } 601 } 602 return n 603 } 604 605 func (m *ValueOp) Size() (n int) { 606 if m == nil { 607 return 0 608 } 609 var l int 610 _ = l 611 l = len(m.Key) 612 if l > 0 { 613 n += 1 + l + sovProof(uint64(l)) 614 } 615 if m.Proof != nil { 616 l = m.Proof.Size() 617 n += 1 + l + sovProof(uint64(l)) 618 } 619 return n 620 } 621 622 func (m *DominoOp) Size() (n int) { 623 if m == nil { 624 return 0 625 } 626 var l int 627 _ = l 628 l = len(m.Key) 629 if l > 0 { 630 n += 1 + l + sovProof(uint64(l)) 631 } 632 l = len(m.Input) 633 if l > 0 { 634 n += 1 + l + sovProof(uint64(l)) 635 } 636 l = len(m.Output) 637 if l > 0 { 638 n += 1 + l + sovProof(uint64(l)) 639 } 640 return n 641 } 642 643 func (m *ProofOp) Size() (n int) { 644 if m == nil { 645 return 0 646 } 647 var l int 648 _ = l 649 l = len(m.Type) 650 if l > 0 { 651 n += 1 + l + sovProof(uint64(l)) 652 } 653 l = len(m.Key) 654 if l > 0 { 655 n += 1 + l + sovProof(uint64(l)) 656 } 657 l = len(m.Data) 658 if l > 0 { 659 n += 1 + l + sovProof(uint64(l)) 660 } 661 return n 662 } 663 664 func (m *ProofOps) Size() (n int) { 665 if m == nil { 666 return 0 667 } 668 var l int 669 _ = l 670 if len(m.Ops) > 0 { 671 for _, e := range m.Ops { 672 l = e.Size() 673 n += 1 + l + sovProof(uint64(l)) 674 } 675 } 676 return n 677 } 678 679 func sovProof(x uint64) (n int) { 680 return (math_bits.Len64(x|1) + 6) / 7 681 } 682 func sozProof(x uint64) (n int) { 683 return sovProof(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 684 } 685 func (m *Proof) Unmarshal(dAtA []byte) error { 686 l := len(dAtA) 687 iNdEx := 0 688 for iNdEx < l { 689 preIndex := iNdEx 690 var wire uint64 691 for shift := uint(0); ; shift += 7 { 692 if shift >= 64 { 693 return ErrIntOverflowProof 694 } 695 if iNdEx >= l { 696 return io.ErrUnexpectedEOF 697 } 698 b := dAtA[iNdEx] 699 iNdEx++ 700 wire |= uint64(b&0x7F) << shift 701 if b < 0x80 { 702 break 703 } 704 } 705 fieldNum := int32(wire >> 3) 706 wireType := int(wire & 0x7) 707 if wireType == 4 { 708 return fmt.Errorf("proto: Proof: wiretype end group for non-group") 709 } 710 if fieldNum <= 0 { 711 return fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire) 712 } 713 switch fieldNum { 714 case 1: 715 if wireType != 0 { 716 return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) 717 } 718 m.Total = 0 719 for shift := uint(0); ; shift += 7 { 720 if shift >= 64 { 721 return ErrIntOverflowProof 722 } 723 if iNdEx >= l { 724 return io.ErrUnexpectedEOF 725 } 726 b := dAtA[iNdEx] 727 iNdEx++ 728 m.Total |= int64(b&0x7F) << shift 729 if b < 0x80 { 730 break 731 } 732 } 733 case 2: 734 if wireType != 0 { 735 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 736 } 737 m.Index = 0 738 for shift := uint(0); ; shift += 7 { 739 if shift >= 64 { 740 return ErrIntOverflowProof 741 } 742 if iNdEx >= l { 743 return io.ErrUnexpectedEOF 744 } 745 b := dAtA[iNdEx] 746 iNdEx++ 747 m.Index |= int64(b&0x7F) << shift 748 if b < 0x80 { 749 break 750 } 751 } 752 case 3: 753 if wireType != 2 { 754 return fmt.Errorf("proto: wrong wireType = %d for field LeafHash", wireType) 755 } 756 var byteLen int 757 for shift := uint(0); ; shift += 7 { 758 if shift >= 64 { 759 return ErrIntOverflowProof 760 } 761 if iNdEx >= l { 762 return io.ErrUnexpectedEOF 763 } 764 b := dAtA[iNdEx] 765 iNdEx++ 766 byteLen |= int(b&0x7F) << shift 767 if b < 0x80 { 768 break 769 } 770 } 771 if byteLen < 0 { 772 return ErrInvalidLengthProof 773 } 774 postIndex := iNdEx + byteLen 775 if postIndex < 0 { 776 return ErrInvalidLengthProof 777 } 778 if postIndex > l { 779 return io.ErrUnexpectedEOF 780 } 781 m.LeafHash = append(m.LeafHash[:0], dAtA[iNdEx:postIndex]...) 782 if m.LeafHash == nil { 783 m.LeafHash = []byte{} 784 } 785 iNdEx = postIndex 786 case 4: 787 if wireType != 2 { 788 return fmt.Errorf("proto: wrong wireType = %d for field Aunts", wireType) 789 } 790 var byteLen int 791 for shift := uint(0); ; shift += 7 { 792 if shift >= 64 { 793 return ErrIntOverflowProof 794 } 795 if iNdEx >= l { 796 return io.ErrUnexpectedEOF 797 } 798 b := dAtA[iNdEx] 799 iNdEx++ 800 byteLen |= int(b&0x7F) << shift 801 if b < 0x80 { 802 break 803 } 804 } 805 if byteLen < 0 { 806 return ErrInvalidLengthProof 807 } 808 postIndex := iNdEx + byteLen 809 if postIndex < 0 { 810 return ErrInvalidLengthProof 811 } 812 if postIndex > l { 813 return io.ErrUnexpectedEOF 814 } 815 m.Aunts = append(m.Aunts, make([]byte, postIndex-iNdEx)) 816 copy(m.Aunts[len(m.Aunts)-1], dAtA[iNdEx:postIndex]) 817 iNdEx = postIndex 818 default: 819 iNdEx = preIndex 820 skippy, err := skipProof(dAtA[iNdEx:]) 821 if err != nil { 822 return err 823 } 824 if (skippy < 0) || (iNdEx+skippy) < 0 { 825 return ErrInvalidLengthProof 826 } 827 if (iNdEx + skippy) > l { 828 return io.ErrUnexpectedEOF 829 } 830 iNdEx += skippy 831 } 832 } 833 834 if iNdEx > l { 835 return io.ErrUnexpectedEOF 836 } 837 return nil 838 } 839 func (m *ValueOp) Unmarshal(dAtA []byte) error { 840 l := len(dAtA) 841 iNdEx := 0 842 for iNdEx < l { 843 preIndex := iNdEx 844 var wire uint64 845 for shift := uint(0); ; shift += 7 { 846 if shift >= 64 { 847 return ErrIntOverflowProof 848 } 849 if iNdEx >= l { 850 return io.ErrUnexpectedEOF 851 } 852 b := dAtA[iNdEx] 853 iNdEx++ 854 wire |= uint64(b&0x7F) << shift 855 if b < 0x80 { 856 break 857 } 858 } 859 fieldNum := int32(wire >> 3) 860 wireType := int(wire & 0x7) 861 if wireType == 4 { 862 return fmt.Errorf("proto: ValueOp: wiretype end group for non-group") 863 } 864 if fieldNum <= 0 { 865 return fmt.Errorf("proto: ValueOp: illegal tag %d (wire type %d)", fieldNum, wire) 866 } 867 switch fieldNum { 868 case 1: 869 if wireType != 2 { 870 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 871 } 872 var byteLen int 873 for shift := uint(0); ; shift += 7 { 874 if shift >= 64 { 875 return ErrIntOverflowProof 876 } 877 if iNdEx >= l { 878 return io.ErrUnexpectedEOF 879 } 880 b := dAtA[iNdEx] 881 iNdEx++ 882 byteLen |= int(b&0x7F) << shift 883 if b < 0x80 { 884 break 885 } 886 } 887 if byteLen < 0 { 888 return ErrInvalidLengthProof 889 } 890 postIndex := iNdEx + byteLen 891 if postIndex < 0 { 892 return ErrInvalidLengthProof 893 } 894 if postIndex > l { 895 return io.ErrUnexpectedEOF 896 } 897 m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) 898 if m.Key == nil { 899 m.Key = []byte{} 900 } 901 iNdEx = postIndex 902 case 2: 903 if wireType != 2 { 904 return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) 905 } 906 var msglen int 907 for shift := uint(0); ; shift += 7 { 908 if shift >= 64 { 909 return ErrIntOverflowProof 910 } 911 if iNdEx >= l { 912 return io.ErrUnexpectedEOF 913 } 914 b := dAtA[iNdEx] 915 iNdEx++ 916 msglen |= int(b&0x7F) << shift 917 if b < 0x80 { 918 break 919 } 920 } 921 if msglen < 0 { 922 return ErrInvalidLengthProof 923 } 924 postIndex := iNdEx + msglen 925 if postIndex < 0 { 926 return ErrInvalidLengthProof 927 } 928 if postIndex > l { 929 return io.ErrUnexpectedEOF 930 } 931 if m.Proof == nil { 932 m.Proof = &Proof{} 933 } 934 if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 935 return err 936 } 937 iNdEx = postIndex 938 default: 939 iNdEx = preIndex 940 skippy, err := skipProof(dAtA[iNdEx:]) 941 if err != nil { 942 return err 943 } 944 if (skippy < 0) || (iNdEx+skippy) < 0 { 945 return ErrInvalidLengthProof 946 } 947 if (iNdEx + skippy) > l { 948 return io.ErrUnexpectedEOF 949 } 950 iNdEx += skippy 951 } 952 } 953 954 if iNdEx > l { 955 return io.ErrUnexpectedEOF 956 } 957 return nil 958 } 959 func (m *DominoOp) Unmarshal(dAtA []byte) error { 960 l := len(dAtA) 961 iNdEx := 0 962 for iNdEx < l { 963 preIndex := iNdEx 964 var wire uint64 965 for shift := uint(0); ; shift += 7 { 966 if shift >= 64 { 967 return ErrIntOverflowProof 968 } 969 if iNdEx >= l { 970 return io.ErrUnexpectedEOF 971 } 972 b := dAtA[iNdEx] 973 iNdEx++ 974 wire |= uint64(b&0x7F) << shift 975 if b < 0x80 { 976 break 977 } 978 } 979 fieldNum := int32(wire >> 3) 980 wireType := int(wire & 0x7) 981 if wireType == 4 { 982 return fmt.Errorf("proto: DominoOp: wiretype end group for non-group") 983 } 984 if fieldNum <= 0 { 985 return fmt.Errorf("proto: DominoOp: illegal tag %d (wire type %d)", fieldNum, wire) 986 } 987 switch fieldNum { 988 case 1: 989 if wireType != 2 { 990 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 991 } 992 var stringLen uint64 993 for shift := uint(0); ; shift += 7 { 994 if shift >= 64 { 995 return ErrIntOverflowProof 996 } 997 if iNdEx >= l { 998 return io.ErrUnexpectedEOF 999 } 1000 b := dAtA[iNdEx] 1001 iNdEx++ 1002 stringLen |= uint64(b&0x7F) << shift 1003 if b < 0x80 { 1004 break 1005 } 1006 } 1007 intStringLen := int(stringLen) 1008 if intStringLen < 0 { 1009 return ErrInvalidLengthProof 1010 } 1011 postIndex := iNdEx + intStringLen 1012 if postIndex < 0 { 1013 return ErrInvalidLengthProof 1014 } 1015 if postIndex > l { 1016 return io.ErrUnexpectedEOF 1017 } 1018 m.Key = string(dAtA[iNdEx:postIndex]) 1019 iNdEx = postIndex 1020 case 2: 1021 if wireType != 2 { 1022 return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType) 1023 } 1024 var stringLen uint64 1025 for shift := uint(0); ; shift += 7 { 1026 if shift >= 64 { 1027 return ErrIntOverflowProof 1028 } 1029 if iNdEx >= l { 1030 return io.ErrUnexpectedEOF 1031 } 1032 b := dAtA[iNdEx] 1033 iNdEx++ 1034 stringLen |= uint64(b&0x7F) << shift 1035 if b < 0x80 { 1036 break 1037 } 1038 } 1039 intStringLen := int(stringLen) 1040 if intStringLen < 0 { 1041 return ErrInvalidLengthProof 1042 } 1043 postIndex := iNdEx + intStringLen 1044 if postIndex < 0 { 1045 return ErrInvalidLengthProof 1046 } 1047 if postIndex > l { 1048 return io.ErrUnexpectedEOF 1049 } 1050 m.Input = string(dAtA[iNdEx:postIndex]) 1051 iNdEx = postIndex 1052 case 3: 1053 if wireType != 2 { 1054 return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) 1055 } 1056 var stringLen uint64 1057 for shift := uint(0); ; shift += 7 { 1058 if shift >= 64 { 1059 return ErrIntOverflowProof 1060 } 1061 if iNdEx >= l { 1062 return io.ErrUnexpectedEOF 1063 } 1064 b := dAtA[iNdEx] 1065 iNdEx++ 1066 stringLen |= uint64(b&0x7F) << shift 1067 if b < 0x80 { 1068 break 1069 } 1070 } 1071 intStringLen := int(stringLen) 1072 if intStringLen < 0 { 1073 return ErrInvalidLengthProof 1074 } 1075 postIndex := iNdEx + intStringLen 1076 if postIndex < 0 { 1077 return ErrInvalidLengthProof 1078 } 1079 if postIndex > l { 1080 return io.ErrUnexpectedEOF 1081 } 1082 m.Output = string(dAtA[iNdEx:postIndex]) 1083 iNdEx = postIndex 1084 default: 1085 iNdEx = preIndex 1086 skippy, err := skipProof(dAtA[iNdEx:]) 1087 if err != nil { 1088 return err 1089 } 1090 if (skippy < 0) || (iNdEx+skippy) < 0 { 1091 return ErrInvalidLengthProof 1092 } 1093 if (iNdEx + skippy) > l { 1094 return io.ErrUnexpectedEOF 1095 } 1096 iNdEx += skippy 1097 } 1098 } 1099 1100 if iNdEx > l { 1101 return io.ErrUnexpectedEOF 1102 } 1103 return nil 1104 } 1105 func (m *ProofOp) Unmarshal(dAtA []byte) error { 1106 l := len(dAtA) 1107 iNdEx := 0 1108 for iNdEx < l { 1109 preIndex := iNdEx 1110 var wire uint64 1111 for shift := uint(0); ; shift += 7 { 1112 if shift >= 64 { 1113 return ErrIntOverflowProof 1114 } 1115 if iNdEx >= l { 1116 return io.ErrUnexpectedEOF 1117 } 1118 b := dAtA[iNdEx] 1119 iNdEx++ 1120 wire |= uint64(b&0x7F) << shift 1121 if b < 0x80 { 1122 break 1123 } 1124 } 1125 fieldNum := int32(wire >> 3) 1126 wireType := int(wire & 0x7) 1127 if wireType == 4 { 1128 return fmt.Errorf("proto: ProofOp: wiretype end group for non-group") 1129 } 1130 if fieldNum <= 0 { 1131 return fmt.Errorf("proto: ProofOp: illegal tag %d (wire type %d)", fieldNum, wire) 1132 } 1133 switch fieldNum { 1134 case 1: 1135 if wireType != 2 { 1136 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 1137 } 1138 var stringLen uint64 1139 for shift := uint(0); ; shift += 7 { 1140 if shift >= 64 { 1141 return ErrIntOverflowProof 1142 } 1143 if iNdEx >= l { 1144 return io.ErrUnexpectedEOF 1145 } 1146 b := dAtA[iNdEx] 1147 iNdEx++ 1148 stringLen |= uint64(b&0x7F) << shift 1149 if b < 0x80 { 1150 break 1151 } 1152 } 1153 intStringLen := int(stringLen) 1154 if intStringLen < 0 { 1155 return ErrInvalidLengthProof 1156 } 1157 postIndex := iNdEx + intStringLen 1158 if postIndex < 0 { 1159 return ErrInvalidLengthProof 1160 } 1161 if postIndex > l { 1162 return io.ErrUnexpectedEOF 1163 } 1164 m.Type = string(dAtA[iNdEx:postIndex]) 1165 iNdEx = postIndex 1166 case 2: 1167 if wireType != 2 { 1168 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 1169 } 1170 var byteLen int 1171 for shift := uint(0); ; shift += 7 { 1172 if shift >= 64 { 1173 return ErrIntOverflowProof 1174 } 1175 if iNdEx >= l { 1176 return io.ErrUnexpectedEOF 1177 } 1178 b := dAtA[iNdEx] 1179 iNdEx++ 1180 byteLen |= int(b&0x7F) << shift 1181 if b < 0x80 { 1182 break 1183 } 1184 } 1185 if byteLen < 0 { 1186 return ErrInvalidLengthProof 1187 } 1188 postIndex := iNdEx + byteLen 1189 if postIndex < 0 { 1190 return ErrInvalidLengthProof 1191 } 1192 if postIndex > l { 1193 return io.ErrUnexpectedEOF 1194 } 1195 m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) 1196 if m.Key == nil { 1197 m.Key = []byte{} 1198 } 1199 iNdEx = postIndex 1200 case 3: 1201 if wireType != 2 { 1202 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 1203 } 1204 var byteLen int 1205 for shift := uint(0); ; shift += 7 { 1206 if shift >= 64 { 1207 return ErrIntOverflowProof 1208 } 1209 if iNdEx >= l { 1210 return io.ErrUnexpectedEOF 1211 } 1212 b := dAtA[iNdEx] 1213 iNdEx++ 1214 byteLen |= int(b&0x7F) << shift 1215 if b < 0x80 { 1216 break 1217 } 1218 } 1219 if byteLen < 0 { 1220 return ErrInvalidLengthProof 1221 } 1222 postIndex := iNdEx + byteLen 1223 if postIndex < 0 { 1224 return ErrInvalidLengthProof 1225 } 1226 if postIndex > l { 1227 return io.ErrUnexpectedEOF 1228 } 1229 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 1230 if m.Data == nil { 1231 m.Data = []byte{} 1232 } 1233 iNdEx = postIndex 1234 default: 1235 iNdEx = preIndex 1236 skippy, err := skipProof(dAtA[iNdEx:]) 1237 if err != nil { 1238 return err 1239 } 1240 if (skippy < 0) || (iNdEx+skippy) < 0 { 1241 return ErrInvalidLengthProof 1242 } 1243 if (iNdEx + skippy) > l { 1244 return io.ErrUnexpectedEOF 1245 } 1246 iNdEx += skippy 1247 } 1248 } 1249 1250 if iNdEx > l { 1251 return io.ErrUnexpectedEOF 1252 } 1253 return nil 1254 } 1255 func (m *ProofOps) Unmarshal(dAtA []byte) error { 1256 l := len(dAtA) 1257 iNdEx := 0 1258 for iNdEx < l { 1259 preIndex := iNdEx 1260 var wire uint64 1261 for shift := uint(0); ; shift += 7 { 1262 if shift >= 64 { 1263 return ErrIntOverflowProof 1264 } 1265 if iNdEx >= l { 1266 return io.ErrUnexpectedEOF 1267 } 1268 b := dAtA[iNdEx] 1269 iNdEx++ 1270 wire |= uint64(b&0x7F) << shift 1271 if b < 0x80 { 1272 break 1273 } 1274 } 1275 fieldNum := int32(wire >> 3) 1276 wireType := int(wire & 0x7) 1277 if wireType == 4 { 1278 return fmt.Errorf("proto: ProofOps: wiretype end group for non-group") 1279 } 1280 if fieldNum <= 0 { 1281 return fmt.Errorf("proto: ProofOps: illegal tag %d (wire type %d)", fieldNum, wire) 1282 } 1283 switch fieldNum { 1284 case 1: 1285 if wireType != 2 { 1286 return fmt.Errorf("proto: wrong wireType = %d for field Ops", wireType) 1287 } 1288 var msglen int 1289 for shift := uint(0); ; shift += 7 { 1290 if shift >= 64 { 1291 return ErrIntOverflowProof 1292 } 1293 if iNdEx >= l { 1294 return io.ErrUnexpectedEOF 1295 } 1296 b := dAtA[iNdEx] 1297 iNdEx++ 1298 msglen |= int(b&0x7F) << shift 1299 if b < 0x80 { 1300 break 1301 } 1302 } 1303 if msglen < 0 { 1304 return ErrInvalidLengthProof 1305 } 1306 postIndex := iNdEx + msglen 1307 if postIndex < 0 { 1308 return ErrInvalidLengthProof 1309 } 1310 if postIndex > l { 1311 return io.ErrUnexpectedEOF 1312 } 1313 m.Ops = append(m.Ops, ProofOp{}) 1314 if err := m.Ops[len(m.Ops)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1315 return err 1316 } 1317 iNdEx = postIndex 1318 default: 1319 iNdEx = preIndex 1320 skippy, err := skipProof(dAtA[iNdEx:]) 1321 if err != nil { 1322 return err 1323 } 1324 if (skippy < 0) || (iNdEx+skippy) < 0 { 1325 return ErrInvalidLengthProof 1326 } 1327 if (iNdEx + skippy) > l { 1328 return io.ErrUnexpectedEOF 1329 } 1330 iNdEx += skippy 1331 } 1332 } 1333 1334 if iNdEx > l { 1335 return io.ErrUnexpectedEOF 1336 } 1337 return nil 1338 } 1339 func skipProof(dAtA []byte) (n int, err error) { 1340 l := len(dAtA) 1341 iNdEx := 0 1342 depth := 0 1343 for iNdEx < l { 1344 var wire uint64 1345 for shift := uint(0); ; shift += 7 { 1346 if shift >= 64 { 1347 return 0, ErrIntOverflowProof 1348 } 1349 if iNdEx >= l { 1350 return 0, io.ErrUnexpectedEOF 1351 } 1352 b := dAtA[iNdEx] 1353 iNdEx++ 1354 wire |= (uint64(b) & 0x7F) << shift 1355 if b < 0x80 { 1356 break 1357 } 1358 } 1359 wireType := int(wire & 0x7) 1360 switch wireType { 1361 case 0: 1362 for shift := uint(0); ; shift += 7 { 1363 if shift >= 64 { 1364 return 0, ErrIntOverflowProof 1365 } 1366 if iNdEx >= l { 1367 return 0, io.ErrUnexpectedEOF 1368 } 1369 iNdEx++ 1370 if dAtA[iNdEx-1] < 0x80 { 1371 break 1372 } 1373 } 1374 case 1: 1375 iNdEx += 8 1376 case 2: 1377 var length int 1378 for shift := uint(0); ; shift += 7 { 1379 if shift >= 64 { 1380 return 0, ErrIntOverflowProof 1381 } 1382 if iNdEx >= l { 1383 return 0, io.ErrUnexpectedEOF 1384 } 1385 b := dAtA[iNdEx] 1386 iNdEx++ 1387 length |= (int(b) & 0x7F) << shift 1388 if b < 0x80 { 1389 break 1390 } 1391 } 1392 if length < 0 { 1393 return 0, ErrInvalidLengthProof 1394 } 1395 iNdEx += length 1396 case 3: 1397 depth++ 1398 case 4: 1399 if depth == 0 { 1400 return 0, ErrUnexpectedEndOfGroupProof 1401 } 1402 depth-- 1403 case 5: 1404 iNdEx += 4 1405 default: 1406 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1407 } 1408 if iNdEx < 0 { 1409 return 0, ErrInvalidLengthProof 1410 } 1411 if depth == 0 { 1412 return iNdEx, nil 1413 } 1414 } 1415 return 0, io.ErrUnexpectedEOF 1416 } 1417 1418 var ( 1419 ErrInvalidLengthProof = fmt.Errorf("proto: negative length found during unmarshaling") 1420 ErrIntOverflowProof = fmt.Errorf("proto: integer overflow") 1421 ErrUnexpectedEndOfGroupProof = fmt.Errorf("proto: unexpected end of group") 1422 )