darwinia-docs
darwinia-docs copied to clipboard
Doc: The nomination which are before the validator's recent slashing will be ignored.
nominator: 5HE1gjo5cRP5Xzf42zrc3gExws6zqrtnMsHTi3jZ5KbLpKnd validator: 5HKSD4vd1GaM92Udj9NJ3rTSrrsjyFYvYBukAs2ZcuFtA5UX
The nomination which are before the validator's latest slashing will be ignored:
// Filter out nomination targets which were nominated before the most recent
// slashing span.
targets.retain(|stash| {
<Self as Store>::SlashingSpans::get(&stash)
.map_or(true, |spans| submitted_in >= spans.last_nonzero_slash())
});
staking.nominators: Option<Nominations>
{
targets: [
5HKSD4vd1GaM92Udj9NJ3rTSrrsjyFYvYBukAs2ZcuFtA5UX
],
submittedIn: 148,
suppressed: false
}
I just nominate that validator(node). And I think this works well.

I just nominate that validator(node). And I think this works well.
![]()
Key point is that the nomination from 5HE1gjo5cRP5Xzf42zrc3gExws6zqrtnMsHTi3jZ5KbLpKnd was before the slashing. In other words, slashing will disable the validator be elected by those nominations happen before the slashing, it make sense.
Should add docs to tell this.
I just nominate that validator(node). And I think this works well.
Key points is that the nomination from 5HE1gjo5cRP5Xzf42zrc3gExws6zqrtnMsHTi3jZ5KbLpKnd was before the slashing. In other words, slashing will disable the validator be elected by those nominations happen before the slashing, make sense.
Should add docs to tell this.
But there's one more thing I need to check. What would happen if that validator(node) re-validate? Seems slash won't clean the Nominations
storage.
I just nominate that validator(node). And I think this works well.
Key points is that the nomination from 5HE1gjo5cRP5Xzf42zrc3gExws6zqrtnMsHTi3jZ5KbLpKnd was before the slashing. In other words, slashing will disable the validator be elected by those nominations happen before the slashing, make sense. Should add docs to tell this.
But there's one more thing I need to check. What would happen if that validator(node) re-validate? Seems slash won't clean the
Nominations
storage.
Check following code, Nomination storage currently are not cleaned when slash happens, but still will be ignored even if the validator re-validator, because the nomination records the submitted_in Era
// Filter out nomination targets which were nominated before the most recent
// slashing span.
targets.retain(|stash| {
<Self as Store>::SlashingSpans::get(&stash)
.map_or(true, |spans| submitted_in >= spans.last_nonzero_slash())
});