Skip to content

Packet timeout timestamp at IBC is not updated until next TX  #10429

Closed
@RaulBernal

Description

Summary of Bug

The field value timeout_timestamp is not recalculated properly.
Until a new valid TX is generated, the value of the field is not recalculated.
This causes invalid packets if a valid TX is not sent within 10 minutes (default value of the timeout).

Version

From SDK v.0.42.x to v.0.44.x
Tested in

  • Osmosis v.4.1.0 cosmos_sdk_version: v0.42.9
  • BitCanna v.1.2 cosmos sdk_version: v.0.44.2

Steps to Reproduce

$date
Mon Oct 25 08:00:40 UTC 2021
$ bcnad tx ibc-transfer transfer transfer channel-1 osmo1skyy4yhejshhs9rv67fl2dswnlhk3mfugvr7sv 69ubcna  --gas auto --gas-prices 0.001ubcna --gas-adjustment 1.5  --from validator  --packet-timeout-timestamp 600000000000
Enter keyring passphrase:
gas estimate: 102783
{"body":{"messages":[{"@type":"/ibc.applications.transfer.v1.MsgTransfer","source_port":"transfer","source_channel":"channel-1","token":{"denom":"ubcna","amount":"69"},"sender":"bcna1606cfyw6q60umn9zvv5j77ds896r5wqsajy0af","receiver":"osmo1skyy4yhejshhs9rv67fl2dswnlhk3mfugvr7sv","timeout_height":{"revision_number":"1","revision_height":"1724774"},"timeout_timestamp":"1635148912350984020"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"ubcna","amount":"103"}],"gas_limit":"102783","payer":"","granter":""}},"signatures":[]}

confirm transaction before signing and broadcasting [y/N]: n
cancelled transaction
$ date
Mon Oct 25 08:01:04 UTC 2021
$ bcnad tx ibc-transfer transfer transfer channel-1 osmo1skyy4yhejshhs9rv67fl2dswnlhk3mfugvr7sv 69ubcna  --gas auto --gas-prices 0.001ubcna --gas-adjustment 1.5  --from validator  --packet-timeout-timestamp 600000000000
Enter keyring passphrase:
gas estimate: 102783
{"body":{"messages":[{"@type":"/ibc.applications.transfer.v1.MsgTransfer","source_port":"transfer","source_channel":"channel-1","token":{"denom":"ubcna","amount":"69"},"sender":"bcna1606cfyw6q60umn9zvv5j77ds896r5wqsajy0af","receiver":"osmo1skyy4yhejshhs9rv67fl2dswnlhk3mfugvr7sv","timeout_height":{"revision_number":"1","revision_height":"1724774"},"timeout_timestamp":"1635148912350984020"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[{"denom":"ubcna","amount":"103"}],"gas_limit":"102783","payer":"","granter":""}},"signatures":[]}

confirm transaction before signing and broadcasting [y/N]: n

We get this error on relayer:
I[2021-10-25|08:02:09.671] ✘ [osmosis-1]@{1723868} - msg(0:/ibc.core.client.v1.MsgUpdateClient,1:/ibc.core.channel.v1.MsgRecvPacket) err(channel:14:failed to execute message; message index: 1: receive packet verification failed: block timestamp >= packet timeout timestamp (2021-10-25 08:02:00.472031016 +0000 UTC >= 2021-10-25 08:01:52.35098402 +0000 UTC): packet timeout)

The same for osmosisd

$ osmosisd tx ibc-transfer transfer transfer channel-51 bcna1606cfyw6q60umn9zvv5j77ds896r5wqsajy0af 1uosmo --from test
Enter keyring passphrase:
{"body":{"messages":[{"@type":"/ibc.applications.transfer.v1.MsgTransfer","source_port":"transfer","source_channel":"channel-51","token":{"denom":"uosmo","amount":"1"},"sender":"osmo1skyy4yhejshhs9rv67fl2dswnlhk3mfugvr7sv","receiver":"bcna1606cfyw6q60umn9zvv5j77ds896r5wqsajy0af","timeout_height":{"revision_number":"1","revision_height":"371458"},"timeout_timestamp":"1635148630217372060"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}

confirm transaction before signing and broadcasting [y/N]: n
cancelled transaction

$ osmosisd tx ibc-transfer transfer transfer channel-51 bcna1606cfyw6q60umn9zvv5j77ds896r5wqsajy0af 1uosmo --from test
Enter keyring passphrase:
{"body":{"messages":[{"@type":"/ibc.applications.transfer.v1.MsgTransfer","source_port":"transfer","source_channel":"channel-51","token":{"denom":"uosmo","amount":"1"},"sender":"osmo1skyy4yhejshhs9rv67fl2dswnlhk3mfugvr7sv","receiver":"bcna1606cfyw6q60umn9zvv5j77ds896r5wqsajy0af","timeout_height":{"revision_number":"1","revision_height":"371458"},"timeout_timestamp":"1635148630217372060"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}

confirm transaction before signing and broadcasting [y/N]: n
cancelled transaction
$ osmosisd tx ibc-transfer transfer transfer channel-51 bcna1606cfyw6q60umn9zvv5j77ds896r5wqsajy0af 1uosmo --from test
Enter keyring passphrase:
incorrect passphrase
Enter keyring passphrase:
{"body":{"messages":[{"@type":"/ibc.applications.transfer.v1.MsgTransfer","source_port":"transfer","source_channel":"channel-51","token":{"denom":"uosmo","amount":"1"},"sender":"osmo1skyy4yhejshhs9rv67fl2dswnlhk3mfugvr7sv","receiver":"bcna1606cfyw6q60umn9zvv5j77ds896r5wqsajy0af","timeout_height":{"revision_number":"1","revision_height":"371458"},"timeout_timestamp":"1635148630217372060"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}

confirm transaction before signing and broadcasting [y/N]: y

The TX timeout value was 14 minutes in the past
E[2021-10-25|08:12:10.254] - [bitcanna-1] -> err(rpc error: code = InvalidArgument desc = failed to execute message; message index: 1: receive packet verification failed: block timestamp >= packet timeout timestamp (2021-10-25 08:12:03.465933869 +0000 UTC >= 2021-10-25 07:57:10.21737206 +0000 UTC): packet timeout: invalid request)


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions