diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/proto/cosmos/base/abci/v1beta1/abci.proto index 78ec725946..554337de39 100644 --- a/proto/cosmos/base/abci/v1beta1/abci.proto +++ b/proto/cosmos/base/abci/v1beta1/abci.proto @@ -120,22 +120,13 @@ message SearchTxsResult { option (gogoproto.stringer) = true; // Count of all txs - uint64 total_count = 1 [ - (gogoproto.moretags) = "yaml:\"total_count\"", - (gogoproto.jsontag) = "total_count" - ]; + uint64 total_count = 1 [(gogoproto.moretags) = "yaml:\"total_count\"", (gogoproto.jsontag) = "total_count"]; // Count of txs in current page uint64 count = 2; // Index of current page, start from 1 - uint64 page_number = 3 [ - (gogoproto.moretags) = "yaml:\"page_number\"", - (gogoproto.jsontag) = "page_number" - ]; + uint64 page_number = 3 [(gogoproto.moretags) = "yaml:\"page_number\"", (gogoproto.jsontag) = "page_number"]; // Count of total pages - uint64 page_total = 4 [ - (gogoproto.moretags) = "yaml:\"page_total\"", - (gogoproto.jsontag) = "page_total" - ]; + uint64 page_total = 4 [(gogoproto.moretags) = "yaml:\"page_total\"", (gogoproto.jsontag) = "page_total"]; // Max count txs per page uint64 limit = 5; // List of txs in current page diff --git a/types/abci.pb.go b/types/abci.pb.go index b410a36f80..cc4a54055f 100644 --- a/types/abci.pb.go +++ b/types/abci.pb.go @@ -507,7 +507,7 @@ type SearchTxsResult struct { // Index of current page, start from 1 PageNumber uint64 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number" yaml:"page_number"` // Count of total pages - PageTotal uint64 `protobuf:"varint,4,opt,name=page_total,json=pageTotal,proto3" json:"page_total" yaml:"page_total",json:"page_total"` + PageTotal uint64 `protobuf:"varint,4,opt,name=page_total,json=pageTotal,proto3" json:"page_total" yaml:"page_total"` // Max count txs per page Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` // List of txs in current page @@ -606,66 +606,65 @@ func init() { } var fileDescriptor_4e37629bc7eb0df8 = []byte{ - // 932 bytes of a gzipped FileDescriptorProto + // 922 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0x31, 0x73, 0x1b, 0x45, 0x14, 0xd6, 0x49, 0xca, 0xc9, 0x7a, 0x72, 0x30, 0x2c, 0x26, 0x39, 0x27, 0xa0, 0x13, 0xe7, 0x64, - 0x46, 0x05, 0x9c, 0x26, 0x4e, 0xc2, 0x30, 0x2e, 0x18, 0xa2, 0x40, 0x88, 0x67, 0x12, 0x8a, 0xb5, - 0x32, 0xcc, 0xd0, 0x68, 0x56, 0xd2, 0x66, 0x75, 0x89, 0xee, 0x56, 0x73, 0xbb, 0xb2, 0xe5, 0x8e, - 0x92, 0x92, 0x2a, 0x05, 0x15, 0x35, 0xbf, 0x24, 0xa5, 0xcb, 0x14, 0xcc, 0x41, 0xec, 0x2e, 0xa5, - 0x7f, 0x01, 0xb3, 0x6f, 0xcf, 0xd2, 0x09, 0x46, 0xa9, 0xb4, 0xdf, 0xf7, 0xde, 0xbe, 0x7d, 0xfb, - 0x7d, 0x4f, 0x7b, 0xb0, 0x3b, 0x94, 0x2a, 0x96, 0xaa, 0x33, 0x60, 0x8a, 0x77, 0xd8, 0x60, 0x18, - 0x75, 0x8e, 0xee, 0x0c, 0xb8, 0x66, 0x77, 0x10, 0x84, 0xd3, 0x54, 0x6a, 0x49, 0x3c, 0x9b, 0x14, - 0x9a, 0xa4, 0x10, 0xf9, 0x3c, 0xe9, 0xc6, 0xb6, 0x90, 0x42, 0x62, 0x52, 0xc7, 0xac, 0x6c, 0xfe, - 0x8d, 0x9b, 0x9a, 0x27, 0x23, 0x9e, 0xc6, 0x51, 0xa2, 0x6d, 0x4d, 0x7d, 0x32, 0xe5, 0x2a, 0x0f, - 0xee, 0x08, 0x29, 0xc5, 0x84, 0x77, 0x10, 0x0d, 0x66, 0xcf, 0x3b, 0x2c, 0x39, 0xb1, 0xa1, 0xe0, - 0x55, 0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0xd8, 0xa9, 0x21, 0xb7, 0x08, 0x07, 0x00, 0x00, } func (m *TxResponse) Marshal() (dAtA []byte, err error) { diff --git a/x/ibc/02-client/client/utils/utils.go b/x/ibc/02-client/client/utils/utils.go index 3740333c00..fb3c060462 100644 --- a/x/ibc/02-client/client/utils/utils.go +++ b/x/ibc/02-client/client/utils/utils.go @@ -8,6 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types" ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/07-tendermint/types" commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/23-commitment/types" @@ -44,6 +45,11 @@ func QueryClientStateABCI( return nil, err } + // check if client exists + if len(value) == 0 { + return nil, sdkerrors.Wrap(types.ErrClientNotFound, clientID) + } + cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) clientState, err := types.UnmarshalClientState(cdc, value) @@ -92,6 +98,11 @@ func QueryConsensusStateABCI( return nil, err } + // check if consensus state exists + if len(value) == 0 { + return nil, sdkerrors.Wrap(types.ErrConsensusStateNotFound, clientID) + } + cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) cs, err := types.UnmarshalConsensusState(cdc, value) diff --git a/x/ibc/03-connection/client/utils/utils.go b/x/ibc/03-connection/client/utils/utils.go index d4f55ea184..3e8eb823da 100644 --- a/x/ibc/03-connection/client/utils/utils.go +++ b/x/ibc/03-connection/client/utils/utils.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clientutils "github.com/cosmos/cosmos-sdk/x/ibc/02-client/client/utils" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types" "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types" @@ -44,6 +45,11 @@ func queryConnectionABCI(clientCtx client.Context, connectionID string) (*types. return nil, err } + // check if connection exists + if len(value) == 0 { + return nil, sdkerrors.Wrap(types.ErrConnectionNotFound, connectionID) + } + cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) var connection types.ConnectionEnd @@ -80,6 +86,11 @@ func queryClientConnectionsABCI(clientCtx client.Context, clientID string) (*typ return nil, err } + // check if connection paths exist + if len(value) == 0 { + return nil, sdkerrors.Wrap(types.ErrClientConnectionPathsNotFound, clientID) + } + var paths []string if err := clientCtx.LegacyAmino.UnmarshalBinaryBare(value, paths); err != nil { return nil, err diff --git a/x/ibc/03-connection/keeper/handshake.go b/x/ibc/03-connection/keeper/handshake.go index 5ac2c926f2..a4acc5801d 100644 --- a/x/ibc/03-connection/keeper/handshake.go +++ b/x/ibc/03-connection/keeper/handshake.go @@ -89,7 +89,7 @@ func (k Keeper) ConnOpenTry( } // connection defines chain B's ConnectionEnd - connection := types.NewConnectionEnd(types.UNINITIALIZED, clientID, counterparty, []string{version}) + connection := types.NewConnectionEnd(types.TRYOPEN, clientID, counterparty, []string{version}) // Check that ChainA committed expectedConnectionEnd to its state if err := k.VerifyConnectionState( @@ -124,8 +124,7 @@ func (k Keeper) ConnOpenTry( return sdkerrors.Wrap(types.ErrInvalidConnection, "cannot relay connection attempt") } - // Set connection state to TRYOPEN and store in chainB state - connection.State = types.TRYOPEN + // store connection in chainB state if err := k.addConnectionToClient(ctx, clientID, connectionID); err != nil { return sdkerrors.Wrapf(err, "failed to add connection with ID %s to client with ID %s", connectionID, clientID) } diff --git a/x/ibc/04-channel/client/utils/utils.go b/x/ibc/04-channel/client/utils/utils.go index 4b37dac991..582924d297 100644 --- a/x/ibc/04-channel/client/utils/utils.go +++ b/x/ibc/04-channel/client/utils/utils.go @@ -46,6 +46,11 @@ func queryPacketCommitmentABCI( return nil, err } + // check if packet commitment exists + if len(value) == 0 { + return nil, sdkerrors.Wrapf(types.ErrPacketCommitmentNotFound, "portID (%s), channelID (%s), sequence (%d)", portID, channelID, sequence) + } + // TODO: retrieve epoch number from chain-id return types.NewQueryPacketCommitmentResponse(portID, channelID, sequence, value, proofBz, proofHeight), nil } @@ -77,6 +82,11 @@ func queryChannelABCI(clientCtx client.Context, portID, channelID string) (*type return nil, err } + // check if channel exists + if len(value) == 0 { + return nil, sdkerrors.Wrapf(types.ErrChannelNotFound, "portID (%s), channelID (%s)", portID, channelID) + } + cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) var channel types.Channel @@ -213,6 +223,11 @@ func queryNextSequenceRecvABCI(clientCtx client.Context, portID, channelID strin return nil, err } + // check if next sequence receive exists + if len(value) == 0 { + return nil, sdkerrors.Wrapf(types.ErrChannelNotFound, "portID (%s), channelID (%s)", portID, channelID) + } + sequence := binary.BigEndian.Uint64(value) // TODO: retrieve epoch number from chain-id diff --git a/x/ibc/04-channel/keeper/handshake.go b/x/ibc/04-channel/keeper/handshake.go index fd87c15ab6..312f88bdd9 100644 --- a/x/ibc/04-channel/keeper/handshake.go +++ b/x/ibc/04-channel/keeper/handshake.go @@ -53,10 +53,6 @@ func (k Keeper) ChanOpenInit( return nil, sdkerrors.Wrap(connectiontypes.ErrConnectionNotFound, connectionHops[0]) } - if connectionEnd.GetState() == int32(connectiontypes.UNINITIALIZED) { - return nil, connectiontypes.ErrInvalidConnectionState - } - if len(connectionEnd.GetVersions()) != 1 { return nil, sdkerrors.Wrapf( connectiontypes.ErrInvalidVersion, diff --git a/x/ibc/04-channel/keeper/handshake_test.go b/x/ibc/04-channel/keeper/handshake_test.go index f2490568e5..77ef950a1a 100644 --- a/x/ibc/04-channel/keeper/handshake_test.go +++ b/x/ibc/04-channel/keeper/handshake_test.go @@ -45,18 +45,6 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { suite.Require().NotNil(connA) suite.Require().NotNil(connB) }, false}, - {"connection is UNINITIALIZED", func() { - // any non-nil values of connA and connB are acceptable - suite.Require().NotNil(connA) - suite.Require().NotNil(connB) - - // set connection as UNINITIALIZED - counterparty := connectiontypes.NewCounterparty(clientIDB, connIDA, suite.chainB.GetPrefix()) - connection := connectiontypes.NewConnectionEnd(connectiontypes.UNINITIALIZED, clientIDA, counterparty, []string{ibctesting.ConnectionVersion}) - suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainA.GetContext(), connA.ID, connection) - - portCap = nil - }, false}, {"capability is incorrect", func() { _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) features = []string{"ORDER_ORDERED", "ORDER_UNORDERED"} diff --git a/x/ibc/04-channel/keeper/packet.go b/x/ibc/04-channel/keeper/packet.go index 1378703e8f..e96c7a53e3 100644 --- a/x/ibc/04-channel/keeper/packet.go +++ b/x/ibc/04-channel/keeper/packet.go @@ -62,14 +62,6 @@ func (k Keeper) SendPacket( return sdkerrors.Wrap(connectiontypes.ErrConnectionNotFound, channel.ConnectionHops[0]) } - // NOTE: assume UNINITIALIZED is a closed connection - if connectionEnd.GetState() == int32(connectiontypes.UNINITIALIZED) { - return sdkerrors.Wrap( - connectiontypes.ErrInvalidConnectionState, - "connection is UNINITIALIZED", - ) - } - clientState, found := k.clientKeeper.GetClientState(ctx, connectionEnd.GetClientID()) if !found { return clienttypes.ErrConsensusStateNotFound diff --git a/x/ibc/04-channel/keeper/packet_test.go b/x/ibc/04-channel/keeper/packet_test.go index 923b5fbac2..8b9dae07a2 100644 --- a/x/ibc/04-channel/keeper/packet_test.go +++ b/x/ibc/04-channel/keeper/packet_test.go @@ -5,7 +5,6 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types" - connectiontypes "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types" "github.com/cosmos/cosmos-sdk/x/ibc/04-channel/types" host "github.com/cosmos/cosmos-sdk/x/ibc/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/exported" @@ -100,24 +99,6 @@ func (suite *KeeperTestSuite) TestSendPacket() { suite.chainA.CreateChannelCapability(channelA.PortID, channelA.ID) channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, - {"connection is UNINITIALIZED", func() { - // set connection as UNINITIALIZED - counterparty := connectiontypes.NewCounterparty(clientIDB, connIDA, suite.chainB.GetPrefix()) - connection := connectiontypes.NewConnectionEnd(connectiontypes.UNINITIALIZED, clientIDA, counterparty, []string{ibctesting.ConnectionVersion}) - suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainA.GetContext(), connIDA, connection) - - channelA := ibctesting.TestChannel{PortID: portID, ID: channelIDA} - channelB := ibctesting.TestChannel{PortID: portID, ID: channelIDB} - // pass channel check - suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel( - suite.chainA.GetContext(), - channelA.PortID, channelA.ID, - types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(channelB.PortID, channelB.ID), []string{connIDA}, channelA.Version), - ) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - suite.chainA.CreateChannelCapability(channelA.PortID, channelA.ID) - channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) - }, false}, {"client state not found", func() { _, _, connA, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) diff --git a/x/ibc/04-channel/types/errors.go b/x/ibc/04-channel/types/errors.go index a944dd0e7b..2fb51bc4a8 100644 --- a/x/ibc/04-channel/types/errors.go +++ b/x/ibc/04-channel/types/errors.go @@ -22,4 +22,5 @@ var ( ErrTooManyConnectionHops = sdkerrors.Register(SubModuleName, 15, "too many connection hops") ErrAcknowledgementTooLong = sdkerrors.Register(SubModuleName, 16, "acknowledgement too long") ErrInvalidAcknowledgement = sdkerrors.Register(SubModuleName, 17, "invalid acknowledgement") + ErrPacketCommitmentNotFound = sdkerrors.Register(SubModuleName, 18, "packet commitment not found") )