Cosmos-sdk: IBC ordered channels cause "sequence acknowledgement not found"

Created on 25 Aug 2020  路  4Comments  路  Source: cosmos/cosmos-sdk

Summary of Bug

When I setup a channel between mychannel:myport and myotherchannel:myotherport all works fine with UNORDERED but fails with type ORDERED due to an sequence acknowledgement not found error. /cc @cwgoes

The full stacktrace is:

workspace/go/pkg/mod/github.com/cosmos/[email protected]/x/ibc/04-channel/keeper/packet.go:408
github.com/cosmos/cosmos-sdk/x/ibc.NewHandler.func1
    workspace/go/pkg/mod/github.com/cosmos/[email protected]/x/ibc/handler.go:215
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runMsgs
    workspace/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/baseapp.go:631
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx
    workspace/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/baseapp.go:592
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Simulate
    workspace/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/helpers.go:14
github.com/cosmos/cosmos-sdk/simapp.SignCheckDeliver
    workspace/go/pkg/mod/github.com/cosmos/[email protected]/simapp/test_helpers.go:340
github.com/CosmWasm/wasmd/x/wasm/ibc_testing.(*TestChain).SendMsgs
    workspace/cosmwasm/wasmd/x/wasm/ibc_testing/chain.go:233
github.com/CosmWasm/wasmd/x/wasm/ibc_testing.(*TestChain).sendMsgs
    workspace/cosmwasm/wasmd/x/wasm/ibc_testing/chain.go:226
github.com/CosmWasm/wasmd/x/wasm/ibc_testing.(*Coordinator).SendMsgs
    workspace/cosmwasm/wasmd/x/wasm/ibc_testing/coordinator.go:320
github.com/CosmWasm/wasmd/x/wasm/ibc_testing.(*Coordinator).AcknowledgePacket
    workspace/cosmwasm/wasmd/x/wasm/ibc_testing/coordinator.go:289
github.com/CosmWasm/wasmd/x/wasm_test.TestFromIBCTransferToContract
    workspace/cosmwasm/wasmd/x/wasm/relay_test.go:55
failed to execute message; message index: 0: acknowledge packet verification failed: destination port: wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5, destination channel: testchain1connectionid00: sequence acknowledgement not found

Please note that I use a modified ibc-testing package for the wasmd tests so that channel names and ports are different on both chains.
https://github.com/CosmWasm/wasmd/pull/253/files#diff-5bcdaadb61f3ce7b87bcb8347fc82b36R38

Version

f02b0b574501


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
bug ibc

Most helpful comment

Nice! Hope the testing package has been fine to use. This is a bug that was uncaught before because the channel/port id's where identical on different chains.

The next sequence ack check should use the source port id and channel id and not the dest port id and channel id

Thanks for finding this!

All 4 comments

Nice! Hope the testing package has been fine to use. This is a bug that was uncaught before because the channel/port id's where identical on different chains.

The next sequence ack check should use the source port id and channel id and not the dest port id and channel id

Thanks for finding this!

Nice! Hope the testing package has been fine to use. This is a bug that was uncaught before because the channel/port id's where identical on different chains.

The next sequence ack check should use the source port id and channel id and not the dest port id and channel id

Thanks for finding this!

Hmm? This is PacketExecuted, called when a packet is received, right? The destination port & channel identifiers are the correct ones to use, since we're receiving the packet.

Hmm? This is PacketExecuted, called when a packet is received, right? The destination port & channel identifiers are the correct ones to use, since we're receiving the packet.

ah whoops I added the wrong permalink. Updated

Hmm? This is PacketExecuted, called when a packet is received, right? The destination port & channel identifiers are the correct ones to use, since we're receiving the packet.

ah whoops I added the wrong permalink. Updated

Ah yes, that line should be changed, I just checked the spec and I believe it is correct there (source port / source channel).

Was this page helpful?
0 / 5 - 0 ratings