-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: add coins burned to slash event #9458
Conversation
*adds new attribute "amount_slashed" to event *adds new event type "jail" *removes reason attribute *moves slashing event to the end of the function that implements the slashing logic itself *moves jail/slashing events to be AFTER the functions are called
Codecov Report
@@ Coverage Diff @@
## master #9458 +/- ##
===========================================
+ Coverage 35.48% 60.62% +25.13%
===========================================
Files 332 588 +256
Lines 32620 37405 +4785
===========================================
+ Hits 11575 22675 +11100
+ Misses 19819 12746 -7073
- Partials 1226 1984 +758
|
+slash now returns the amount of coins burned +events now emit both reason and coins burned +events moved to be emitted after the logic is executed
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.
Looks great! By chance and while you're at it, do you think you can fix/change the header in x/slashing/spec/06_events.md
to say Events
and not Tags
please?
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.
Nice! Looks good to me. Changelog entry?
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.
nice! Putting a block as this introduces an API-brekaing change
@technicallyty could you solve the conflicts? This is ready to get merged |
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
Description
Adds the amount of coins slashed from the validator to the
Slash
event. Additionally, before this PR, the jail/slash events were emitted BEFORE the slash/jail functions were even ran, which could result in a false positive event if an error occurred in these functions.These events were moved to the end of the functions that implement the logic for them instead.This PR moves the events to be emitted after the logic is executed.Closes: #9138
amount_slashed
to slash event- +Add EventTypeJail
to separate it from theSlash
event- +Move slash/jail events into the functions that execute the logic for it- -RemoveReason
attribute from slash event (didn't appear to be consistent with what was happening in code)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...
!
in the type prefix if API or client breaking change