github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/abci/types/types.proto (about) 1 syntax = "proto3"; 2 package tendermint.abci.types; 3 option go_package = "github.com/tendermint/tendermint/abci/types"; 4 5 // For more information on gogo.proto, see: 6 // https://github.com/gogo/protobuf/blob/master/extensions.md 7 import "third_party/proto/gogoproto/gogo.proto"; 8 import "crypto/merkle/merkle.proto"; 9 import "libs/kv/types.proto"; 10 import "google/protobuf/timestamp.proto"; 11 12 // This file is copied from http://github.com/tendermint/abci 13 // NOTE: When using custom types, mind the warnings. 14 // https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues 15 16 option (gogoproto.marshaler_all) = true; 17 option (gogoproto.unmarshaler_all) = true; 18 option (gogoproto.sizer_all) = true; 19 option (gogoproto.goproto_registration) = true; 20 // Generate tests 21 option (gogoproto.populate_all) = true; 22 option (gogoproto.equal_all) = true; 23 option (gogoproto.testgen_all) = true; 24 25 //---------------------------------------- 26 // Request types 27 28 message Request { 29 oneof value { 30 RequestEcho echo = 2; 31 RequestFlush flush = 3; 32 RequestInfo info = 4; 33 RequestSetOption set_option = 5; 34 RequestInitChain init_chain = 6; 35 RequestQuery query = 7; 36 RequestBeginBlock begin_block = 8; 37 RequestCheckTx check_tx = 9; 38 RequestDeliverTx deliver_tx = 19; 39 RequestEndBlock end_block = 11; 40 RequestCommit commit = 12; 41 } 42 } 43 44 message RequestEcho { 45 string message = 1; 46 } 47 48 message RequestFlush {} 49 50 message RequestInfo { 51 string version = 1; 52 uint64 block_version = 2; 53 uint64 p2p_version = 3; 54 } 55 56 // nondeterministic 57 message RequestSetOption { 58 string key = 1; 59 string value = 2; 60 } 61 62 message RequestInitChain { 63 google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 64 string chain_id = 2; 65 ConsensusParams consensus_params = 3; 66 repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; 67 bytes app_state_bytes = 5; 68 } 69 70 message RequestQuery { 71 bytes data = 1; 72 string path = 2; 73 int64 height = 3; 74 bool prove = 4; 75 } 76 77 message RequestBeginBlock { 78 bytes hash = 1; 79 Header header = 2 [(gogoproto.nullable) = false]; 80 LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; 81 repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; 82 } 83 84 enum CheckTxType { 85 New = 0; 86 Recheck = 1; 87 } 88 89 message RequestCheckTx { 90 bytes tx = 1; 91 CheckTxType type = 2; 92 } 93 94 message RequestDeliverTx { 95 bytes tx = 1; 96 } 97 98 message RequestEndBlock { 99 int64 height = 1; 100 } 101 102 message RequestCommit {} 103 104 //---------------------------------------- 105 // Response types 106 107 message Response { 108 oneof value { 109 ResponseException exception = 1; 110 ResponseEcho echo = 2; 111 ResponseFlush flush = 3; 112 ResponseInfo info = 4; 113 ResponseSetOption set_option = 5; 114 ResponseInitChain init_chain = 6; 115 ResponseQuery query = 7; 116 ResponseBeginBlock begin_block = 8; 117 ResponseCheckTx check_tx = 9; 118 ResponseDeliverTx deliver_tx = 10; 119 ResponseEndBlock end_block = 11; 120 ResponseCommit commit = 12; 121 } 122 } 123 124 // nondeterministic 125 message ResponseException { 126 string error = 1; 127 } 128 129 message ResponseEcho { 130 string message = 1; 131 } 132 133 message ResponseFlush {} 134 135 message ResponseInfo { 136 string data = 1; 137 138 string version = 2; 139 uint64 app_version = 3; 140 141 int64 last_block_height = 4; 142 bytes last_block_app_hash = 5; 143 } 144 145 // nondeterministic 146 message ResponseSetOption { 147 uint32 code = 1; 148 // bytes data = 2; 149 string log = 3; 150 string info = 4; 151 } 152 153 message ResponseInitChain { 154 ConsensusParams consensus_params = 1; 155 repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; 156 } 157 158 message ResponseQuery { 159 uint32 code = 1; 160 // bytes data = 2; // use "value" instead. 161 string log = 3; // nondeterministic 162 string info = 4; // nondeterministic 163 int64 index = 5; 164 bytes key = 6; 165 bytes value = 7; 166 tendermint.crypto.merkle.Proof proof = 8; 167 int64 height = 9; 168 string codespace = 10; 169 } 170 171 message ResponseBeginBlock { 172 repeated Event events = 1 173 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; 174 } 175 176 message ResponseCheckTx { 177 uint32 code = 1; 178 bytes data = 2; 179 string log = 3; // nondeterministic 180 string info = 4; // nondeterministic 181 int64 gas_wanted = 5; 182 int64 gas_used = 6; 183 repeated Event events = 7 184 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; 185 string codespace = 8; 186 } 187 188 message ResponseDeliverTx { 189 uint32 code = 1; 190 bytes data = 2; 191 string log = 3; // nondeterministic 192 string info = 4; // nondeterministic 193 int64 gas_wanted = 5; 194 int64 gas_used = 6; 195 repeated Event events = 7 196 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; 197 string codespace = 8; 198 bytes signer = 9; // pocket network addition for custom tx indexer 199 bytes recepient = 10; // pocket network addition for custom tx indexer 200 string message_type = 11; // pocket network addition for custom tx indexer 201 } 202 203 message ResponseEndBlock { 204 repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; 205 ConsensusParams consensus_param_updates = 2; 206 repeated Event events = 3 207 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; 208 } 209 210 message ResponseCommit { 211 // reserve 1 212 bytes data = 2; 213 int64 retain_height = 3; 214 } 215 216 //---------------------------------------- 217 // Misc. 218 219 // ConsensusParams contains all consensus-relevant parameters 220 // that can be adjusted by the abci app 221 message ConsensusParams { 222 BlockParams block = 1; 223 EvidenceParams evidence = 2; 224 ValidatorParams validator = 3; 225 } 226 227 // BlockParams contains limits on the block size. 228 message BlockParams { 229 // Note: must be greater than 0 230 int64 max_bytes = 1; 231 // Note: must be greater or equal to -1 232 int64 max_gas = 2; 233 } 234 235 message EvidenceParams { 236 // Note: must be greater than 0 237 int64 max_age = 1; 238 } 239 240 // ValidatorParams contains limits on validators. 241 message ValidatorParams { 242 repeated string pub_key_types = 1; 243 } 244 245 message LastCommitInfo { 246 int32 round = 1; 247 repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; 248 } 249 250 message Event { 251 string type = 1; 252 repeated tendermint.libs.kv.Pair attributes = 2 253 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"]; 254 } 255 256 //---------------------------------------- 257 // Blockchain Types 258 259 message Header { 260 // basic block info 261 Version version = 1 [(gogoproto.nullable)=false]; 262 string chain_id = 2 [(gogoproto.customname)="ChainID"]; 263 int64 height = 3; 264 google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true]; 265 int64 num_txs = 5; 266 int64 total_txs = 6; 267 268 // prev block info 269 BlockID last_block_id = 7 [(gogoproto.nullable)=false]; 270 271 // hashes of block data 272 bytes last_commit_hash = 8; // commit from validators from the last block 273 bytes data_hash = 9; // transactions 274 275 // hashes from the app output from the prev block 276 bytes validators_hash = 10; // validators for the current block 277 bytes next_validators_hash = 11; // validators for the next block 278 bytes consensus_hash = 12; // consensus params for current block 279 bytes app_hash = 13; // state after txs from the previous block 280 bytes last_results_hash = 14;// root hash of all results from the txs from the previous block 281 282 // consensus info 283 bytes evidence_hash = 15; // evidence included in the block 284 bytes proposer_address = 16; // original proposer of the block 285 } 286 287 message Version { 288 uint64 Block = 1; 289 uint64 App = 2; 290 } 291 292 message BlockID { 293 bytes hash = 1; 294 PartSetHeader parts_header = 2 [(gogoproto.nullable) = false]; 295 } 296 297 message PartSetHeader { 298 int32 total = 1; 299 bytes hash = 2; 300 } 301 302 // Validator 303 message Validator { 304 bytes address = 1; 305 // PubKey pub_key = 2 [(gogoproto.nullable)=false]; 306 int64 power = 3; 307 } 308 309 // ValidatorUpdate 310 message ValidatorUpdate { 311 PubKey pub_key = 1 [(gogoproto.nullable) = false]; 312 int64 power = 2; 313 } 314 315 // VoteInfo 316 message VoteInfo { 317 Validator validator = 1 [(gogoproto.nullable) = false]; 318 bool signed_last_block = 2; 319 } 320 321 message PubKey { 322 string type = 1; 323 bytes data = 2; 324 } 325 326 message Evidence { 327 string type = 1; 328 Validator validator = 2 [(gogoproto.nullable) = false]; 329 int64 height = 3; 330 google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 331 int64 total_voting_power = 5; 332 } 333 334 //---------------------------------------- 335 // Service Definition 336 337 service ABCIApplication { 338 rpc Echo(RequestEcho) returns (ResponseEcho); 339 rpc Flush(RequestFlush) returns (ResponseFlush); 340 rpc Info(RequestInfo) returns (ResponseInfo); 341 rpc SetOption(RequestSetOption) returns (ResponseSetOption); 342 rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); 343 rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); 344 rpc Query(RequestQuery) returns (ResponseQuery); 345 rpc Commit(RequestCommit) returns (ResponseCommit); 346 rpc InitChain(RequestInitChain) returns (ResponseInitChain); 347 rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); 348 rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); 349 }