github.com/ZihuaZhang/fabric-protos-go@v1.0.7/ledger/rwset/kvrwset/kv_rwset.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: ledger/rwset/kvrwset/kv_rwset.proto 3 4 package kvrwset 5 6 import ( 7 fmt "fmt" 8 proto "github.com/golang/protobuf/proto" 9 math "math" 10 ) 11 12 // Reference imports to suppress errors if they are not otherwise used. 13 var _ = proto.Marshal 14 var _ = fmt.Errorf 15 var _ = math.Inf 16 17 // This is a compile-time assertion to ensure that this generated file 18 // is compatible with the proto package it is being compiled against. 19 // A compilation error at this line likely means your copy of the 20 // proto package needs to be updated. 21 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 22 23 // KVRWSet encapsulates the read-write set for a chaincode that operates upon a KV or Document data model 24 // This structure is used for both the public data and the private data 25 type KVRWSet struct { 26 Reads []*KVRead `protobuf:"bytes,1,rep,name=reads,proto3" json:"reads,omitempty"` 27 RangeQueriesInfo []*RangeQueryInfo `protobuf:"bytes,2,rep,name=range_queries_info,json=rangeQueriesInfo,proto3" json:"range_queries_info,omitempty"` 28 Writes []*KVWrite `protobuf:"bytes,3,rep,name=writes,proto3" json:"writes,omitempty"` 29 MetadataWrites []*KVMetadataWrite `protobuf:"bytes,4,rep,name=metadata_writes,json=metadataWrites,proto3" json:"metadata_writes,omitempty"` 30 XXX_NoUnkeyedLiteral struct{} `json:"-"` 31 XXX_unrecognized []byte `json:"-"` 32 XXX_sizecache int32 `json:"-"` 33 } 34 35 func (m *KVRWSet) Reset() { *m = KVRWSet{} } 36 func (m *KVRWSet) String() string { return proto.CompactTextString(m) } 37 func (*KVRWSet) ProtoMessage() {} 38 func (*KVRWSet) Descriptor() ([]byte, []int) { 39 return fileDescriptor_ee5d686eab23a142, []int{0} 40 } 41 42 func (m *KVRWSet) XXX_Unmarshal(b []byte) error { 43 return xxx_messageInfo_KVRWSet.Unmarshal(m, b) 44 } 45 func (m *KVRWSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 46 return xxx_messageInfo_KVRWSet.Marshal(b, m, deterministic) 47 } 48 func (m *KVRWSet) XXX_Merge(src proto.Message) { 49 xxx_messageInfo_KVRWSet.Merge(m, src) 50 } 51 func (m *KVRWSet) XXX_Size() int { 52 return xxx_messageInfo_KVRWSet.Size(m) 53 } 54 func (m *KVRWSet) XXX_DiscardUnknown() { 55 xxx_messageInfo_KVRWSet.DiscardUnknown(m) 56 } 57 58 var xxx_messageInfo_KVRWSet proto.InternalMessageInfo 59 60 func (m *KVRWSet) GetReads() []*KVRead { 61 if m != nil { 62 return m.Reads 63 } 64 return nil 65 } 66 67 func (m *KVRWSet) GetRangeQueriesInfo() []*RangeQueryInfo { 68 if m != nil { 69 return m.RangeQueriesInfo 70 } 71 return nil 72 } 73 74 func (m *KVRWSet) GetWrites() []*KVWrite { 75 if m != nil { 76 return m.Writes 77 } 78 return nil 79 } 80 81 func (m *KVRWSet) GetMetadataWrites() []*KVMetadataWrite { 82 if m != nil { 83 return m.MetadataWrites 84 } 85 return nil 86 } 87 88 // HashedRWSet encapsulates hashed representation of a private read-write set for KV or Document data model 89 type HashedRWSet struct { 90 HashedReads []*KVReadHash `protobuf:"bytes,1,rep,name=hashed_reads,json=hashedReads,proto3" json:"hashed_reads,omitempty"` 91 HashedWrites []*KVWriteHash `protobuf:"bytes,2,rep,name=hashed_writes,json=hashedWrites,proto3" json:"hashed_writes,omitempty"` 92 MetadataWrites []*KVMetadataWriteHash `protobuf:"bytes,3,rep,name=metadata_writes,json=metadataWrites,proto3" json:"metadata_writes,omitempty"` 93 XXX_NoUnkeyedLiteral struct{} `json:"-"` 94 XXX_unrecognized []byte `json:"-"` 95 XXX_sizecache int32 `json:"-"` 96 } 97 98 func (m *HashedRWSet) Reset() { *m = HashedRWSet{} } 99 func (m *HashedRWSet) String() string { return proto.CompactTextString(m) } 100 func (*HashedRWSet) ProtoMessage() {} 101 func (*HashedRWSet) Descriptor() ([]byte, []int) { 102 return fileDescriptor_ee5d686eab23a142, []int{1} 103 } 104 105 func (m *HashedRWSet) XXX_Unmarshal(b []byte) error { 106 return xxx_messageInfo_HashedRWSet.Unmarshal(m, b) 107 } 108 func (m *HashedRWSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 109 return xxx_messageInfo_HashedRWSet.Marshal(b, m, deterministic) 110 } 111 func (m *HashedRWSet) XXX_Merge(src proto.Message) { 112 xxx_messageInfo_HashedRWSet.Merge(m, src) 113 } 114 func (m *HashedRWSet) XXX_Size() int { 115 return xxx_messageInfo_HashedRWSet.Size(m) 116 } 117 func (m *HashedRWSet) XXX_DiscardUnknown() { 118 xxx_messageInfo_HashedRWSet.DiscardUnknown(m) 119 } 120 121 var xxx_messageInfo_HashedRWSet proto.InternalMessageInfo 122 123 func (m *HashedRWSet) GetHashedReads() []*KVReadHash { 124 if m != nil { 125 return m.HashedReads 126 } 127 return nil 128 } 129 130 func (m *HashedRWSet) GetHashedWrites() []*KVWriteHash { 131 if m != nil { 132 return m.HashedWrites 133 } 134 return nil 135 } 136 137 func (m *HashedRWSet) GetMetadataWrites() []*KVMetadataWriteHash { 138 if m != nil { 139 return m.MetadataWrites 140 } 141 return nil 142 } 143 144 // KVRead captures a read operation performed during transaction simulation 145 // A 'nil' version indicates a non-existing key read by the transaction 146 type KVRead struct { 147 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 148 Version *Version `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` 149 XXX_NoUnkeyedLiteral struct{} `json:"-"` 150 XXX_unrecognized []byte `json:"-"` 151 XXX_sizecache int32 `json:"-"` 152 } 153 154 func (m *KVRead) Reset() { *m = KVRead{} } 155 func (m *KVRead) String() string { return proto.CompactTextString(m) } 156 func (*KVRead) ProtoMessage() {} 157 func (*KVRead) Descriptor() ([]byte, []int) { 158 return fileDescriptor_ee5d686eab23a142, []int{2} 159 } 160 161 func (m *KVRead) XXX_Unmarshal(b []byte) error { 162 return xxx_messageInfo_KVRead.Unmarshal(m, b) 163 } 164 func (m *KVRead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 165 return xxx_messageInfo_KVRead.Marshal(b, m, deterministic) 166 } 167 func (m *KVRead) XXX_Merge(src proto.Message) { 168 xxx_messageInfo_KVRead.Merge(m, src) 169 } 170 func (m *KVRead) XXX_Size() int { 171 return xxx_messageInfo_KVRead.Size(m) 172 } 173 func (m *KVRead) XXX_DiscardUnknown() { 174 xxx_messageInfo_KVRead.DiscardUnknown(m) 175 } 176 177 var xxx_messageInfo_KVRead proto.InternalMessageInfo 178 179 func (m *KVRead) GetKey() string { 180 if m != nil { 181 return m.Key 182 } 183 return "" 184 } 185 186 func (m *KVRead) GetVersion() *Version { 187 if m != nil { 188 return m.Version 189 } 190 return nil 191 } 192 193 // KVWrite captures a write (update/delete) operation performed during transaction simulation 194 type KVWrite struct { 195 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 196 IsDelete bool `protobuf:"varint,2,opt,name=is_delete,json=isDelete,proto3" json:"is_delete,omitempty"` 197 Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` 198 XXX_NoUnkeyedLiteral struct{} `json:"-"` 199 XXX_unrecognized []byte `json:"-"` 200 XXX_sizecache int32 `json:"-"` 201 } 202 203 func (m *KVWrite) Reset() { *m = KVWrite{} } 204 func (m *KVWrite) String() string { return proto.CompactTextString(m) } 205 func (*KVWrite) ProtoMessage() {} 206 func (*KVWrite) Descriptor() ([]byte, []int) { 207 return fileDescriptor_ee5d686eab23a142, []int{3} 208 } 209 210 func (m *KVWrite) XXX_Unmarshal(b []byte) error { 211 return xxx_messageInfo_KVWrite.Unmarshal(m, b) 212 } 213 func (m *KVWrite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 214 return xxx_messageInfo_KVWrite.Marshal(b, m, deterministic) 215 } 216 func (m *KVWrite) XXX_Merge(src proto.Message) { 217 xxx_messageInfo_KVWrite.Merge(m, src) 218 } 219 func (m *KVWrite) XXX_Size() int { 220 return xxx_messageInfo_KVWrite.Size(m) 221 } 222 func (m *KVWrite) XXX_DiscardUnknown() { 223 xxx_messageInfo_KVWrite.DiscardUnknown(m) 224 } 225 226 var xxx_messageInfo_KVWrite proto.InternalMessageInfo 227 228 func (m *KVWrite) GetKey() string { 229 if m != nil { 230 return m.Key 231 } 232 return "" 233 } 234 235 func (m *KVWrite) GetIsDelete() bool { 236 if m != nil { 237 return m.IsDelete 238 } 239 return false 240 } 241 242 func (m *KVWrite) GetValue() []byte { 243 if m != nil { 244 return m.Value 245 } 246 return nil 247 } 248 249 // KVMetadataWrite captures all the entries in the metadata associated with a key 250 type KVMetadataWrite struct { 251 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 252 Entries []*KVMetadataEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"` 253 XXX_NoUnkeyedLiteral struct{} `json:"-"` 254 XXX_unrecognized []byte `json:"-"` 255 XXX_sizecache int32 `json:"-"` 256 } 257 258 func (m *KVMetadataWrite) Reset() { *m = KVMetadataWrite{} } 259 func (m *KVMetadataWrite) String() string { return proto.CompactTextString(m) } 260 func (*KVMetadataWrite) ProtoMessage() {} 261 func (*KVMetadataWrite) Descriptor() ([]byte, []int) { 262 return fileDescriptor_ee5d686eab23a142, []int{4} 263 } 264 265 func (m *KVMetadataWrite) XXX_Unmarshal(b []byte) error { 266 return xxx_messageInfo_KVMetadataWrite.Unmarshal(m, b) 267 } 268 func (m *KVMetadataWrite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 269 return xxx_messageInfo_KVMetadataWrite.Marshal(b, m, deterministic) 270 } 271 func (m *KVMetadataWrite) XXX_Merge(src proto.Message) { 272 xxx_messageInfo_KVMetadataWrite.Merge(m, src) 273 } 274 func (m *KVMetadataWrite) XXX_Size() int { 275 return xxx_messageInfo_KVMetadataWrite.Size(m) 276 } 277 func (m *KVMetadataWrite) XXX_DiscardUnknown() { 278 xxx_messageInfo_KVMetadataWrite.DiscardUnknown(m) 279 } 280 281 var xxx_messageInfo_KVMetadataWrite proto.InternalMessageInfo 282 283 func (m *KVMetadataWrite) GetKey() string { 284 if m != nil { 285 return m.Key 286 } 287 return "" 288 } 289 290 func (m *KVMetadataWrite) GetEntries() []*KVMetadataEntry { 291 if m != nil { 292 return m.Entries 293 } 294 return nil 295 } 296 297 // KVReadHash is similar to the KVRead in spirit. However, it captures the hash of the key instead of the key itself 298 // version is kept as is for now. However, if the version also needs to be privacy-protected, it would need to be the 299 // hash of the version and hence of 'bytes' type 300 type KVReadHash struct { 301 KeyHash []byte `protobuf:"bytes,1,opt,name=key_hash,json=keyHash,proto3" json:"key_hash,omitempty"` 302 Version *Version `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` 303 XXX_NoUnkeyedLiteral struct{} `json:"-"` 304 XXX_unrecognized []byte `json:"-"` 305 XXX_sizecache int32 `json:"-"` 306 } 307 308 func (m *KVReadHash) Reset() { *m = KVReadHash{} } 309 func (m *KVReadHash) String() string { return proto.CompactTextString(m) } 310 func (*KVReadHash) ProtoMessage() {} 311 func (*KVReadHash) Descriptor() ([]byte, []int) { 312 return fileDescriptor_ee5d686eab23a142, []int{5} 313 } 314 315 func (m *KVReadHash) XXX_Unmarshal(b []byte) error { 316 return xxx_messageInfo_KVReadHash.Unmarshal(m, b) 317 } 318 func (m *KVReadHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 319 return xxx_messageInfo_KVReadHash.Marshal(b, m, deterministic) 320 } 321 func (m *KVReadHash) XXX_Merge(src proto.Message) { 322 xxx_messageInfo_KVReadHash.Merge(m, src) 323 } 324 func (m *KVReadHash) XXX_Size() int { 325 return xxx_messageInfo_KVReadHash.Size(m) 326 } 327 func (m *KVReadHash) XXX_DiscardUnknown() { 328 xxx_messageInfo_KVReadHash.DiscardUnknown(m) 329 } 330 331 var xxx_messageInfo_KVReadHash proto.InternalMessageInfo 332 333 func (m *KVReadHash) GetKeyHash() []byte { 334 if m != nil { 335 return m.KeyHash 336 } 337 return nil 338 } 339 340 func (m *KVReadHash) GetVersion() *Version { 341 if m != nil { 342 return m.Version 343 } 344 return nil 345 } 346 347 // KVWriteHash is similar to the KVWrite. It captures a write (update/delete) operation performed during transaction simulation 348 type KVWriteHash struct { 349 KeyHash []byte `protobuf:"bytes,1,opt,name=key_hash,json=keyHash,proto3" json:"key_hash,omitempty"` 350 IsDelete bool `protobuf:"varint,2,opt,name=is_delete,json=isDelete,proto3" json:"is_delete,omitempty"` 351 ValueHash []byte `protobuf:"bytes,3,opt,name=value_hash,json=valueHash,proto3" json:"value_hash,omitempty"` 352 IsPurge bool `protobuf:"varint,4,opt,name=is_purge,json=isPurge,proto3" json:"is_purge,omitempty"` 353 XXX_NoUnkeyedLiteral struct{} `json:"-"` 354 XXX_unrecognized []byte `json:"-"` 355 XXX_sizecache int32 `json:"-"` 356 } 357 358 func (m *KVWriteHash) Reset() { *m = KVWriteHash{} } 359 func (m *KVWriteHash) String() string { return proto.CompactTextString(m) } 360 func (*KVWriteHash) ProtoMessage() {} 361 func (*KVWriteHash) Descriptor() ([]byte, []int) { 362 return fileDescriptor_ee5d686eab23a142, []int{6} 363 } 364 365 func (m *KVWriteHash) XXX_Unmarshal(b []byte) error { 366 return xxx_messageInfo_KVWriteHash.Unmarshal(m, b) 367 } 368 func (m *KVWriteHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 369 return xxx_messageInfo_KVWriteHash.Marshal(b, m, deterministic) 370 } 371 func (m *KVWriteHash) XXX_Merge(src proto.Message) { 372 xxx_messageInfo_KVWriteHash.Merge(m, src) 373 } 374 func (m *KVWriteHash) XXX_Size() int { 375 return xxx_messageInfo_KVWriteHash.Size(m) 376 } 377 func (m *KVWriteHash) XXX_DiscardUnknown() { 378 xxx_messageInfo_KVWriteHash.DiscardUnknown(m) 379 } 380 381 var xxx_messageInfo_KVWriteHash proto.InternalMessageInfo 382 383 func (m *KVWriteHash) GetKeyHash() []byte { 384 if m != nil { 385 return m.KeyHash 386 } 387 return nil 388 } 389 390 func (m *KVWriteHash) GetIsDelete() bool { 391 if m != nil { 392 return m.IsDelete 393 } 394 return false 395 } 396 397 func (m *KVWriteHash) GetValueHash() []byte { 398 if m != nil { 399 return m.ValueHash 400 } 401 return nil 402 } 403 404 func (m *KVWriteHash) GetIsPurge() bool { 405 if m != nil { 406 return m.IsPurge 407 } 408 return false 409 } 410 411 // KVMetadataWriteHash captures all the upserts to the metadata associated with a key hash 412 type KVMetadataWriteHash struct { 413 KeyHash []byte `protobuf:"bytes,1,opt,name=key_hash,json=keyHash,proto3" json:"key_hash,omitempty"` 414 Entries []*KVMetadataEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"` 415 XXX_NoUnkeyedLiteral struct{} `json:"-"` 416 XXX_unrecognized []byte `json:"-"` 417 XXX_sizecache int32 `json:"-"` 418 } 419 420 func (m *KVMetadataWriteHash) Reset() { *m = KVMetadataWriteHash{} } 421 func (m *KVMetadataWriteHash) String() string { return proto.CompactTextString(m) } 422 func (*KVMetadataWriteHash) ProtoMessage() {} 423 func (*KVMetadataWriteHash) Descriptor() ([]byte, []int) { 424 return fileDescriptor_ee5d686eab23a142, []int{7} 425 } 426 427 func (m *KVMetadataWriteHash) XXX_Unmarshal(b []byte) error { 428 return xxx_messageInfo_KVMetadataWriteHash.Unmarshal(m, b) 429 } 430 func (m *KVMetadataWriteHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 431 return xxx_messageInfo_KVMetadataWriteHash.Marshal(b, m, deterministic) 432 } 433 func (m *KVMetadataWriteHash) XXX_Merge(src proto.Message) { 434 xxx_messageInfo_KVMetadataWriteHash.Merge(m, src) 435 } 436 func (m *KVMetadataWriteHash) XXX_Size() int { 437 return xxx_messageInfo_KVMetadataWriteHash.Size(m) 438 } 439 func (m *KVMetadataWriteHash) XXX_DiscardUnknown() { 440 xxx_messageInfo_KVMetadataWriteHash.DiscardUnknown(m) 441 } 442 443 var xxx_messageInfo_KVMetadataWriteHash proto.InternalMessageInfo 444 445 func (m *KVMetadataWriteHash) GetKeyHash() []byte { 446 if m != nil { 447 return m.KeyHash 448 } 449 return nil 450 } 451 452 func (m *KVMetadataWriteHash) GetEntries() []*KVMetadataEntry { 453 if m != nil { 454 return m.Entries 455 } 456 return nil 457 } 458 459 // KVMetadataEntry captures a 'name'ed entry in the metadata of a key/key-hash. 460 type KVMetadataEntry struct { 461 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 462 Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` 463 XXX_NoUnkeyedLiteral struct{} `json:"-"` 464 XXX_unrecognized []byte `json:"-"` 465 XXX_sizecache int32 `json:"-"` 466 } 467 468 func (m *KVMetadataEntry) Reset() { *m = KVMetadataEntry{} } 469 func (m *KVMetadataEntry) String() string { return proto.CompactTextString(m) } 470 func (*KVMetadataEntry) ProtoMessage() {} 471 func (*KVMetadataEntry) Descriptor() ([]byte, []int) { 472 return fileDescriptor_ee5d686eab23a142, []int{8} 473 } 474 475 func (m *KVMetadataEntry) XXX_Unmarshal(b []byte) error { 476 return xxx_messageInfo_KVMetadataEntry.Unmarshal(m, b) 477 } 478 func (m *KVMetadataEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 479 return xxx_messageInfo_KVMetadataEntry.Marshal(b, m, deterministic) 480 } 481 func (m *KVMetadataEntry) XXX_Merge(src proto.Message) { 482 xxx_messageInfo_KVMetadataEntry.Merge(m, src) 483 } 484 func (m *KVMetadataEntry) XXX_Size() int { 485 return xxx_messageInfo_KVMetadataEntry.Size(m) 486 } 487 func (m *KVMetadataEntry) XXX_DiscardUnknown() { 488 xxx_messageInfo_KVMetadataEntry.DiscardUnknown(m) 489 } 490 491 var xxx_messageInfo_KVMetadataEntry proto.InternalMessageInfo 492 493 func (m *KVMetadataEntry) GetName() string { 494 if m != nil { 495 return m.Name 496 } 497 return "" 498 } 499 500 func (m *KVMetadataEntry) GetValue() []byte { 501 if m != nil { 502 return m.Value 503 } 504 return nil 505 } 506 507 // Version encapsulates the version of a Key 508 // A version of a committed key is maintained as the height of the transaction that committed the key. 509 // The height is represenetd as a tuple <blockNum, txNum> where the txNum is the position of the transaction 510 // (starting with 0) within block 511 type Version struct { 512 BlockNum uint64 `protobuf:"varint,1,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` 513 TxNum uint64 `protobuf:"varint,2,opt,name=tx_num,json=txNum,proto3" json:"tx_num,omitempty"` 514 XXX_NoUnkeyedLiteral struct{} `json:"-"` 515 XXX_unrecognized []byte `json:"-"` 516 XXX_sizecache int32 `json:"-"` 517 } 518 519 func (m *Version) Reset() { *m = Version{} } 520 func (m *Version) String() string { return proto.CompactTextString(m) } 521 func (*Version) ProtoMessage() {} 522 func (*Version) Descriptor() ([]byte, []int) { 523 return fileDescriptor_ee5d686eab23a142, []int{9} 524 } 525 526 func (m *Version) XXX_Unmarshal(b []byte) error { 527 return xxx_messageInfo_Version.Unmarshal(m, b) 528 } 529 func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 530 return xxx_messageInfo_Version.Marshal(b, m, deterministic) 531 } 532 func (m *Version) XXX_Merge(src proto.Message) { 533 xxx_messageInfo_Version.Merge(m, src) 534 } 535 func (m *Version) XXX_Size() int { 536 return xxx_messageInfo_Version.Size(m) 537 } 538 func (m *Version) XXX_DiscardUnknown() { 539 xxx_messageInfo_Version.DiscardUnknown(m) 540 } 541 542 var xxx_messageInfo_Version proto.InternalMessageInfo 543 544 func (m *Version) GetBlockNum() uint64 { 545 if m != nil { 546 return m.BlockNum 547 } 548 return 0 549 } 550 551 func (m *Version) GetTxNum() uint64 { 552 if m != nil { 553 return m.TxNum 554 } 555 return 0 556 } 557 558 // RangeQueryInfo encapsulates the details of a range query performed by a transaction during simulation. 559 // This helps protect transactions from phantom reads by varifying during validation whether any new items 560 // got committed within the given range between transaction simuation and validation 561 // (in addition to regular checks for updates/deletes of the existing items). 562 // readInfo field contains either the KVReads (for the items read by the range query) or a merkle-tree hash 563 // if the KVReads exceeds a pre-configured numbers 564 type RangeQueryInfo struct { 565 StartKey string `protobuf:"bytes,1,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"` 566 EndKey string `protobuf:"bytes,2,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` 567 ItrExhausted bool `protobuf:"varint,3,opt,name=itr_exhausted,json=itrExhausted,proto3" json:"itr_exhausted,omitempty"` 568 // Types that are valid to be assigned to ReadsInfo: 569 // 570 // *RangeQueryInfo_RawReads 571 // *RangeQueryInfo_ReadsMerkleHashes 572 ReadsInfo isRangeQueryInfo_ReadsInfo `protobuf_oneof:"reads_info"` 573 XXX_NoUnkeyedLiteral struct{} `json:"-"` 574 XXX_unrecognized []byte `json:"-"` 575 XXX_sizecache int32 `json:"-"` 576 } 577 578 func (m *RangeQueryInfo) Reset() { *m = RangeQueryInfo{} } 579 func (m *RangeQueryInfo) String() string { return proto.CompactTextString(m) } 580 func (*RangeQueryInfo) ProtoMessage() {} 581 func (*RangeQueryInfo) Descriptor() ([]byte, []int) { 582 return fileDescriptor_ee5d686eab23a142, []int{10} 583 } 584 585 func (m *RangeQueryInfo) XXX_Unmarshal(b []byte) error { 586 return xxx_messageInfo_RangeQueryInfo.Unmarshal(m, b) 587 } 588 func (m *RangeQueryInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 589 return xxx_messageInfo_RangeQueryInfo.Marshal(b, m, deterministic) 590 } 591 func (m *RangeQueryInfo) XXX_Merge(src proto.Message) { 592 xxx_messageInfo_RangeQueryInfo.Merge(m, src) 593 } 594 func (m *RangeQueryInfo) XXX_Size() int { 595 return xxx_messageInfo_RangeQueryInfo.Size(m) 596 } 597 func (m *RangeQueryInfo) XXX_DiscardUnknown() { 598 xxx_messageInfo_RangeQueryInfo.DiscardUnknown(m) 599 } 600 601 var xxx_messageInfo_RangeQueryInfo proto.InternalMessageInfo 602 603 func (m *RangeQueryInfo) GetStartKey() string { 604 if m != nil { 605 return m.StartKey 606 } 607 return "" 608 } 609 610 func (m *RangeQueryInfo) GetEndKey() string { 611 if m != nil { 612 return m.EndKey 613 } 614 return "" 615 } 616 617 func (m *RangeQueryInfo) GetItrExhausted() bool { 618 if m != nil { 619 return m.ItrExhausted 620 } 621 return false 622 } 623 624 type isRangeQueryInfo_ReadsInfo interface { 625 isRangeQueryInfo_ReadsInfo() 626 } 627 628 type RangeQueryInfo_RawReads struct { 629 RawReads *QueryReads `protobuf:"bytes,4,opt,name=raw_reads,json=rawReads,proto3,oneof"` 630 } 631 632 type RangeQueryInfo_ReadsMerkleHashes struct { 633 ReadsMerkleHashes *QueryReadsMerkleSummary `protobuf:"bytes,5,opt,name=reads_merkle_hashes,json=readsMerkleHashes,proto3,oneof"` 634 } 635 636 func (*RangeQueryInfo_RawReads) isRangeQueryInfo_ReadsInfo() {} 637 638 func (*RangeQueryInfo_ReadsMerkleHashes) isRangeQueryInfo_ReadsInfo() {} 639 640 func (m *RangeQueryInfo) GetReadsInfo() isRangeQueryInfo_ReadsInfo { 641 if m != nil { 642 return m.ReadsInfo 643 } 644 return nil 645 } 646 647 func (m *RangeQueryInfo) GetRawReads() *QueryReads { 648 if x, ok := m.GetReadsInfo().(*RangeQueryInfo_RawReads); ok { 649 return x.RawReads 650 } 651 return nil 652 } 653 654 func (m *RangeQueryInfo) GetReadsMerkleHashes() *QueryReadsMerkleSummary { 655 if x, ok := m.GetReadsInfo().(*RangeQueryInfo_ReadsMerkleHashes); ok { 656 return x.ReadsMerkleHashes 657 } 658 return nil 659 } 660 661 // XXX_OneofWrappers is for the internal use of the proto package. 662 func (*RangeQueryInfo) XXX_OneofWrappers() []interface{} { 663 return []interface{}{ 664 (*RangeQueryInfo_RawReads)(nil), 665 (*RangeQueryInfo_ReadsMerkleHashes)(nil), 666 } 667 } 668 669 // QueryReads encapsulates the KVReads for the items read by a transaction as a result of a query execution 670 type QueryReads struct { 671 KvReads []*KVRead `protobuf:"bytes,1,rep,name=kv_reads,json=kvReads,proto3" json:"kv_reads,omitempty"` 672 XXX_NoUnkeyedLiteral struct{} `json:"-"` 673 XXX_unrecognized []byte `json:"-"` 674 XXX_sizecache int32 `json:"-"` 675 } 676 677 func (m *QueryReads) Reset() { *m = QueryReads{} } 678 func (m *QueryReads) String() string { return proto.CompactTextString(m) } 679 func (*QueryReads) ProtoMessage() {} 680 func (*QueryReads) Descriptor() ([]byte, []int) { 681 return fileDescriptor_ee5d686eab23a142, []int{11} 682 } 683 684 func (m *QueryReads) XXX_Unmarshal(b []byte) error { 685 return xxx_messageInfo_QueryReads.Unmarshal(m, b) 686 } 687 func (m *QueryReads) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 688 return xxx_messageInfo_QueryReads.Marshal(b, m, deterministic) 689 } 690 func (m *QueryReads) XXX_Merge(src proto.Message) { 691 xxx_messageInfo_QueryReads.Merge(m, src) 692 } 693 func (m *QueryReads) XXX_Size() int { 694 return xxx_messageInfo_QueryReads.Size(m) 695 } 696 func (m *QueryReads) XXX_DiscardUnknown() { 697 xxx_messageInfo_QueryReads.DiscardUnknown(m) 698 } 699 700 var xxx_messageInfo_QueryReads proto.InternalMessageInfo 701 702 func (m *QueryReads) GetKvReads() []*KVRead { 703 if m != nil { 704 return m.KvReads 705 } 706 return nil 707 } 708 709 // QueryReadsMerkleSummary encapsulates the Merkle-tree hashes for the QueryReads 710 // This allows to reduce the size of RWSet in the presence of query results 711 // by storing certain hashes instead of actual results. 712 // maxDegree field refers to the maximum number of children in the tree at any level 713 // maxLevel field contains the lowest level which has lesser nodes than maxDegree (starting from leaf level) 714 type QueryReadsMerkleSummary struct { 715 MaxDegree uint32 `protobuf:"varint,1,opt,name=max_degree,json=maxDegree,proto3" json:"max_degree,omitempty"` 716 MaxLevel uint32 `protobuf:"varint,2,opt,name=max_level,json=maxLevel,proto3" json:"max_level,omitempty"` 717 MaxLevelHashes [][]byte `protobuf:"bytes,3,rep,name=max_level_hashes,json=maxLevelHashes,proto3" json:"max_level_hashes,omitempty"` 718 XXX_NoUnkeyedLiteral struct{} `json:"-"` 719 XXX_unrecognized []byte `json:"-"` 720 XXX_sizecache int32 `json:"-"` 721 } 722 723 func (m *QueryReadsMerkleSummary) Reset() { *m = QueryReadsMerkleSummary{} } 724 func (m *QueryReadsMerkleSummary) String() string { return proto.CompactTextString(m) } 725 func (*QueryReadsMerkleSummary) ProtoMessage() {} 726 func (*QueryReadsMerkleSummary) Descriptor() ([]byte, []int) { 727 return fileDescriptor_ee5d686eab23a142, []int{12} 728 } 729 730 func (m *QueryReadsMerkleSummary) XXX_Unmarshal(b []byte) error { 731 return xxx_messageInfo_QueryReadsMerkleSummary.Unmarshal(m, b) 732 } 733 func (m *QueryReadsMerkleSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 734 return xxx_messageInfo_QueryReadsMerkleSummary.Marshal(b, m, deterministic) 735 } 736 func (m *QueryReadsMerkleSummary) XXX_Merge(src proto.Message) { 737 xxx_messageInfo_QueryReadsMerkleSummary.Merge(m, src) 738 } 739 func (m *QueryReadsMerkleSummary) XXX_Size() int { 740 return xxx_messageInfo_QueryReadsMerkleSummary.Size(m) 741 } 742 func (m *QueryReadsMerkleSummary) XXX_DiscardUnknown() { 743 xxx_messageInfo_QueryReadsMerkleSummary.DiscardUnknown(m) 744 } 745 746 var xxx_messageInfo_QueryReadsMerkleSummary proto.InternalMessageInfo 747 748 func (m *QueryReadsMerkleSummary) GetMaxDegree() uint32 { 749 if m != nil { 750 return m.MaxDegree 751 } 752 return 0 753 } 754 755 func (m *QueryReadsMerkleSummary) GetMaxLevel() uint32 { 756 if m != nil { 757 return m.MaxLevel 758 } 759 return 0 760 } 761 762 func (m *QueryReadsMerkleSummary) GetMaxLevelHashes() [][]byte { 763 if m != nil { 764 return m.MaxLevelHashes 765 } 766 return nil 767 } 768 769 func init() { 770 proto.RegisterType((*KVRWSet)(nil), "kvrwset.KVRWSet") 771 proto.RegisterType((*HashedRWSet)(nil), "kvrwset.HashedRWSet") 772 proto.RegisterType((*KVRead)(nil), "kvrwset.KVRead") 773 proto.RegisterType((*KVWrite)(nil), "kvrwset.KVWrite") 774 proto.RegisterType((*KVMetadataWrite)(nil), "kvrwset.KVMetadataWrite") 775 proto.RegisterType((*KVReadHash)(nil), "kvrwset.KVReadHash") 776 proto.RegisterType((*KVWriteHash)(nil), "kvrwset.KVWriteHash") 777 proto.RegisterType((*KVMetadataWriteHash)(nil), "kvrwset.KVMetadataWriteHash") 778 proto.RegisterType((*KVMetadataEntry)(nil), "kvrwset.KVMetadataEntry") 779 proto.RegisterType((*Version)(nil), "kvrwset.Version") 780 proto.RegisterType((*RangeQueryInfo)(nil), "kvrwset.RangeQueryInfo") 781 proto.RegisterType((*QueryReads)(nil), "kvrwset.QueryReads") 782 proto.RegisterType((*QueryReadsMerkleSummary)(nil), "kvrwset.QueryReadsMerkleSummary") 783 } 784 785 func init() { 786 proto.RegisterFile("ledger/rwset/kvrwset/kv_rwset.proto", fileDescriptor_ee5d686eab23a142) 787 } 788 789 var fileDescriptor_ee5d686eab23a142 = []byte{ 790 // 759 bytes of a gzipped FileDescriptorProto 791 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x5f, 0x6b, 0xe3, 0x46, 792 0x10, 0x3f, 0xff, 0x95, 0x3c, 0xb6, 0x13, 0x77, 0x73, 0x25, 0x2a, 0x6d, 0xc1, 0xe8, 0x28, 0x98, 793 0x83, 0xb3, 0xc1, 0x85, 0xd2, 0xd2, 0xf6, 0xa1, 0xe5, 0x5c, 0x52, 0xd2, 0x0b, 0xed, 0x06, 0x12, 794 0xe8, 0x8b, 0x58, 0x47, 0x13, 0x5b, 0xd8, 0x92, 0xd2, 0xdd, 0x95, 0x6d, 0x3d, 0x1d, 0xfd, 0x74, 795 0xfd, 0x22, 0xfd, 0x20, 0x65, 0x67, 0xa5, 0xb3, 0xce, 0xf5, 0x19, 0xda, 0x27, 0x69, 0xe6, 0x37, 796 0xbf, 0xd1, 0xfc, 0x66, 0xb4, 0xb3, 0xf0, 0x62, 0x8d, 0xe1, 0x02, 0xe5, 0x44, 0x6e, 0x15, 0xea, 797 0xc9, 0x6a, 0x53, 0x3e, 0x03, 0x7a, 0x19, 0x3f, 0xc9, 0x54, 0xa7, 0xcc, 0x29, 0xfc, 0xfe, 0xdf, 798 0x35, 0x70, 0xae, 0xef, 0xf8, 0xfd, 0x2d, 0x6a, 0xf6, 0x05, 0xb4, 0x24, 0x8a, 0x50, 0x79, 0xb5, 799 0x61, 0x63, 0xd4, 0x9d, 0x9e, 0x8f, 0x8b, 0xa0, 0xf1, 0xf5, 0x1d, 0x47, 0x11, 0x72, 0x8b, 0xb2, 800 0x19, 0x30, 0x29, 0x92, 0x05, 0x06, 0x7f, 0x64, 0x28, 0x23, 0x54, 0x41, 0x94, 0x3c, 0xa6, 0x5e, 801 0x9d, 0x38, 0x97, 0xef, 0x38, 0xdc, 0x84, 0xfc, 0x96, 0xa1, 0xcc, 0x7f, 0x4e, 0x1e, 0x53, 0x3e, 802 0x90, 0xa5, 0x1d, 0xa1, 0x32, 0x1e, 0x36, 0x82, 0xf6, 0x56, 0x46, 0x1a, 0x95, 0xd7, 0x20, 0xea, 803 0xa0, 0xf2, 0xb9, 0x7b, 0x03, 0xf0, 0x02, 0x67, 0x3f, 0xc0, 0x79, 0x8c, 0x5a, 0x84, 0x42, 0x8b, 804 0xa0, 0xa0, 0x34, 0x89, 0xe2, 0x55, 0x28, 0x6f, 0x8a, 0x08, 0x4b, 0x3d, 0x8b, 0xab, 0xa6, 0xf2, 805 0xff, 0xaa, 0x41, 0xf7, 0x4a, 0xa8, 0x25, 0x86, 0x56, 0xea, 0x57, 0xd0, 0x5b, 0x92, 0x19, 0x54, 806 0x15, 0x5f, 0x1c, 0x28, 0x36, 0x0c, 0xde, 0xb5, 0x81, 0x9c, 0xb4, 0x7f, 0x03, 0xfd, 0x82, 0x57, 807 0x14, 0x62, 0x65, 0x3f, 0x3f, 0xac, 0x9d, 0x98, 0xc5, 0x27, 0x6c, 0x09, 0x6c, 0xf6, 0x6f, 0x15, 808 0x56, 0xf8, 0x67, 0x1f, 0x52, 0x41, 0x49, 0x0e, 0x95, 0xfc, 0x04, 0x6d, 0x5b, 0x1c, 0x1b, 0x40, 809 0x63, 0x85, 0xb9, 0x57, 0x1b, 0xd6, 0x46, 0x1d, 0x6e, 0x5e, 0xd9, 0x4b, 0x70, 0x36, 0x28, 0x55, 810 0x94, 0x26, 0x5e, 0x7d, 0x58, 0x7b, 0xaf, 0xa7, 0x77, 0xd6, 0xcf, 0xcb, 0x00, 0xff, 0xc6, 0xcc, 811 0x9d, 0x72, 0x1e, 0x49, 0xf4, 0x29, 0x74, 0x22, 0x15, 0x84, 0xb8, 0x46, 0x8d, 0x94, 0xca, 0xe5, 812 0x6e, 0xa4, 0x5e, 0x93, 0xcd, 0x9e, 0x43, 0x6b, 0x23, 0xd6, 0x19, 0x7a, 0x8d, 0x61, 0x6d, 0xd4, 813 0xe3, 0xd6, 0xf0, 0xef, 0xe1, 0xfc, 0xa0, 0xfc, 0x23, 0x79, 0xa7, 0xe0, 0x60, 0xa2, 0xcd, 0x2f, 814 0x50, 0x34, 0xee, 0xd8, 0x04, 0x67, 0x89, 0x96, 0x39, 0x2f, 0x03, 0xfd, 0x5b, 0x80, 0xfd, 0x34, 815 0xd8, 0x27, 0xe0, 0xae, 0x30, 0x0f, 0x4c, 0x67, 0x29, 0x71, 0x8f, 0x3b, 0x2b, 0xcc, 0x09, 0xfa, 816 0x2f, 0xea, 0xdf, 0x42, 0xb7, 0x32, 0xa9, 0x53, 0x59, 0x4f, 0xb6, 0xe2, 0x73, 0x00, 0x52, 0x6f, 817 0x99, 0xb6, 0x1f, 0x1d, 0xf2, 0x94, 0x69, 0x23, 0x15, 0x3c, 0x65, 0x72, 0x81, 0x5e, 0x93, 0xa8, 818 0x4e, 0xa4, 0x7e, 0x35, 0xa6, 0x1f, 0xc2, 0xc5, 0x91, 0x69, 0x9f, 0x2a, 0xe4, 0xff, 0xf4, 0xee, 819 0xdb, 0xea, 0x50, 0x08, 0x63, 0x0c, 0x9a, 0x89, 0x88, 0xb1, 0x98, 0x0a, 0xbd, 0xef, 0x27, 0x5a, 820 0xaf, 0x4e, 0xf4, 0x7b, 0x70, 0x8a, 0xbe, 0x99, 0x26, 0xcc, 0xd7, 0xe9, 0xc3, 0x2a, 0x48, 0xb2, 821 0x98, 0x98, 0x4d, 0xee, 0x92, 0xe3, 0x26, 0x8b, 0xd9, 0xc7, 0xd0, 0xd6, 0x3b, 0x42, 0xea, 0x84, 822 0xb4, 0xf4, 0xee, 0x26, 0x8b, 0xfd, 0x3f, 0xeb, 0x70, 0xf6, 0xfe, 0x12, 0x30, 0x69, 0x94, 0x16, 823 0x52, 0x07, 0xfb, 0xdf, 0xc2, 0x25, 0xc7, 0x35, 0xe6, 0xec, 0xd2, 0xe8, 0x0b, 0x09, 0xaa, 0x13, 824 0xd4, 0xc6, 0x24, 0x34, 0xc0, 0x0b, 0xe8, 0x47, 0x5a, 0x06, 0xb8, 0x5b, 0x8a, 0x4c, 0x69, 0x0c, 825 0xa9, 0xcf, 0x2e, 0xef, 0x45, 0x5a, 0xce, 0x4a, 0x1f, 0x9b, 0x42, 0x47, 0x8a, 0x6d, 0x71, 0x9a, 826 0x9b, 0x34, 0xfe, 0xfd, 0x69, 0xa6, 0x0a, 0xe8, 0x00, 0x5f, 0x3d, 0xe3, 0xae, 0x14, 0x5b, 0x7b, 827 0x98, 0x39, 0x5c, 0x50, 0x7c, 0x10, 0xa3, 0x5c, 0xad, 0xed, 0x10, 0x51, 0x79, 0x2d, 0x62, 0x0f, 828 0x8f, 0xb0, 0xdf, 0x50, 0xdc, 0x6d, 0x16, 0xc7, 0x42, 0xe6, 0x57, 0xcf, 0xf8, 0x47, 0x72, 0xef, 829 0xa5, 0xed, 0xa2, 0x7e, 0xec, 0x01, 0xd8, 0x9c, 0x66, 0x29, 0xfa, 0x5f, 0x03, 0xec, 0xd9, 0xec, 830 0x25, 0xb8, 0x66, 0x0d, 0x9f, 0x5a, 0xb1, 0xce, 0x6a, 0x43, 0xb1, 0xfe, 0x5b, 0xb8, 0xfc, 0xc0, 831 0x77, 0xcd, 0x4f, 0x17, 0x8b, 0x5d, 0x10, 0xe2, 0x42, 0xa2, 0x9d, 0x63, 0x9f, 0x77, 0x62, 0xb1, 832 0x7b, 0x4d, 0x0e, 0xd3, 0x64, 0x03, 0xaf, 0x71, 0x83, 0x6b, 0xea, 0x64, 0x9f, 0xbb, 0xb1, 0xd8, 833 0xfd, 0x62, 0x6c, 0x36, 0x82, 0xc1, 0x3b, 0xb0, 0xd4, 0x6b, 0xb6, 0x50, 0x8f, 0x9f, 0x95, 0x31, 834 0x85, 0x10, 0x09, 0xd3, 0x54, 0x2e, 0xc6, 0xcb, 0xfc, 0x09, 0xa5, 0xbd, 0x51, 0xc6, 0x8f, 0x62, 835 0x2e, 0xa3, 0x07, 0x7b, 0x83, 0xa8, 0x71, 0xe1, 0xb4, 0xe5, 0x17, 0x32, 0x7e, 0xff, 0x6e, 0x11, 836 0xe9, 0x65, 0x36, 0x1f, 0x3f, 0xa4, 0xf1, 0xa4, 0x42, 0x9d, 0x58, 0xea, 0x2b, 0x4b, 0x7d, 0xb5, 837 0x48, 0x27, 0xc7, 0x2e, 0xa9, 0x79, 0x9b, 0xf0, 0x2f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x3e, 838 0x32, 0xae, 0x35, 0xc3, 0x06, 0x00, 0x00, 839 }