-
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: metoken medians #2346
fix: metoken medians #2346
Conversation
WalkthroughThe Changes
Poem
TipsChat with CodeRabbit Bot (
|
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/oracle/abci.go (1 hunks)
Additional comments: 1
x/oracle/abci.go (1)
- 82-99: The changes made to the
CalcPrices
function align with the PR objective and the generated summary. The code now ensures that historical price data is captured for all active exchange rates, including those without validator votes. The logic for calculating and setting historic median/median deviation has been updated accordingly. No issues with function signatures, global data structures, or global variables have been introduced, and there is no impact on interfaces, return values, or thrown exceptions. The changes are confined to the internal logic of theCalcPrices
function.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2346 +/- ##
==========================================
- Coverage 75.38% 70.18% -5.21%
==========================================
Files 100 170 +70
Lines 8025 12657 +4632
==========================================
+ Hits 6050 8883 +2833
- Misses 1589 3169 +1580
- Partials 386 605 +219
|
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.
utACK. Please add a changelog entry (under v6.2)
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
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.
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)
- CHANGELOG.md (1 hunks)
- x/oracle/abci.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/oracle/abci.go
Additional comments: 1
CHANGELOG.md (1)
- 53-54: The changelog entry for PR 2346 correctly documents the fix for the issue where metokens were not included in historic data.
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/oracle/abci.go (1 hunks)
Additional comments: 1
x/oracle/abci.go (1)
- 77-98: The changes made to the
CalcPrices
function align with the PR objective and the provided summary. The logic for recording historical price stamps and medians has been successfully separated from the ballot processing loop and is now iterating through all active exchange rates, ensuring that metokens are included in the historical data. This refactoring should improve the accuracy and reliability of the historical oracle data in the Umee blockchain.
Description
Fixes an issue where metokens weren't included in historic oracle data since they are not voted on by validators.
This moves the historic price stamps / medians out of the block that is looping through ballots and into a new block that loops through all active exchange rates.
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
New Features
Bug Fixes
Refactor