Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify Client on Connection Handshake #7057

Merged
merged 27 commits into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
aa03892
verify client state
AdityaSripal Aug 14, 2020
a7e8646
add client state to msgs and retrieve in handler
AdityaSripal Aug 14, 2020
c8fb33b
fix connection msgs
AdityaSripal Aug 17, 2020
fe85a62
fixed handshake tests
AdityaSripal Aug 17, 2020
ec7edae
fix tests
AdityaSripal Aug 17, 2020
56f9773
fix sim tests
AdityaSripal Aug 17, 2020
fa09c9d
revert pb edit
AdityaSripal Aug 17, 2020
1d370e1
add ValidateClient tests
AdityaSripal Aug 17, 2020
8c0a908
Merge branch 'master' of github.com:cosmos/cosmos-sdk into aditya/ver…
AdityaSripal Aug 17, 2020
7fcf263
Apply suggestions from code review
AdityaSripal Aug 18, 2020
69846c4
fix tests
AdityaSripal Aug 18, 2020
8ffd01b
remove rest files
AdityaSripal Aug 18, 2020
73c1786
fixed msgs test
AdityaSripal Aug 18, 2020
7d38197
use ibctesting for client state consts
AdityaSripal Aug 18, 2020
9d3657b
Apply suggestions from code review
AdityaSripal Aug 19, 2020
bdf83b5
Merge branch 'master' of github.com:cosmos/cosmos-sdk into aditya/ver…
AdityaSripal Aug 19, 2020
88ee0d6
address rest of comments
AdityaSripal Aug 19, 2020
7b1ecd7
Merge branch 'aditya/verify-client' of github.com:cosmos/cosmos-sdk i…
AdityaSripal Aug 19, 2020
b6f29a6
rename to ValidateSelfClient and update spec
AdityaSripal Aug 19, 2020
4c105fa
lint
AdityaSripal Aug 19, 2020
dcb0865
Update x/ibc/02-client/keeper/keeper_test.go
fedekunze Aug 20, 2020
2395231
Update x/ibc/02-client/keeper/keeper_test.go
fedekunze Aug 20, 2020
b22a493
Merge branch 'master' into aditya/verify-client
fedekunze Aug 20, 2020
6b34ef6
complete rest of review
AdityaSripal Aug 20, 2020
1e56cf3
Merge branch 'aditya/verify-client' of github.com:cosmos/cosmos-sdk i…
AdityaSripal Aug 20, 2020
fd1a83a
improve cov
AdityaSripal Aug 20, 2020
ba8e093
fix merge
AdityaSripal Aug 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions proto/ibc/connection/connection.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package ibc.connection;
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types";

import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "ibc/commitment/commitment.proto";

// MsgConnectionOpenInit defines the msg sent by an account on Chain A to
Expand All @@ -29,18 +30,21 @@ message MsgConnectionOpenTry {
string connection_id = 2 [
(gogoproto.moretags) = "yaml:\"connection_id\""
];
Counterparty counterparty = 3 [(gogoproto.nullable) = false];
repeated string counterparty_versions = 4
google.protobuf.Any client_state = 3;
AdityaSripal marked this conversation as resolved.
Show resolved Hide resolved
Counterparty counterparty = 4 [(gogoproto.nullable) = false];
repeated string counterparty_versions = 5
[(gogoproto.moretags) = "yaml:\"counterparty_versions\""];
// proof of the initialization the connection on Chain A: `UNITIALIZED ->
// INIT`
bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""];
uint64 proof_height = 6;
bytes proof_init = 6 [(gogoproto.moretags) = "yaml:\"proof_init\""];
uint64 proof_height = 7;
// proof of client state included in message
bytes proof_client = 8 [(gogoproto.moretags) = "yaml:\"proof_client\""];
// proof of client consensus state
bytes proof_consensus = 7 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
uint64 consensus_height = 8
bytes proof_consensus = 9 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
uint64 consensus_height = 10
[(gogoproto.moretags) = "yaml:\"consensus_height\""];
bytes signer = 9
bytes signer = 11
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
}

Expand All @@ -51,15 +55,18 @@ message MsgConnectionOpenAck {
(gogoproto.moretags) = "yaml:\"connection_id\""
];
string version = 2;
google.protobuf.Any client_state = 3;
// proof of the initialization the connection on Chain B: `UNITIALIZED ->
// TRYOPEN`
bytes proof_try = 3 [(gogoproto.moretags) = "yaml:\"proof_try\""];
uint64 proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\""];
bytes proof_try = 4 [(gogoproto.moretags) = "yaml:\"proof_try\""];
uint64 proof_height = 5 [(gogoproto.moretags) = "yaml:\"proof_height\""];
// proof of client state included in message
bytes proof_client = 6 [(gogoproto.moretags) = "yaml:\"proof_client\""];
// proof of client consensus state
bytes proof_consensus = 5 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
uint64 consensus_height = 6
bytes proof_consensus = 7 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
uint64 consensus_height = 8
[(gogoproto.moretags) = "yaml:\"consensus_height\""];
bytes signer = 7
bytes signer = 9
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
}

Expand Down
4 changes: 2 additions & 2 deletions simapp/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,15 @@ func CheckBalance(t *testing.T, app *SimApp, addr sdk.AccAddress, balances sdk.C
// returned.
func SignCheckDeliver(
t *testing.T, txGen client.TxConfig, app *bam.BaseApp, header tmproto.Header, msgs []sdk.Msg,
accNums, seq []uint64, expSimPass, expPass bool, priv ...crypto.PrivKey,
chainID string, accNums, seq []uint64, expSimPass, expPass bool, priv ...crypto.PrivKey,
) (sdk.GasInfo, *sdk.Result, error) {

tx, err := helpers.GenTx(
txGen,
msgs,
sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)},
helpers.DefaultGenTxGas,
"",
chainID,
accNums,
seq,
priv...,
Expand Down
12 changes: 6 additions & 6 deletions x/bank/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestSendNotEnoughBalance(t *testing.T) {
sendMsg := types.NewMsgSend(addr1, addr2, sdk.Coins{sdk.NewInt64Coin("foocoin", 100)})
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
txGen := simapp.MakeEncodingConfig().TxConfig
_, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{sendMsg}, []uint64{origAccNum}, []uint64{origSeq}, false, false, priv1)
_, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{sendMsg}, "", []uint64{origAccNum}, []uint64{origSeq}, false, false, priv1)
require.Error(t, err)

simapp.CheckBalance(t, app, addr1, sdk.Coins{sdk.NewInt64Coin("foocoin", 67)})
Expand Down Expand Up @@ -177,7 +177,7 @@ func TestSendToModuleAcc(t *testing.T) {

header := tmproto.Header{Height: app.LastBlockHeight() + 1}
txGen := simapp.MakeEncodingConfig().TxConfig
_, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{test.msg}, []uint64{origAccNum}, []uint64{origSeq}, test.expSimPass, test.expPass, priv1)
_, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{test.msg}, "", []uint64{origAccNum}, []uint64{origSeq}, test.expSimPass, test.expPass, priv1)
if test.expPass {
require.NoError(t, err)
} else {
Expand Down Expand Up @@ -248,7 +248,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) {
for _, tc := range testCases {
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
txGen := simapp.MakeEncodingConfig().TxConfig
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
if tc.expPass {
require.NoError(t, err)
} else {
Expand Down Expand Up @@ -300,7 +300,7 @@ func TestMsgMultiSendMultipleOut(t *testing.T) {
for _, tc := range testCases {
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
txGen := simapp.MakeEncodingConfig().TxConfig
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
require.NoError(t, err)

for _, eb := range tc.expectedBalances {
Expand Down Expand Up @@ -355,7 +355,7 @@ func TestMsgMultiSendMultipleInOut(t *testing.T) {
for _, tc := range testCases {
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
txGen := simapp.MakeEncodingConfig().TxConfig
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
require.NoError(t, err)

for _, eb := range tc.expectedBalances {
Expand Down Expand Up @@ -408,7 +408,7 @@ func TestMsgMultiSendDependent(t *testing.T) {
for _, tc := range testCases {
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
txGen := simapp.MakeEncodingConfig().TxConfig
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
require.NoError(t, err)

for _, eb := range tc.expectedBalances {
Expand Down
10 changes: 10 additions & 0 deletions x/ibc/02-client/exported/exported.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ type ClientState interface {

// State verification functions

VerifyClientState(
store sdk.KVStore,
cdc codec.BinaryMarshaler,
root commitmentexported.Root,
height uint64,
prefix commitmentexported.Prefix,
counterpartyClientIdentifier string,
proof []byte,
clientState ClientState,
) error
VerifyClientConsensusState(
store sdk.KVStore,
cdc codec.BinaryMarshaler,
Expand Down
44 changes: 44 additions & 0 deletions x/ibc/02-client/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ package keeper

import (
"fmt"
"reflect"
"strings"

"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/light"

"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/ibc/02-client/exported"
"github.com/cosmos/cosmos-sdk/x/ibc/02-client/types"
ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/07-tendermint/types"
Expand Down Expand Up @@ -197,6 +200,47 @@ func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height uint64) (exported.
return consensusState, true
}

// ValidateClient validates the client parameters for a client of the running chain
AdityaSripal marked this conversation as resolved.
Show resolved Hide resolved
func (k Keeper) ValidateClient(ctx sdk.Context, clientState exported.ClientState) error {
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
tmClient, ok := clientState.(*ibctmtypes.ClientState)
if !ok {
return sdkerrors.Wrapf(types.ErrInvalidClient, "client must be a Tendermint client, expected: %T, got: %T",
&ibctmtypes.ClientState{}, tmClient)
}

if ctx.ChainID() != tmClient.ChainId {
return sdkerrors.Wrapf(types.ErrInvalidClient, "invalid chain-id. expected: %s, got: %s",
ctx.ChainID(), tmClient.ChainId)
}

if uint64(ctx.BlockHeight()) < tmClient.LatestHeight {
AdityaSripal marked this conversation as resolved.
Show resolved Hide resolved
return sdkerrors.Wrapf(types.ErrInvalidClient, "client has LatestHeight %d greater than chain height %d",
tmClient.LatestHeight, ctx.BlockHeight())
}

expectedProofSpecs := commitmenttypes.GetSDKSpecs()
if !reflect.DeepEqual(expectedProofSpecs, tmClient.ProofSpecs) {
return sdkerrors.Wrapf(types.ErrInvalidClient, "client has invalid proof specs. expected: %v got: %v",
expectedProofSpecs, tmClient.ProofSpecs)
}

if err := light.ValidateTrustLevel(tmClient.TrustLevel.ToTendermint()); err != nil {
return sdkerrors.Wrapf(types.ErrInvalidClient, "trust-level invalid: %v", err)
}

expectedUbdPeriod := k.stakingKeeper.UnbondingTime(ctx)
if expectedUbdPeriod != tmClient.UnbondingPeriod {
return sdkerrors.Wrapf(types.ErrInvalidClient, "invalid unbonding period. expected: %s, got: %s",
expectedUbdPeriod, tmClient.UnbondingPeriod)
}

if tmClient.UnbondingPeriod < tmClient.TrustingPeriod {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently the only check I enforce on TrustingPeriod, should I add others? @cwgoes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so; although some values (almost unbonding period and very very low) are practically unworkable, that should be paid attention to by users or relayers when creating a client

return sdkerrors.Wrapf(types.ErrInvalidClient, "Unbonding period must be greater than trusting period. unbonding period %d < trusting period %d",
AdityaSripal marked this conversation as resolved.
Show resolved Hide resolved
tmClient.UnbondingPeriod, tmClient.TrustingPeriod)
}
return nil
}

// IterateClients provides an iterator over all stored light client State
// objects. For each State object, cb will be called. If the cb returns true,
// the iterator will close and stop.
Expand Down
63 changes: 63 additions & 0 deletions x/ibc/02-client/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ import (
"github.com/cosmos/cosmos-sdk/simapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/ibc/02-client/exported"
clientexported "github.com/cosmos/cosmos-sdk/x/ibc/02-client/exported"
"github.com/cosmos/cosmos-sdk/x/ibc/02-client/keeper"
"github.com/cosmos/cosmos-sdk/x/ibc/02-client/types"
ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/07-tendermint/types"
localhosttypes "github.com/cosmos/cosmos-sdk/x/ibc/09-localhost/types"
commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/23-commitment/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
)
Expand Down Expand Up @@ -117,6 +119,67 @@ func (suite *KeeperTestSuite) TestSetClientConsensusState() {
suite.Require().Equal(suite.consensusState, tmConsState, "ConsensusState not stored correctly")
}

func (suite *KeeperTestSuite) TestValidateClient() {
testCases := []struct {
name string
clientState clientexported.ClientState
expPass bool
}{
{
"success",
ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, uint64(testClientHeight), commitmenttypes.GetSDKSpecs()),
true,
},
{
"invalid client type",
localhosttypes.NewClientState(testChainID, testClientHeight),
false,
},
{
"incorrect chainID",
ibctmtypes.NewClientState("gaiatestnet", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, uint64(testClientHeight), commitmenttypes.GetSDKSpecs()),
false,
},
{
"invalid client height",
ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, uint64(testClientHeight)+10, commitmenttypes.GetSDKSpecs()),
false,
},
{
"invalid proof specs",
ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, uint64(testClientHeight), nil),
false,
},
{
"invalid trust level",
ibctmtypes.NewClientState(testChainID, ibctmtypes.Fraction{0, 1}, trustingPeriod, ubdPeriod, maxClockDrift, uint64(testClientHeight), commitmenttypes.GetSDKSpecs()),
false,
},
{
"invalid unbonding period",
ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+10, maxClockDrift, uint64(testClientHeight), commitmenttypes.GetSDKSpecs()),
false,
},
{
"invalid trusting period",
ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, ubdPeriod+10, ubdPeriod, maxClockDrift, uint64(testClientHeight), commitmenttypes.GetSDKSpecs()),
false,
},
}

ctx := suite.ctx.WithChainID(testChainID)
ctx = ctx.WithBlockHeight(testClientHeight)

for _, tc := range testCases {
err := suite.keeper.ValidateClient(ctx, tc.clientState)
if tc.expPass {
suite.Require().NoError(err, "expected valid client for case: %s, got error: %v", tc.name, err)
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
} else {
suite.Require().Error(err, "expected invalid client for case: %s, ValidatClient passed", tc.name)
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

func (suite KeeperTestSuite) TestGetAllClients() {
clientIDs := []string{
testClientID2, testClientID3, testClientID,
Expand Down
38 changes: 38 additions & 0 deletions x/ibc/02-client/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,41 @@ func UnpackConsensusState(any *codectypes.Any) (exported.ConsensusState, error)

return consensusState, nil
}

// PackClientState constructs a new Any packed with the given client state value. It returns
// an error if the client state can't be casted to a protobuf message or if the concrete
// implemention is not registered to the protobuf codec.
func PackClientState(clientState exported.ClientState) (*codectypes.Any, error) {
AdityaSripal marked this conversation as resolved.
Show resolved Hide resolved
msg, ok := clientState.(proto.Message)
if !ok {
return nil, fmt.Errorf("cannot proto marshal %T", clientState)
}

anyClientState, err := codectypes.NewAnyWithValue(msg)
if err != nil {
return nil, err
}

return anyClientState, nil
}

// MustPackClientState calls PackClientState and panics on error.
func MustPackClientState(clientState exported.ClientState) *codectypes.Any {
anyClientState, err := PackClientState(clientState)
if err != nil {
panic(err)
}

return anyClientState
}

// UnpackClientState unpacks an Any into a ClientState. It returns an error if the
// consensus state can't be unpacked into a ClientState.
func UnpackClientState(any *codectypes.Any) (exported.ClientState, error) {
clientState, ok := any.GetCachedValue().(exported.ClientState)
if !ok {
return nil, fmt.Errorf("cannot unpack Any into ClientState %T", any)
}

return clientState, nil
}
36 changes: 19 additions & 17 deletions x/ibc/02-client/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ import (
// IBC client sentinel errors
var (
ErrClientExists = sdkerrors.Register(SubModuleName, 2, "light client already exists")
ErrClientNotFound = sdkerrors.Register(SubModuleName, 3, "light client not found")
ErrClientFrozen = sdkerrors.Register(SubModuleName, 4, "light client is frozen due to misbehaviour")
ErrConsensusStateNotFound = sdkerrors.Register(SubModuleName, 5, "consensus state not found")
ErrInvalidConsensus = sdkerrors.Register(SubModuleName, 6, "invalid consensus state")
ErrClientTypeNotFound = sdkerrors.Register(SubModuleName, 7, "client type not found")
ErrInvalidClientType = sdkerrors.Register(SubModuleName, 8, "invalid client type")
ErrRootNotFound = sdkerrors.Register(SubModuleName, 9, "commitment root not found")
ErrInvalidHeader = sdkerrors.Register(SubModuleName, 10, "invalid client header")
ErrInvalidEvidence = sdkerrors.Register(SubModuleName, 11, "invalid light client misbehaviour evidence")
ErrFailedClientConsensusStateVerification = sdkerrors.Register(SubModuleName, 12, "client consensus state verification failed")
ErrFailedConnectionStateVerification = sdkerrors.Register(SubModuleName, 13, "connection state verification failed")
ErrFailedChannelStateVerification = sdkerrors.Register(SubModuleName, 14, "channel state verification failed")
ErrFailedPacketCommitmentVerification = sdkerrors.Register(SubModuleName, 15, "packet commitment verification failed")
ErrFailedPacketAckVerification = sdkerrors.Register(SubModuleName, 16, "packet acknowledgement verification failed")
ErrFailedPacketAckAbsenceVerification = sdkerrors.Register(SubModuleName, 17, "packet acknowledgement absence verification failed")
ErrFailedNextSeqRecvVerification = sdkerrors.Register(SubModuleName, 18, "next sequence receive verification failed")
ErrSelfConsensusStateNotFound = sdkerrors.Register(SubModuleName, 19, "self consensus state not found")
ErrInvalidClient = sdkerrors.Register(SubModuleName, 3, "light client is invalid")
ErrClientNotFound = sdkerrors.Register(SubModuleName, 4, "light client not found")
ErrClientFrozen = sdkerrors.Register(SubModuleName, 5, "light client is frozen due to misbehaviour")
ErrConsensusStateNotFound = sdkerrors.Register(SubModuleName, 6, "consensus state not found")
ErrInvalidConsensus = sdkerrors.Register(SubModuleName, 7, "invalid consensus state")
ErrClientTypeNotFound = sdkerrors.Register(SubModuleName, 8, "client type not found")
ErrInvalidClientType = sdkerrors.Register(SubModuleName, 9, "invalid client type")
ErrRootNotFound = sdkerrors.Register(SubModuleName, 10, "commitment root not found")
ErrInvalidHeader = sdkerrors.Register(SubModuleName, 11, "invalid client header")
ErrInvalidEvidence = sdkerrors.Register(SubModuleName, 12, "invalid light client misbehaviour evidence")
ErrFailedClientStateVerification = sdkerrors.Register(SubModuleName, 13, "client state verification failed")
ErrFailedClientConsensusStateVerification = sdkerrors.Register(SubModuleName, 14, "client consensus state verification failed")
ErrFailedConnectionStateVerification = sdkerrors.Register(SubModuleName, 15, "connection state verification failed")
ErrFailedChannelStateVerification = sdkerrors.Register(SubModuleName, 16, "channel state verification failed")
ErrFailedPacketCommitmentVerification = sdkerrors.Register(SubModuleName, 17, "packet commitment verification failed")
ErrFailedPacketAckVerification = sdkerrors.Register(SubModuleName, 18, "packet acknowledgement verification failed")
ErrFailedPacketAckAbsenceVerification = sdkerrors.Register(SubModuleName, 19, "packet acknowledgement absence verification failed")
ErrFailedNextSeqRecvVerification = sdkerrors.Register(SubModuleName, 20, "next sequence receive verification failed")
ErrSelfConsensusStateNotFound = sdkerrors.Register(SubModuleName, 21, "self consensus state not found")
)
Loading