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

     1  syntax = "proto3";
     2  
     3  package ibc.core.connection.v1;
     4  
     5  option go_package = "github.com/cosmos/ibc-go/v2/modules/core/03-connection/types";
     6  
     7  import "gogoproto/gogo.proto";
     8  import "ibc/core/commitment/v1/commitment.proto";
     9  
    10  // ICS03 - Connection Data Structures as defined in
    11  // https://github.com/cosmos/ibc/blob/master/spec/core/ics-003-connection-semantics#data-structures
    12  
    13  // ConnectionEnd defines a stateful object on a chain connected to another
    14  // separate one.
    15  // NOTE: there must only be 2 defined ConnectionEnds to establish
    16  // a connection between two chains.
    17  message ConnectionEnd {
    18    option (gogoproto.goproto_getters) = false;
    19    // client associated with this connection.
    20    string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
    21    // IBC version which can be utilised to determine encodings or protocols for
    22    // channels or packets utilising this connection.
    23    repeated Version versions = 2;
    24    // current state of the connection end.
    25    State state = 3;
    26    // counterparty chain associated with this connection.
    27    Counterparty counterparty = 4 [(gogoproto.nullable) = false];
    28    // delay period that must pass before a consensus state can be used for
    29    // packet-verification NOTE: delay period logic is only implemented by some
    30    // clients.
    31    uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""];
    32  }
    33  
    34  // IdentifiedConnection defines a connection with additional connection
    35  // identifier field.
    36  message IdentifiedConnection {
    37    option (gogoproto.goproto_getters) = false;
    38    // connection identifier.
    39    string id = 1 [(gogoproto.moretags) = "yaml:\"id\""];
    40    // client associated with this connection.
    41    string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""];
    42    // IBC version which can be utilised to determine encodings or protocols for
    43    // channels or packets utilising this connection
    44    repeated Version versions = 3;
    45    // current state of the connection end.
    46    State state = 4;
    47    // counterparty chain associated with this connection.
    48    Counterparty counterparty = 5 [(gogoproto.nullable) = false];
    49    // delay period associated with this connection.
    50    uint64 delay_period = 6 [(gogoproto.moretags) = "yaml:\"delay_period\""];
    51  }
    52  
    53  // State defines if a connection is in one of the following states:
    54  // INIT, TRYOPEN, OPEN or UNINITIALIZED.
    55  enum State {
    56    option (gogoproto.goproto_enum_prefix) = false;
    57  
    58    // Default State
    59    STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"];
    60    // A connection end has just started the opening handshake.
    61    STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"];
    62    // A connection end has acknowledged the handshake step on the counterparty
    63    // chain.
    64    STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"];
    65    // A connection end has completed the handshake.
    66    STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"];
    67  }
    68  
    69  // Counterparty defines the counterparty chain associated with a connection end.
    70  message Counterparty {
    71    option (gogoproto.goproto_getters) = false;
    72  
    73    // identifies the client on the counterparty chain associated with a given
    74    // connection.
    75    string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
    76    // identifies the connection end on the counterparty chain associated with a
    77    // given connection.
    78    string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""];
    79    // commitment merkle prefix of the counterparty chain.
    80    ibc.core.commitment.v1.MerklePrefix prefix = 3 [(gogoproto.nullable) = false];
    81  }
    82  
    83  // ClientPaths define all the connection paths for a client state.
    84  message ClientPaths {
    85    // list of connection paths
    86    repeated string paths = 1;
    87  }
    88  
    89  // ConnectionPaths define all the connection paths for a given client state.
    90  message ConnectionPaths {
    91    // client state unique identifier
    92    string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
    93    // list of connection paths
    94    repeated string paths = 2;
    95  }
    96  
    97  // Version defines the versioning scheme used to negotiate the IBC verison in
    98  // the connection handshake.
    99  message Version {
   100    option (gogoproto.goproto_getters) = false;
   101  
   102    // unique version identifier
   103    string identifier = 1;
   104    // list of features compatible with the specified identifier
   105    repeated string features = 2;
   106  }
   107  
   108  // Params defines the set of Connection parameters.
   109  message Params {
   110    // maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the
   111    // largest amount of time that the chain might reasonably take to produce the next block under normal operating
   112    // conditions. A safe choice is 3-5x the expected time per block.
   113    uint64 max_expected_time_per_block = 1 [(gogoproto.moretags) = "yaml:\"max_expected_time_per_block\""];
   114  }