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

     1  syntax = "proto3";
     2  
     3  package ibc.lightclients.solomachine.v2;
     4  
     5  option go_package = "github.com/cosmos/ibc-go/v2/modules/light-clients/06-solomachine/types";
     6  
     7  import "ibc/core/connection/v1/connection.proto";
     8  import "ibc/core/channel/v1/channel.proto";
     9  import "gogoproto/gogo.proto";
    10  import "google/protobuf/any.proto";
    11  
    12  // ClientState defines a solo machine client that tracks the current consensus
    13  // state and if the client is frozen.
    14  message ClientState {
    15    option (gogoproto.goproto_getters) = false;
    16    // latest sequence of the client state
    17    uint64 sequence = 1;
    18    // frozen sequence of the solo machine
    19    bool           is_frozen       = 2 [(gogoproto.moretags) = "yaml:\"is_frozen\""];
    20    ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""];
    21    // when set to true, will allow governance to update a solo machine client.
    22    // The client will be unfrozen if it is frozen.
    23    bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""];
    24  }
    25  
    26  // ConsensusState defines a solo machine consensus state. The sequence of a
    27  // consensus state is contained in the "height" key used in storing the
    28  // consensus state.
    29  message ConsensusState {
    30    option (gogoproto.goproto_getters) = false;
    31    // public key of the solo machine
    32    google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""];
    33    // diversifier allows the same public key to be re-used across different solo
    34    // machine clients (potentially on different chains) without being considered
    35    // misbehaviour.
    36    string diversifier = 2;
    37    uint64 timestamp   = 3;
    38  }
    39  
    40  // Header defines a solo machine consensus header
    41  message Header {
    42    option (gogoproto.goproto_getters) = false;
    43    // sequence to update solo machine public key at
    44    uint64              sequence        = 1;
    45    uint64              timestamp       = 2;
    46    bytes               signature       = 3;
    47    google.protobuf.Any new_public_key  = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""];
    48    string              new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""];
    49  }
    50  
    51  // Misbehaviour defines misbehaviour for a solo machine which consists
    52  // of a sequence and two signatures over different messages at that sequence.
    53  message Misbehaviour {
    54    option (gogoproto.goproto_getters) = false;
    55    string           client_id         = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
    56    uint64           sequence          = 2;
    57    SignatureAndData signature_one     = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""];
    58    SignatureAndData signature_two     = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""];
    59  }
    60  
    61  // SignatureAndData contains a signature and the data signed over to create that
    62  // signature.
    63  message SignatureAndData {
    64    option (gogoproto.goproto_getters) = false;
    65    bytes    signature                 = 1;
    66    DataType data_type                 = 2 [(gogoproto.moretags) = "yaml:\"data_type\""];
    67    bytes    data                      = 3;
    68    uint64   timestamp                 = 4;
    69  }
    70  
    71  // TimestampedSignatureData contains the signature data and the timestamp of the
    72  // signature.
    73  message TimestampedSignatureData {
    74    option (gogoproto.goproto_getters) = false;
    75    bytes  signature_data              = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""];
    76    uint64 timestamp                   = 2;
    77  }
    78  
    79  // SignBytes defines the signed bytes used for signature verification.
    80  message SignBytes {
    81    option (gogoproto.goproto_getters) = false;
    82  
    83    uint64 sequence    = 1;
    84    uint64 timestamp   = 2;
    85    string diversifier = 3;
    86    // type of the data used
    87    DataType data_type = 4 [(gogoproto.moretags) = "yaml:\"data_type\""];
    88    // marshaled data
    89    bytes data = 5;
    90  }
    91  
    92  // DataType defines the type of solo machine proof being created. This is done
    93  // to preserve uniqueness of different data sign byte encodings.
    94  enum DataType {
    95    option (gogoproto.goproto_enum_prefix) = false;
    96  
    97    // Default State
    98    DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"];
    99    // Data type for client state verification
   100    DATA_TYPE_CLIENT_STATE = 1 [(gogoproto.enumvalue_customname) = "CLIENT"];
   101    // Data type for consensus state verification
   102    DATA_TYPE_CONSENSUS_STATE = 2 [(gogoproto.enumvalue_customname) = "CONSENSUS"];
   103    // Data type for connection state verification
   104    DATA_TYPE_CONNECTION_STATE = 3 [(gogoproto.enumvalue_customname) = "CONNECTION"];
   105    // Data type for channel state verification
   106    DATA_TYPE_CHANNEL_STATE = 4 [(gogoproto.enumvalue_customname) = "CHANNEL"];
   107    // Data type for packet commitment verification
   108    DATA_TYPE_PACKET_COMMITMENT = 5 [(gogoproto.enumvalue_customname) = "PACKETCOMMITMENT"];
   109    // Data type for packet acknowledgement verification
   110    DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6 [(gogoproto.enumvalue_customname) = "PACKETACKNOWLEDGEMENT"];
   111    // Data type for packet receipt absence verification
   112    DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7 [(gogoproto.enumvalue_customname) = "PACKETRECEIPTABSENCE"];
   113    // Data type for next sequence recv verification
   114    DATA_TYPE_NEXT_SEQUENCE_RECV = 8 [(gogoproto.enumvalue_customname) = "NEXTSEQUENCERECV"];
   115    // Data type for header verification
   116    DATA_TYPE_HEADER = 9 [(gogoproto.enumvalue_customname) = "HEADER"];
   117  }
   118  
   119  // HeaderData returns the SignBytes data for update verification.
   120  message HeaderData {
   121    option (gogoproto.goproto_getters) = false;
   122  
   123    // header public key
   124    google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""];
   125    // header diversifier
   126    string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""];
   127  }
   128  
   129  // ClientStateData returns the SignBytes data for client state verification.
   130  message ClientStateData {
   131    option (gogoproto.goproto_getters) = false;
   132  
   133    bytes               path         = 1;
   134    google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""];
   135  }
   136  
   137  // ConsensusStateData returns the SignBytes data for consensus state
   138  // verification.
   139  message ConsensusStateData {
   140    option (gogoproto.goproto_getters) = false;
   141  
   142    bytes               path            = 1;
   143    google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""];
   144  }
   145  
   146  // ConnectionStateData returns the SignBytes data for connection state
   147  // verification.
   148  message ConnectionStateData {
   149    option (gogoproto.goproto_getters) = false;
   150  
   151    bytes                                path       = 1;
   152    ibc.core.connection.v1.ConnectionEnd connection = 2;
   153  }
   154  
   155  // ChannelStateData returns the SignBytes data for channel state
   156  // verification.
   157  message ChannelStateData {
   158    option (gogoproto.goproto_getters) = false;
   159  
   160    bytes                       path    = 1;
   161    ibc.core.channel.v1.Channel channel = 2;
   162  }
   163  
   164  // PacketCommitmentData returns the SignBytes data for packet commitment
   165  // verification.
   166  message PacketCommitmentData {
   167    bytes path       = 1;
   168    bytes commitment = 2;
   169  }
   170  
   171  // PacketAcknowledgementData returns the SignBytes data for acknowledgement
   172  // verification.
   173  message PacketAcknowledgementData {
   174    bytes path            = 1;
   175    bytes acknowledgement = 2;
   176  }
   177  
   178  // PacketReceiptAbsenceData returns the SignBytes data for
   179  // packet receipt absence verification.
   180  message PacketReceiptAbsenceData {
   181    bytes path = 1;
   182  }
   183  
   184  // NextSequenceRecvData returns the SignBytes data for verification of the next
   185  // sequence to be received.
   186  message NextSequenceRecvData {
   187    bytes  path          = 1;
   188    uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""];
   189  }