2020-08-11 05:29:29 -07:00
|
|
|
syntax = "proto3";
|
|
|
|
package ibc.client;
|
|
|
|
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types";
|
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "google/protobuf/any.proto";
|
|
|
|
|
2020-09-01 03:40:31 -07:00
|
|
|
// IdentifiedClientState defines a client state with additional client
|
|
|
|
// identifier field.
|
2020-08-11 05:29:29 -07:00
|
|
|
message IdentifiedClientState {
|
|
|
|
// client identifier
|
2020-08-20 07:23:19 -07:00
|
|
|
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
|
|
|
// client state
|
2020-09-01 03:40:31 -07:00
|
|
|
google.protobuf.Any client_state = 2
|
|
|
|
[(gogoproto.moretags) = "yaml:\"client_state\""];
|
2020-08-20 07:23:19 -07:00
|
|
|
}
|
|
|
|
|
2020-09-01 03:40:31 -07:00
|
|
|
// ClientConsensusStates defines all the stored consensus states for a given
|
|
|
|
// client.
|
2020-08-20 07:23:19 -07:00
|
|
|
message ClientConsensusStates {
|
|
|
|
// client identifier
|
|
|
|
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
|
|
|
// consensus states associated with the client
|
2020-09-01 03:40:31 -07:00
|
|
|
repeated google.protobuf.Any consensus_states = 2
|
|
|
|
[(gogoproto.moretags) = "yaml:\"consensus_states\""];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCreateClient defines a message to create an IBC client
|
|
|
|
message MsgCreateClient {
|
|
|
|
// client unique identifier
|
|
|
|
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
|
|
|
// light client state
|
|
|
|
google.protobuf.Any client_state = 2
|
|
|
|
[(gogoproto.moretags) = "yaml:\"client_state\""];
|
|
|
|
// consensus state associated with the client that corresponds to a given
|
|
|
|
// height.
|
|
|
|
google.protobuf.Any consensus_state = 3
|
|
|
|
[(gogoproto.moretags) = "yaml:\"consensus_state\""];
|
|
|
|
// signer address
|
|
|
|
bytes signer = 4
|
|
|
|
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgUpdateClient defines an sdk.Msg to update a IBC client state using
|
|
|
|
// the given header.
|
|
|
|
message MsgUpdateClient {
|
|
|
|
// client unique identifier
|
|
|
|
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
|
|
|
// header to update the light client
|
|
|
|
google.protobuf.Any header = 2;
|
|
|
|
// signer address
|
|
|
|
bytes signer = 3
|
|
|
|
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for
|
|
|
|
// light client misbehaviour.
|
|
|
|
message MsgSubmitMisbehaviour {
|
|
|
|
// client unique identifier
|
|
|
|
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
|
|
|
|
// misbehaviour used for freezing the light client
|
|
|
|
google.protobuf.Any misbehaviour = 2;
|
|
|
|
// signer address
|
|
|
|
bytes signer = 3
|
|
|
|
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
2020-08-11 05:29:29 -07:00
|
|
|
}
|
2020-08-31 10:57:08 -07:00
|
|
|
|
|
|
|
// Height is a monotonically increasing data type
|
2020-09-01 03:40:31 -07:00
|
|
|
// that can be compared against another Height for the purposes of updating and
|
|
|
|
// freezing clients
|
2020-08-31 10:57:08 -07:00
|
|
|
//
|
2020-09-01 03:40:31 -07:00
|
|
|
// Normally the EpochHeight is incremented at each height while keeping epoch
|
|
|
|
// number the same However some consensus algorithms may choose to reset the
|
|
|
|
// height in certain conditions e.g. hard forks, state-machine breaking changes
|
|
|
|
// In these cases, the epoch number is incremented so that height continues to
|
|
|
|
// be monitonically increasing even as the EpochHeight gets reset
|
2020-08-31 10:57:08 -07:00
|
|
|
message Height {
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
|
|
|
|
// the epoch that the client is currently on
|
|
|
|
uint64 epoch_number = 1 [(gogoproto.moretags) = "yaml:\"epoch_number\""];
|
|
|
|
// the height within the given epoch
|
|
|
|
uint64 epoch_height = 2 [(gogoproto.moretags) = "yaml:\"epoch_height\""];
|
|
|
|
}
|