forked from Sovereign-Labs/sovereign-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: ibc module testing suite and implementation #4
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plafer
reviewed
Sep 15, 2023
module-system/module-implementations/sov-ibc/src/context/clients.rs
Outdated
Show resolved
Hide resolved
plafer
reviewed
Sep 15, 2023
module-system/module-implementations/sov-ibc/src/context/clients.rs
Outdated
Show resolved
Hide resolved
plafer
reviewed
Sep 20, 2023
module-system/module-implementations/sov-ibc/src/test_utils/sovereign/app.rs
Outdated
Show resolved
Hide resolved
module-system/module-implementations/sov-ibc/src/test_utils/sovereign/app.rs
Outdated
Show resolved
Hide resolved
Critical ICS-20 tests we need: Test sending tokens with the same name
Test receiving a token where its IBC denom is the same as an existing token on the chain
We also want to ensure that the amount of EXISTING TOKEN was unchanged throughout this whole interaction. |
plafer
approved these changes
Sep 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
In this PR, a comprehensive test suite has been established, encompassing the setup of mock Sovereign SDK chain, Cosmos chain, and a relayer, all organized under the
test_utils
module.These components enable us to instantiate a versatile testing environment capable of accommodating various cases that can be plugged into the tests under the
tests.rs
module.Design Approach
The approach taken in developing this test suite closely aligns with the methodology employed in the implementation of
relayer-cosmos-mock
as presented in this PR.This enables us to harness the capabilities of the
relayer-next
framework in future work, where we can implement interfaces onMockRelayer
and take advantage of blanket and default implementations, as well as leverage the pre-existing components available there. This eventually will facilitate the integration of the entire IBC system, particularly when dealing with complex testing scenarios.Featured tests
Within the context of this PR, we cover the following scenarios for mock sovereign chains:
More comprehensive and thorough tests, (as suggested by @plafer here) can be deferred to a subsequent PR to maintain a manageable scope.
To be handled
Transfer
struct are currently made public. However, oncesov-transfer
is merged intosov-ibc
, these fields can be reverted to their original non-public state. Should be noted that thetransfer
module depends onibc-core
and is not usable by other modules independently.basecoin-rs
application and store types, which should ideally be decoupled after developing a new mock module inibc-rs
.