-
Notifications
You must be signed in to change notification settings - Fork 312
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
funding: mint delegation token lqt rewards #5060
Conversation
faff411
to
4a2a238
Compare
}; | ||
|
||
ensure!( | ||
!matches!(validator_state, State::Defined | State::Tombstoned), |
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.
For posterity: we want to allow voting with jailed power, because that validator might be able to recover, right?
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.
Yes, I think every bonding note is fair game unless the validator is in an irrecoverable state e.g, Tombstoned
OR if it is in a precursor state with no resources bound to it.
Describe your changes
This PR adds a component API to allow
funding
to deposit into a validator's delegation pool. It does so by exposing aValidatorPoolDeposit::deposit_to_validator_pool
method to safely handle it.One tension in the current design, is that the LQT logic lives in the
funding
component which execute last. As a result, delegation pool increases do not affect the validator's voting power until the following epoch. LQT rewards however, are immediately useful to awardees and can be directed towards future LQT seasons.One notable change to this PR is that we now track voters based on:
Alternative solution
If we want to solve this another way, we could close the current PR, and refactor the LQT logic into its own component. The approach should be the same: the
lqt
component calls the safe pool increase handle and thestaking
component takes care of the rest.Issue ticket number and link
Discussing and overview in #5046
Checklist before requesting a review
I have added guiding text to explain how a reviewer should test these changes.
If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: