-
Notifications
You must be signed in to change notification settings - Fork 170
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
fix: fix the inflows sum adding when sender chain is source chain #2417
Conversation
WalkthroughThe recent update primarily addresses a bug in the handling of IBC (Inter-Blockchain Communication) inflows, specifically correcting the logic to accurately determine if the sender chain is the source chain. This ensures that registered tokens are stored correctly during such transactions. Additionally, the update includes code enhancements related to token inflow recording and testing adjustments to reflect these changes accurately. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- x/uibc/quota/quota.go (1 hunks)
Additional comments: 1
x/uibc/quota/quota.go (1)
- 236-236: The logic correction in the
RecordIBCInflow
function to accurately check if the sender chain is the source chain is crucial for ensuring that inflows are correctly recorded when the sender and source chains are the same. This change addresses the previously inverted logic, aligning with the PR's objective to fix inflow summing issues in such scenarios. The implementation appears to correctly useics20types.SenderChainIsSource
for this purpose, which is a standard approach in IBC-related logic.
…o sai/fix_inflows_calculation
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- CHANGELOG.md (1 hunks)
Additional comments: 1
CHANGELOG.md (1)
- 59-59: Verify the accuracy and completeness of the changelog entry for PR fix: fix the inflows sum adding when sender chain is source chain #2417. Ensure it aligns with the PR's objectives and the AI-generated summary, specifically regarding the correction of inflow summing logic when the sender chain is the source chain.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- x/uibc/quota/intest/quota_test.go (1 hunks)
Additional comments: 2
x/uibc/quota/intest/quota_test.go (2)
- 154-156: The comments added in lines 154-156 clarify the scenarios for
atomToken
creation based on the sender chain. This improves the readability and understanding of the test case.- 158-158: The modification of
inflowBaseDenom
to a specific IBC hash value is consistent with the test scenario where the sender chain is the source chain. This change aligns with the PR's objective to fix inflow summing when the sender chain is the source chain.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2417 +/- ##
==========================================
- Coverage 75.38% 69.26% -6.13%
==========================================
Files 100 181 +81
Lines 8025 10741 +2716
==========================================
+ Hits 6050 7440 +1390
- Misses 1589 2692 +1103
- Partials 386 609 +223
|
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.
We need to add few more use cases:
- receiving
uumee
(the native token) - receiving a source token
- receiving external token
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- x/uibc/quota/quota.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/uibc/quota/quota.go
5d63dbb
to
13ec153
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- x/uibc/quota/intest/quota_test.go (4 hunks)
- x/uibc/quota/quota.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- x/uibc/quota/intest/quota_test.go
- x/uibc/quota/quota.go
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.
pre-approving. let's add one more test with the native token inflow
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- x/uibc/quota/quota.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/uibc/quota/quota.go
Description
We are not storing ibc inflow amount when the sender chain is source chain.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit