cosmos / ibc-rs

Rust implementation of the Inter-Blockchain Communication (IBC) protocol.
Apache License 2.0
182 stars 73 forks source link

fix(ibc-core): reject packets with no timeouts in `send_packet_validate` #1205

Closed rnbguy closed 2 months ago

rnbguy commented 2 months ago

Closes: #1198

Description

send_packet_validate should reject packets that have neither timeout height nor timestamp.

Reference to ICS04 spec.


PR author checklist:

Reviewer checklist:

rnbguy commented 2 months ago

Looks like these two tests (without any timeout) are expected to pass.

https://github.com/cosmos/ibc-rs/blob/16666c2c62d0f075b573aa6b94d34c5b6bceadfd/ibc-testkit/tests/core/router.rs#L347-L359

Judging by the impl TryFrom<RawMsgTransfer> for MsgTransfer, this should have failed

https://github.com/cosmos/ibc-rs/blob/16666c2c62d0f075b573aa6b94d34c5b6bceadfd/ibc-apps/ics20-transfer/types/src/msgs/transfer.rs#L65-L67

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.45%. Comparing base (30a295c) to head (f2c1a42).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1205 +/- ## ========================================== + Coverage 64.44% 64.45% +0.01% ========================================== Files 229 229 Lines 22051 22055 +4 ========================================== + Hits 14210 14215 +5 + Misses 7841 7840 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.