github.com/turingchain2020/turingchain@v1.1.21/types/proto/db.proto (about) 1 syntax = "proto3"; 2 3 import "common.proto"; 4 5 package types; 6 option go_package = "github.com/turingchain2020/turingchain/types"; 7 8 // merkle avl tree 9 message LeafNode { 10 bytes key = 1; 11 bytes value = 2; 12 int32 height = 3; 13 int32 size = 4; 14 } 15 16 message InnerNode { 17 bytes leftHash = 1; 18 bytes rightHash = 2; 19 int32 height = 3; 20 int32 size = 4; 21 } 22 23 message MAVLProof { 24 bytes leafHash = 1; 25 repeated InnerNode innerNodes = 2; 26 bytes rootHash = 3; 27 } 28 29 message StoreNode { 30 bytes key = 1; 31 bytes value = 2; 32 bytes leftHash = 3; 33 bytes rightHash = 4; 34 int32 height = 5; 35 int32 size = 6; 36 } 37 38 message LocalDBSet { 39 repeated KeyValue KV = 2; 40 int64 txid = 5; 41 } 42 43 message LocalDBList { 44 bytes prefix = 1; 45 bytes key = 2; 46 int32 direction = 3; 47 int32 count = 4; 48 int64 txid = 5; 49 } 50 51 message LocalDBGet { 52 repeated bytes keys = 2; 53 int64 txid = 5; 54 } 55 56 message LocalReplyValue { 57 repeated bytes values = 2; 58 } 59 60 message StoreSet { 61 bytes stateHash = 1; 62 repeated KeyValue KV = 2; 63 int64 height = 3; 64 } 65 66 message StoreDel { 67 bytes stateHash = 1; 68 int64 height = 2; 69 } 70 71 message StoreSetWithSync { 72 StoreSet storeset = 1; 73 bool sync = 2; 74 bool upgrade = 3; 75 } 76 77 message StoreGet { 78 bytes stateHash = 1; 79 repeated bytes keys = 2; 80 } 81 82 message StoreReplyValue { 83 repeated bytes values = 2; 84 } 85 86 message StoreList { 87 bytes stateHash = 1; 88 bytes start = 2; 89 bytes end = 3; 90 bytes suffix = 4; 91 int64 count = 5; 92 int64 mode = 6; 93 } 94 95 message StoreListReply { 96 bytes start = 1; 97 bytes end = 2; 98 bytes suffix = 3; 99 int64 count = 4; 100 int64 num = 5; 101 int64 mode = 6; 102 bytes nextKey = 7; 103 repeated bytes keys = 8; 104 repeated bytes values = 9; 105 } 106 107 message PruneData { 108 // 该叶子节点的所有父hash 109 repeated bytes hashs = 1; 110 } 111 112 //用于存储db Pool数据的Value 113 message StoreValuePool { 114 repeated bytes values = 1; 115 }