-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Added a "new_shares" attribute inside the delegate event type #9214
Added a "new_shares" attribute inside the delegate event type #9214
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9214 +/- ##
==========================================
- Coverage 60.03% 60.03% -0.01%
==========================================
Files 595 595
Lines 37352 37353 +1
==========================================
Hits 22425 22425
- Misses 12939 12940 +1
Partials 1988 1988
|
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.
okay for me
Could you add a changelog entry? |
What tag should I use? And under which section? |
Unreleased > Features seems the most logical to me |
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
…ew-shares-event-atribute
Added 👍 |
We explicitly removed the concept of "shares" from all UX surface long ago. Was there a reason you needed this @RiccardoM? |
Many explorers still use this to calculate the self delegate ratio of a validator. If you think there's a better way to do this, then this commit can get reverted |
Why can you not take their self-delegation / total-delegation? |
Actually, you're right. I thought that shares were still useful to determine whether a validator was slashes in the past or not (since the share/token ratio would increase in that case). But I think we can simply get the past events and see if there was a slashing event I guess. Feel free to revert this change if you think it's useless and/or might make things more complicated UX-wise |
Ehh there's no harm :) |
Description
This PR adds a new attribute inside the event types
delegate
. This is useful to return the new shares amount that cannot be queried otherwise without having to perform a new gRPC query.The rationale behind this is to allow state parsers (such as BDJuno) to handle properly the
MsgDelegate
parsing, storing a new row that represents the delegation and its associated shares amount.Currently, in order to do so we have to query the gRPC to get the shares amount. With this change, this won't be needed anymore as the new shares amount will be returned inside the event itself.
closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes