github.com/okex/exchain@v1.8.0/libs/ibc-go/proto/ibc/lightclients/tendermint/v1/tendermint.proto (about)

     1  syntax = "proto3";
     2  
     3  package ibc.lightclients.tendermint.v1;
     4  
     5  option go_package = "github.com/cosmos/ibc-go/v2/modules/light-clients/07-tendermint/types";
     6  
     7  import "tendermint/types/validator.proto";
     8  import "tendermint/types/types.proto";
     9  import "proofs.proto";
    10  import "google/protobuf/duration.proto";
    11  import "google/protobuf/timestamp.proto";
    12  import "ibc/core/client/v1/client.proto";
    13  import "ibc/core/commitment/v1/commitment.proto";
    14  import "gogoproto/gogo.proto";
    15  
    16  // ClientState from Tendermint tracks the current validator set, latest height,
    17  // and a possible frozen height.
    18  message ClientState {
    19    option (gogoproto.goproto_getters) = false;
    20  
    21    string   chain_id    = 1;
    22    Fraction trust_level = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trust_level\""];
    23    // duration of the period since the LastestTimestamp during which the
    24    // submitted headers are valid for upgrade
    25    google.protobuf.Duration trusting_period = 3
    26        [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"trusting_period\""];
    27    // duration of the staking unbonding period
    28    google.protobuf.Duration unbonding_period = 4 [
    29      (gogoproto.nullable)    = false,
    30      (gogoproto.stdduration) = true,
    31      (gogoproto.moretags)    = "yaml:\"unbonding_period\""
    32    ];
    33    // defines how much new (untrusted) header's Time can drift into the future.
    34    google.protobuf.Duration max_clock_drift = 5
    35        [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""];
    36    // Block height when the client was frozen due to a misbehaviour
    37    ibc.core.client.v1.Height frozen_height = 6
    38        [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""];
    39    // Latest height the client was updated to
    40    ibc.core.client.v1.Height latest_height = 7
    41        [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""];
    42  
    43    // Proof specifications used in verifying counterparty state
    44    repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""];
    45  
    46    // Path at which next upgraded client will be committed.
    47    // Each element corresponds to the key for a single CommitmentProof in the
    48    // chained proof. NOTE: ClientState must stored under
    49    // `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
    50    // under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
    51    // the default upgrade module, upgrade_path should be []string{"upgrade",
    52    // "upgradedIBCState"}`
    53    repeated string upgrade_path = 9 [(gogoproto.moretags) = "yaml:\"upgrade_path\""];
    54  
    55    // This flag, when set to true, will allow governance to recover a client
    56    // which has expired
    57    bool allow_update_after_expiry = 10 [(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""];
    58    // This flag, when set to true, will allow governance to unfreeze a client
    59    // whose chain has experienced a misbehaviour event
    60    bool allow_update_after_misbehaviour = 11 [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""];
    61  }
    62  
    63  // ConsensusState defines the consensus state from Tendermint.
    64  message ConsensusState {
    65    option (gogoproto.goproto_getters) = false;
    66  
    67    // timestamp that corresponds to the block height in which the ConsensusState
    68    // was stored.
    69    google.protobuf.Timestamp timestamp = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
    70    // commitment root (i.e app hash)
    71    ibc.core.commitment.v1.MerkleRoot root                 = 2 [(gogoproto.nullable) = false];
    72    bytes                             next_validators_hash = 3 [
    73      (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes",
    74      (gogoproto.moretags) = "yaml:\"next_validators_hash\""
    75    ];
    76  }
    77  
    78  // Misbehaviour is a wrapper over two conflicting Headers
    79  // that implements Misbehaviour interface expected by ICS-02
    80  message Misbehaviour {
    81    option (gogoproto.goproto_getters) = false;
    82  
    83    string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
    84    Header header_1  = 2 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""];
    85    Header header_2  = 3 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""];
    86  }
    87  
    88  // Header defines the Tendermint client consensus Header.
    89  // It encapsulates all the information necessary to update from a trusted
    90  // Tendermint ConsensusState. The inclusion of TrustedHeight and
    91  // TrustedValidators allows this update to process correctly, so long as the
    92  // ConsensusState for the TrustedHeight exists, this removes race conditions
    93  // among relayers The SignedHeader and ValidatorSet are the new untrusted update
    94  // fields for the client. The TrustedHeight is the height of a stored
    95  // ConsensusState on the client that will be used to verify the new untrusted
    96  // header. The Trusted ConsensusState must be within the unbonding period of
    97  // current time in order to correctly verify, and the TrustedValidators must
    98  // hash to TrustedConsensusState.NextValidatorsHash since that is the last
    99  // trusted validator set at the TrustedHeight.
   100  message Header {
   101    .tendermint.types.SignedHeader signed_header = 1
   102        [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""];
   103  
   104    .tendermint.types.ValidatorSet validator_set  = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""];
   105    ibc.core.client.v1.Height      trusted_height = 3
   106        [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""];
   107    .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""];
   108  }
   109  
   110  // Fraction defines the protobuf message type for tmmath.Fraction that only
   111  // supports positive values.
   112  message Fraction {
   113    uint64 numerator   = 1;
   114    uint64 denominator = 2;
   115  }