This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Automatic
withdraw_unbonded
uponunbond
#12582Automatic
withdraw_unbonded
uponunbond
#12582Changes from 13 commits
9e569f5
a25ecaa
6e57960
e89a3cd
437ed30
af00da5
2fe20e4
ffeb1b0
d6b5adc
add919f
90461ad
a12d351
8cc482a
a56794d
e209b7f
acaac84
05d98f6
5222598
bbabc96
25317b5
b376ad0
b965691
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
May be some comment about why we speculate slashing spans would be 32? Is this the maximum it can be?
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.
Can it be different for different runtimes?
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.
I believe there is no max for the number of spans. I pulled the numbers of current slashing spans and calculated a few metrics over it for Kusama an Polkadot, sharing here if you are interested:
32 is a conservative number in Polkadot as you can see in the numbers above (max num spans so far is 9). In Kusama, I believe there were some issues in the past that triggered slashings, and that's why the max spans are larger. Given that we don't want to set the default dispatchable weight too high (to decrease the changes of a transaction being left out of a block due to weight over-provisioning that would be refunded post dispatch) and that the chances of both 1) a call require a unbond+withdraw and 2) slashing spans are > 32 , I believe this is a sensitive number. Even if the number of slashing spans is larger than the spaculative number and the withdraw is required before unbonding, there is no critical issues with it.
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.
I
will addadded a comment explaining whatSPECULATIVE_NUM_SPANS
are and why we set it to 32.