github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/proto/tendermint/types/types.proto (about)

     1  syntax = "proto3";
     2  package seitendermint.types;
     3  
     4  option go_package = "github.com/ari-anchor/sei-tendermint/proto/tendermint/types";
     5  
     6  import "gogoproto/gogo.proto";
     7  import "google/protobuf/timestamp.proto";
     8  import "tendermint/crypto/proof.proto";
     9  import "tendermint/version/types.proto";
    10  import "tendermint/types/validator.proto";
    11  
    12  // BlockIdFlag indicates which BlockID the signature is for
    13  enum BlockIDFlag {
    14    option (gogoproto.goproto_enum_stringer) = true;
    15    option (gogoproto.goproto_enum_prefix)   = false;
    16  
    17    BLOCK_ID_FLAG_UNKNOWN = 0
    18        [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"];
    19    BLOCK_ID_FLAG_ABSENT = 1
    20        [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"];
    21    BLOCK_ID_FLAG_COMMIT = 2
    22        [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"];
    23    BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"];
    24  }
    25  
    26  // SignedMsgType is a type of signed message in the consensus.
    27  enum SignedMsgType {
    28    option (gogoproto.goproto_enum_stringer) = true;
    29    option (gogoproto.goproto_enum_prefix)   = false;
    30  
    31    SIGNED_MSG_TYPE_UNKNOWN = 0
    32        [(gogoproto.enumvalue_customname) = "UnknownType"];
    33    // Votes
    34    SIGNED_MSG_TYPE_PREVOTE = 1
    35        [(gogoproto.enumvalue_customname) = "PrevoteType"];
    36    SIGNED_MSG_TYPE_PRECOMMIT = 2
    37        [(gogoproto.enumvalue_customname) = "PrecommitType"];
    38  
    39    // Proposals
    40    SIGNED_MSG_TYPE_PROPOSAL = 32
    41        [(gogoproto.enumvalue_customname) = "ProposalType"];
    42  }
    43  
    44  // PartsetHeader
    45  message PartSetHeader {
    46    uint32 total = 1;
    47    bytes  hash  = 2;
    48  }
    49  
    50  message Part {
    51    uint32                  index = 1;
    52    bytes                   bytes = 2;
    53    seitendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false];
    54  }
    55  
    56  // BlockID
    57  message BlockID {
    58    bytes         hash            = 1;
    59    PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false];
    60  }
    61  
    62  // --------------------------------
    63  
    64  // Header defines the structure of a Tendermint block header.
    65  message Header {
    66    // basic block info
    67    seitendermint.version.Consensus version  = 1 [(gogoproto.nullable) = false];
    68    string                       chain_id = 2 [(gogoproto.customname) = "ChainID"];
    69    int64                        height   = 3;
    70    google.protobuf.Timestamp    time     = 4
    71        [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
    72  
    73    // prev block info
    74    BlockID last_block_id = 5 [(gogoproto.nullable) = false];
    75  
    76    // hashes of block data
    77    bytes last_commit_hash = 6;  // commit from validators from the last block
    78    bytes data_hash        = 7;  // transactions
    79  
    80    // hashes from the app output from the prev block
    81    bytes validators_hash      = 8;   // validators for the current block
    82    bytes next_validators_hash = 9;   // validators for the next block
    83    bytes consensus_hash       = 10;  // consensus params for current block
    84    bytes app_hash             = 11;  // state after txs from the previous block
    85    bytes last_results_hash =
    86        12;  // root hash of all results from the txs from the previous block
    87  
    88    // consensus info
    89    bytes evidence_hash    = 13;  // evidence included in the block
    90    bytes proposer_address = 14;  // original proposer of the block
    91  }
    92  
    93  // Data contains the set of transactions included in the block
    94  message Data {
    95    // Txs that will be applied by state @ block.Height+1.
    96    // NOTE: not all txs here are valid.  We're just agreeing on the order first.
    97    // This means that block.AppHash does not include these txs.
    98    repeated bytes txs = 1;
    99  }
   100  
   101  message TxKey {
   102    bytes tx_key = 1;
   103  }
   104  
   105  // Vote represents a prevote, precommit, or commit vote from validators for
   106  // consensus.
   107  message Vote {
   108    SignedMsgType type     = 1;
   109    int64         height   = 2;
   110    int32         round    = 3;
   111    BlockID       block_id = 4 [
   112      (gogoproto.nullable)   = false,
   113      (gogoproto.customname) = "BlockID"
   114    ];  // zero if vote is nil.
   115    google.protobuf.Timestamp timestamp = 5
   116        [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
   117    bytes validator_address = 6;
   118    int32 validator_index   = 7;
   119    // Vote signature by the validator if they participated in consensus for the
   120    // associated block.
   121    bytes signature = 8;
   122    // Vote extension provided by the application. Only valid for precommit
   123    // messages.
   124    bytes extension = 9;
   125    // Vote extension signature by the validator if they participated in
   126    // consensus for the associated block. Only valid for precommit messages.
   127    bytes extension_signature = 10;
   128  }
   129  
   130  // Commit contains the evidence that a block was committed by a set of
   131  // validators.
   132  message Commit {
   133    int64   height   = 1;
   134    int32   round    = 2;
   135    BlockID block_id = 3
   136        [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
   137    repeated CommitSig signatures = 4 [(gogoproto.nullable) = false];
   138  }
   139  
   140  // CommitSig is a part of the Vote included in a Commit.
   141  message CommitSig {
   142    BlockIDFlag               block_id_flag     = 1;
   143    bytes                     validator_address = 2;
   144    google.protobuf.Timestamp timestamp         = 3
   145        [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
   146    bytes signature = 4;
   147  }
   148  
   149  message ExtendedCommit {
   150    int64   height   = 1;
   151    int32   round    = 2;
   152    BlockID block_id = 3
   153        [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
   154    repeated ExtendedCommitSig extended_signatures = 4 [(gogoproto.nullable) = false];
   155  }
   156  
   157  // ExtendedCommitSig retains all the same fields as CommitSig but adds vote
   158  // extension-related fields.
   159  message ExtendedCommitSig {
   160    BlockIDFlag               block_id_flag     = 1;
   161    bytes                     validator_address = 2;
   162    google.protobuf.Timestamp timestamp         = 3
   163        [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
   164    bytes signature = 4;
   165    // Vote extension data
   166    bytes extension = 5;
   167    // Vote extension signature
   168    bytes extension_signature = 6;
   169  }
   170  
   171  message Proposal {
   172    SignedMsgType type      = 1;
   173    int64         height    = 2;
   174    int32         round     = 3;
   175    int32         pol_round = 4;
   176    BlockID       block_id  = 5
   177        [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
   178    google.protobuf.Timestamp timestamp = 6
   179        [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
   180    bytes signature = 7;
   181    repeated TxKey tx_keys = 8;
   182    EvidenceList evidence = 9;
   183    Commit last_commit = 10;
   184    Header header     = 11 [(gogoproto.nullable) = false];
   185    bytes proposer_address = 12;
   186  }
   187  
   188  message SignedHeader {
   189    Header header = 1;
   190    Commit commit = 2;
   191  }
   192  
   193  message LightBlock {
   194    SignedHeader                  signed_header = 1;
   195    seitendermint.types.ValidatorSet validator_set = 2;
   196  }
   197  
   198  message BlockMeta {
   199    BlockID block_id = 1
   200        [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
   201    int64  block_size = 2;
   202    Header header     = 3 [(gogoproto.nullable) = false];
   203    int64  num_txs    = 4;
   204  }
   205  
   206  // TxProof represents a Merkle proof of the presence of a transaction in the
   207  // Merkle tree.
   208  message TxProof {
   209    bytes                   root_hash = 1;
   210    bytes                   data      = 2;
   211    seitendermint.crypto.Proof proof     = 3;
   212  }
   213  
   214  
   215  message Evidence {
   216    oneof sum {
   217      DuplicateVoteEvidence     duplicate_vote_evidence      = 1;
   218      LightClientAttackEvidence light_client_attack_evidence = 2;
   219    }
   220  }
   221  
   222  // DuplicateVoteEvidence contains evidence of a validator signed two conflicting
   223  // votes.
   224  message DuplicateVoteEvidence {
   225    seitendermint.types.Vote     vote_a             = 1;
   226    seitendermint.types.Vote     vote_b             = 2;
   227    int64                     total_voting_power = 3;
   228    int64                     validator_power    = 4;
   229    google.protobuf.Timestamp timestamp          = 5
   230    [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
   231  }
   232  
   233  // LightClientAttackEvidence contains evidence of a set of validators attempting
   234  // to mislead a light client.
   235  message LightClientAttackEvidence {
   236    seitendermint.types.LightBlock conflicting_block            = 1;
   237    int64                       common_height                = 2;
   238    repeated seitendermint.types.Validator byzantine_validators = 3;
   239    int64                               total_voting_power   = 4;
   240    google.protobuf.Timestamp           timestamp            = 5
   241    [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
   242  }
   243  
   244  message EvidenceList {
   245    repeated Evidence evidence = 1 [(gogoproto.nullable) = false];
   246  }