-
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: x/oracle end_blocker panic #2185
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2185 +/- ##
==========================================
- Coverage 75.38% 68.78% -6.61%
==========================================
Files 100 157 +57
Lines 8025 11730 +3705
==========================================
+ Hits 6050 8068 +2018
- Misses 1589 3120 +1531
- Partials 386 542 +156
|
This doesn’t look like a bug in endblocker, rather a condition we shouldn’t expect to be in the genesis file. Imo we shouldn’t merge this in |
Maybe we can fix one layer lower in the functions - missing medians shouldn't be a chain halt, just like missing prices aren't. We could do:
(the return nil and its if statement are the only changes) |
Seems like a much more appropriate fix imo. Maybe a comment / log in this function that "this should never happen"? |
I applied @toteki solution. @adamewozniak check it out. |
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.
Lgtm, one nit
This PR contains a fix for the chain halting during the EndBlocker function. The scenario to reproduce it is as follows:
median_stamp_period < historic_stamp_period
.x/leverage
registry with tokens and wait untilx/oracle
EndBlocker executes.panic: denom: ETH: empty price list passed in