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

imp(testkit): integration test for packet timeout #1215

Merged
merged 21 commits into from
May 10, 2024

Conversation

rnbguy
Copy link
Collaborator

@rnbguy rnbguy commented May 6, 2024

Closes: #398
Closes: #1217

Description

Integration tests for:

  • Packet timeout.
  • Packet timeout on channel close.

Also, reproduces the bug from #1217.

The latest branch from basecoin-rs now has non-membership proofs for its IAVL tree.

This PR adds a packet timeout scenario to our existing integration test. This exercises non-membership proof for the Tendermint light client.


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests.
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@rnbguy rnbguy changed the title Rano/testkit/packet timeout imp(testkit): integration test for packet timeout May 6, 2024
@rnbguy
Copy link
Collaborator Author

rnbguy commented May 6, 2024

Let's merge this only after informalsystems/basecoin-rs#141 is merged.

Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 98.22695% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 67.31%. Comparing base (4ea4dcb) to head (7787301).

Files Patch % Lines
ibc-testkit/src/relayer/integration.rs 93.33% 3 Missing ⚠️
ibc-testkit/src/relayer/context.rs 99.38% 1 Missing ⚠️
ibc-testkit/src/relayer/utils.rs 98.64% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1215      +/-   ##
==========================================
+ Coverage   66.34%   67.31%   +0.97%     
==========================================
  Files         234      234              
  Lines       23328    23553     +225     
==========================================
+ Hits        15477    15855     +378     
+ Misses       7851     7698     -153     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rnbguy rnbguy requested a review from seanchen1991 May 9, 2024 13:25
@rnbguy rnbguy marked this pull request as ready for review May 9, 2024 13:25
@@ -356,4 +356,183 @@ where
signer,
)
}

/// Timeouts a packet from the first context to the second context.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This language is a bit ambiguous when it comes to delineating whether a packet sent between the two contexts was expired, or if an actual timeout packet was sent.

The code seems to indicate the latter, in which case we should say "Sends a timeout packet from the first context to the second context."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. I updated the comments and the method names.

3abc78e

@rnbguy rnbguy force-pushed the rano/testkit/packet-timeout branch from 3abc78e to 7787301 Compare May 10, 2024 11:01
@seanchen1991 seanchen1991 added this pull request to the merge queue May 10, 2024
Merged via the queue into main with commit 4eba9e1 May 10, 2024
19 checks passed
@seanchen1991 seanchen1991 deleted the rano/testkit/packet-timeout branch May 10, 2024 14:53
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
* use basecoin rev

* rm RevertibleStore and GrowingStore use

* add packet timeout integration test

this verifies non-membership proofs

* reorder imports

* add timeout_packet_on_channel_close_on_a in utils

* add timeout_packet_on_channel_close_on_a in context

* test for packet timeout on channel close

* use correct event type

* validate packet events

* rm dbg

* add send_packet_via_dummy_transfer_module_on_a method

* use the new method

* add changelog entry

* update doc links

* fix link in doc-strings

* fix for serde feature

* basecoin main branch

* fix unused imports

* cargo format

* fix link in doc-strings

* fix method names and comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants