github.com/devwanda/aphelion-staking@v0.33.9/proto/types/types.proto (about) 1 syntax = "proto3"; 2 package tendermint.proto.types; 3 4 option go_package = "github.com/devwanda/aphelion-staking/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 62 // prev block info 63 BlockID last_block_id = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; 64 65 // hashes of block data 66 bytes last_commit_hash = 6; // commit from validators from the last block 67 bytes data_hash = 7; // transactions 68 69 // hashes from the app output from the prev block 70 bytes validators_hash = 8; // validators for the current block 71 bytes next_validators_hash = 9; // validators for the next block 72 bytes consensus_hash = 10; // consensus params for current block 73 bytes app_hash = 11; // state after txs from the previous block 74 bytes last_results_hash = 12; // root hash of all results from the txs from the previous block 75 76 // consensus info 77 bytes evidence_hash = 13; // evidence included in the block 78 bytes proposer_address = 14; // original proposer of the block 79 } 80 81 // Data contains the set of transactions included in the block 82 message Data { 83 // Txs that will be applied by state @ block.Height+1. 84 // NOTE: not all txs here are valid. We're just agreeing on the order first. 85 // This means that block.AppHash does not include these txs. 86 repeated bytes txs = 1; 87 // Volatile 88 bytes hash = 2; 89 } 90 91 // Vote represents a prevote, precommit, or commit vote from validators for 92 // consensus. 93 message Vote { 94 SignedMsgType type = 1; 95 int64 height = 2; 96 int64 round = 3; 97 BlockID block_id = 4 98 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. 99 google.protobuf.Timestamp timestamp = 5 100 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 101 bytes validator_address = 6; 102 int64 validator_index = 7; 103 bytes signature = 8; 104 } 105 106 // Commit contains the evidence that a block was committed by a set of validators. 107 message Commit { 108 int64 height = 1; 109 int32 round = 2; 110 BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; 111 repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; 112 bytes hash = 5; 113 tendermint.proto.libs.bits.BitArray bit_array = 6; 114 } 115 116 // CommitSig is a part of the Vote included in a Commit. 117 message CommitSig { 118 BlockIDFlag block_id_flag = 1; 119 bytes validator_address = 2; 120 google.protobuf.Timestamp timestamp = 3 121 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 122 bytes signature = 4; 123 } 124 125 message Proposal { 126 SignedMsgType type = 1; 127 int64 height = 2; 128 int32 round = 3; 129 int32 pol_round = 4; 130 BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; 131 google.protobuf.Timestamp timestamp = 6 132 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 133 bytes signature = 7; 134 } 135 136 message SignedHeader { 137 Header header = 1; 138 Commit commit = 2; 139 } 140 141 message BlockMeta { 142 BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; 143 int64 block_size = 2; 144 Header header = 3 [(gogoproto.nullable) = false]; 145 int64 num_txs = 4; 146 }