github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/proto/types/types.proto (about) 1 syntax = "proto3"; 2 package tendermint.proto.types; 3 4 option go_package = "github.com/tendermint/tendermint/proto/types"; 5 6 import "third_party/proto/gogoproto/gogo.proto"; 7 import "google/protobuf/timestamp.proto"; 8 import "proto/libs/bits/types.proto"; 9 import "proto/crypto/merkle/types.proto"; 10 import "proto/version/version.proto"; 11 12 // BlockIdFlag indicates which BlcokID the signature is for 13 enum BlockIDFlag { 14 option (gogoproto.goproto_enum_stringer) = false; 15 option (gogoproto.goproto_enum_prefix) = false; 16 17 BLOCKD_ID_FLAG_UNKNOWN = 0; 18 BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; 19 BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; 20 BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; 21 } 22 23 // SignedMsgType is a type of signed message in the consensus. 24 enum SignedMsgType { 25 option (gogoproto.goproto_enum_stringer) = false; 26 option (gogoproto.goproto_enum_prefix) = false; 27 28 SIGNED_MSG_TYPE_UNKNOWN = 0; 29 PREVOTE_TYPE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; 30 PRECOMMIT_TYPE = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; 31 PROPOSAL_TYPE = 3 [(gogoproto.enumvalue_customname) = "ProposalType"]; 32 } 33 34 // PartsetHeader 35 message PartSetHeader { 36 int64 total = 1; 37 bytes hash = 2; 38 } 39 40 message Part { 41 uint32 index = 1; 42 bytes bytes = 2; 43 tendermint.proto.crypto.merkle.SimpleProof proof = 3 [(gogoproto.nullable) = false]; 44 } 45 46 // BlockID 47 message BlockID { 48 bytes hash = 1; 49 PartSetHeader parts_header = 2 [(gogoproto.nullable) = false]; 50 } 51 52 // -------------------------------- 53 54 // Header defines the structure of a Tendermint block header. 55 message Header { 56 // basic block info 57 tendermint.proto.version.Consensus version = 1 [(gogoproto.nullable) = false]; 58 string chain_id = 2 [(gogoproto.customname) = "ChainID"]; 59 int64 height = 3; 60 google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 61 int64 num_txs = 5; 62 int64 total_txs = 6; 63 64 // prev block info 65 BlockID last_block_id = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; 66 67 // hashes of block data 68 bytes last_commit_hash = 8; // commit from validators from the last block 69 bytes data_hash = 9; // transactions 70 71 // hashes from the app output from the prev block 72 bytes validators_hash = 10; // validators for the current block 73 bytes next_validators_hash = 11; // validators for the next block 74 bytes consensus_hash = 12; // consensus params for current block 75 bytes app_hash = 13; // state after txs from the previous block 76 bytes last_results_hash = 14; // root hash of all results from the txs from the previous block 77 78 // consensus info 79 bytes evidence_hash = 15; // evidence included in the block 80 bytes proposer_address = 16; // original proposer of the block 81 } 82 83 // Data contains the set of transactions included in the block 84 message Data { 85 // Txs that will be applied by state @ block.Height+1. 86 // NOTE: not all txs here are valid. We're just agreeing on the order first. 87 // This means that block.AppHash does not include these txs. 88 repeated bytes txs = 1; 89 // Volatile 90 bytes hash = 2; 91 } 92 93 // Vote represents a prevote, precommit, or commit vote from validators for 94 // consensus. 95 message Vote { 96 SignedMsgType type = 1; 97 int64 height = 2; 98 int64 round = 3; 99 BlockID block_id = 4 100 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. 101 google.protobuf.Timestamp timestamp = 5 102 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 103 bytes validator_address = 6; 104 int64 validator_index = 7; 105 bytes signature = 8; 106 } 107 108 // Commit contains the evidence that a block was committed by a set of validators. 109 message Commit { 110 int64 height = 1; 111 int32 round = 2; 112 BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; 113 repeated CommitSig precommits = 4 [(gogoproto.nullable) = false]; 114 bytes hash = 5; 115 tendermint.proto.libs.bits.BitArray bit_array = 6; 116 } 117 118 // CommitSig is a part of the Vote included in a Commit. 119 message CommitSig { 120 SignedMsgType type = 1; 121 int64 height = 2; 122 int64 round = 3; 123 BlockID block_id = 4 124 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. 125 google.protobuf.Timestamp timestamp = 5 126 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 127 bytes validator_address = 6; 128 int64 validator_index = 7; 129 bytes signature = 8; 130 } 131 132 message Proposal { 133 SignedMsgType type = 1; 134 int64 height = 2; 135 int32 round = 3; 136 int32 pol_round = 4; 137 BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; 138 google.protobuf.Timestamp timestamp = 6 139 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 140 bytes signature = 7; 141 } 142 143 message SignedHeader { 144 Header header = 1; 145 Commit commit = 2; 146 } 147 148 message BlockMeta { 149 BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; 150 Header header = 2 [(gogoproto.nullable) = false]; 151 }