I’ve thought quite deeply about how a quick unstake system can be introduced in staking. Here are my findings.
A nominator should be able to immediately unstake if their nominations have not been exposed in the last BondingDuration
eras. But it is extremely costly to check this. Instead of iterating the entirety of ErasStakers
, we could just keep track of a nominator's nominees, and check whether that subset have been exposed in the last BondingDuration
eras.
Such a feature will not be useful for everyone, so this should ideally be an opt-in feature.
We want to do this in a way that is easy to clean up stale era data. The most efficient way to do this is by calling a single remove_prefix
with the expired era in question.