-
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
refactor: Adding improvements from the official Gravity Bridge #351
Conversation
Codecov Report
@@ Coverage Diff @@
## main #351 +/- ##
==========================================
+ Coverage 37.16% 37.25% +0.09%
==========================================
Files 78 78
Lines 10858 10940 +82
==========================================
+ Hits 4035 4076 +41
- Misses 6518 6552 +34
- Partials 305 312 +7
|
@alexanderbez this is the part I'm unsure about: Lines 277 to 281 in 4f8a32d
I think it's ok to slash a jailed validator in this case. But, will that get the same validator slashed on every endBlock? |
consPower, | ||
params.SlashFractionValset, | ||
) | ||
ctx.EventManager().EmitEvent( |
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.
see comments below on events 👍
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.
This event is still wrong btw
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.
@alexanderbez pls check now
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. WDYT about valset_slashing
?
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.
In that case we will need valset_slashing and batch_slashing. Idk how much an event type should englobe, or if it should be very narrow
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.
it should be specific to the domain, in this case, valset slashing.
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.
Also, we need to update events.md
, which probably could use an entire overhaul, to reflect these new events.
I don't have a strong opinion on slashing
vs valset_slashing
, I just wanted to suggest it.
h.k.StakingKeeper.Slash(ctx, valConsAddr, ctx.BlockHeight(), consPower, params.SlashFractionValset) | ||
ctx.EventManager().EmitEvent( |
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.
see comments below on events 👍
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.
ditto
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
consPower, | ||
params.SlashFractionValset, | ||
) | ||
ctx.EventManager().EmitEvent( |
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.
This event is still wrong btw
h.k.StakingKeeper.Slash(ctx, valConsAddr, ctx.BlockHeight(), consPower, params.SlashFractionValset) | ||
ctx.EventManager().EmitEvent( |
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.
ditto
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
…work/umee into facu/fix-slashing-logic
…work/umee into facu/fix-slashing-logic
…/fix-slashing-logic
@facundomedica can we close this? |
@alexanderbez thanks for the reminder. Closed! |
Description
In this PR I'm pulling the latest updates made on the official GB to our Peggy module. There'll be more PRs like this in the future.
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