-
Notifications
You must be signed in to change notification settings - Fork 592
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
Epoch hooks, panic recovery #1308
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1308 +/- ##
==========================================
- Coverage 20.26% 19.81% -0.46%
==========================================
Files 203 210 +7
Lines 26824 27884 +1060
==========================================
+ Hits 5436 5525 +89
- Misses 20378 21333 +955
- Partials 1010 1026 +16
Continue to review full report at Codecov.
|
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.
How are we going to handle panics which authors did not mean to be recoverable?
ref: #1305 (comment)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Roman <34196718+p0mvn@users.noreply.github.com>
Replied in the github issue. I think were right now assuming that none of the epoch code is deliberately chosen to cause a chain halt. (Reward distribution, token minting, superfluid, txfees) |
What is the purpose of the change
This PR aims to mitigate the risk of a panic within the epoch logic causing a chain halt (or even a halt of subsequent epoch actions). A subcomponent of #1305
Brief change log
Testing and Verifying
x/epochs/hooks_test.go
We still need to test that this does not notably increase the epoch time. (Due to cosmos/cosmos-sdk#10310 )
I want to understand that issue better, but it may be that the best way to test it is to get this cherry-picked on a v7 branch and just run it.
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? yesx/<module>/spec/
), this still needs to be done