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

IBC ordered channels cause "sequence acknowledgement not found" #7156

Closed
4 tasks
alpe opened this issue Aug 25, 2020 · 4 comments · Fixed by #7170
Closed
4 tasks

IBC ordered channels cause "sequence acknowledgement not found" #7156

alpe opened this issue Aug 25, 2020 · 4 comments · Fixed by #7170
Assignees
Labels

Comments

@alpe
Copy link
Contributor

alpe commented Aug 25, 2020

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/cosmos-sdk@v0.34.4-0.20200819073641-f02b0b574501/x/ibc/04-channel/keeper/packet.go:408
github.com/cosmos/cosmos-sdk/x/ibc.NewHandler.func1
    workspace/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20200819073641-f02b0b574501/x/ibc/handler.go:215
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runMsgs
    workspace/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20200819073641-f02b0b574501/baseapp/baseapp.go:631
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx
    workspace/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20200819073641-f02b0b574501/baseapp/baseapp.go:592
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).Simulate
    workspace/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20200819073641-f02b0b574501/baseapp/helpers.go:14
github.com/cosmos/cosmos-sdk/simapp.SignCheckDeliver
    workspace/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20200819073641-f02b0b574501/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
@colin-axner
Copy link
Contributor

colin-axner commented Aug 25, 2020

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!

@colin-axner colin-axner added this to the IBC 1.0 milestone Aug 25, 2020
@cwgoes
Copy link
Contributor

cwgoes commented Aug 25, 2020

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.

@colin-axner
Copy link
Contributor

colin-axner commented Aug 25, 2020

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

@cwgoes
Copy link
Contributor

cwgoes commented Aug 26, 2020

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants