-
Notifications
You must be signed in to change notification settings - Fork 102
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!: store the minimal power to be in the top N on EndBlock, instead of computing on-the-fly #1840
base: feat/partial-set-security
Are you sure you want to change the base?
Conversation
Thanks for the change. I'm not in favor of adding this to PSS. I do not see the benefits (i.e., slightly faster query-ing and opting-out) trumping the slight additional complexity that this PR introduces (i.e., additional state and potentially opting-out delays). |
Yeah. I think in particular this touches some core parts, so I'm a bit concerned with adding this so late. I'd say let's leave it out for now; this seems relatively easy to introduce later on, too, if we think it becomes important. |
Description
Closes: #XXXX
Compute the minimal power in the top N on EndBlock, when we compute it anyways for sending VSCPackets.
This should, at worst, delay the ability to opt out by an epoch
(intuitively, when someone is allowed to opt out not because their own power decreases, but because others powers increase, they would still compare against the old, stored MinPowerInTopN and not be allowed to opt out.
This would be solved after the epoch ends and the MinPowerInTopN is updated, however.)
NOTE: Needs a migration; the MInPowerToOptIn needs to be initialized during the migration
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 the change is state-machine breakingCHANGELOG.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...
!
the type prefix if the change is state-machine breaking