Skip to content
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

Reap stash for an un-decodable staking ledger #451

Open
Ank4n opened this issue Sep 27, 2022 · 1 comment
Open

Reap stash for an un-decodable staking ledger #451

Ank4n opened this issue Sep 27, 2022 · 1 comment

Comments

@Ank4n
Copy link
Contributor

Ank4n commented Sep 27, 2022

Some configuration changes can lead to StakingLedger in an inconsistent state. For example, this PR paritytech/substrate#12343 introduced MaxUnlockingChunks that if reduced abruptly, can make the StakingLedger undecodable.

An action we could take here is allow reap_stash to kill this stash if the ledger is an inconsistent state.

Concerns:
The stash could be of high value and an inconsistent state could be due to an configuration change not intended to corrupt the ledger. If the ledger is recoverable in future, one might want to fix that or handle it in a proper migration. Once stash is reaped, it won't be recoverable.

cc: @kianenigma

@Ank4n Ank4n self-assigned this Sep 27, 2022
@kianenigma
Copy link
Contributor

As a starting point, I suggest we run the try_state of staking on Polkadot and Kusama, and make sure all the assertions there are correct. Then, we can incorporate un-decodable ledger into the try_state hook of staking as well.

@juangirini juangirini transferred this issue from paritytech/substrate Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📕 Backlog
Development

No branches or pull requests

2 participants