-
Notifications
You must be signed in to change notification settings - Fork 754
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
Adds target approvals buffering below a threshold #5168
Adds target approvals buffering below a threshold #5168
Conversation
bot fmt |
@gpestana https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6849944 was started for your command Comment |
We are migrating the command bot to be a GitHub Action |
@gpestana Command |
bot fmt |
@gpestana https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6858441 was started for your command Comment |
We are migrating the command bot to be a GitHub Action |
@gpestana Command |
The CI pipeline was cancelled due to failure one of the required jobs. |
933e159
into
gpestana/stake-tracker_integration
Sorry for being late, should have reviewed this sooner. I think we should revert and re-do this, as it is different from what I believe was the intended fix. The original issue is that each ledger update in a nominator can correspond to up 16 approval stake updates. With this PR, we have reduced that to 1, but I think we can do better. I belive what we actually need to store is not As rewards and slashes come in, we do nothing. So suppose Then, once alice gets reward and slashes, and now she has 200, anyone can call This approach is a lot less computation and weight update, and a lot more storage, which is totally fine in a parachain. |
This PR adds target stake updates buffering to
stake-tracker
. It exposes a configuration that defines a threshold below which the target score should not be updated automatically in the target list. TheConfig::ScoreStrictUpdateThreshold
defines said threshold. If a target stake update is below the threshold, the stake update is buffered in theUnsettledTargetScore
storage map while the target list is not affected. Multiple approvals updates can be buffered for the same target. CallingCall::settle
will setttle the buffered approvals tally for a given target. SettingConfig::ScoreStrictUpdateThreshold
toNone
disables the stake approvals buffering.try-state
checks considering the unsettled score