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

force unstake the last remaining corrupt ledger #538

Merged

Conversation

kianenigma
Copy link
Contributor

@kianenigma kianenigma commented Jan 10, 2025

One last staking ledger that due to the bug found last year is in an inconsistent state.

The Support team is in touch with the owner, and force_staking them is the preferred way.

Note that this is only an action that we are doing because the root cause of the inconsistent stake was buggy code in the polkadot runtime, not any user interaction.

See: https://forum.polkadot.network/t/recover-corrupted-staking-ledgers-in-polkadot-and-kusama/9796

@kianenigma kianenigma mentioned this pull request Jan 10, 2025
6 tasks
@bkchr
Copy link
Contributor

bkchr commented Jan 10, 2025

This could be just its own referendum?

@bkchr bkchr closed this Jan 10, 2025
@bkchr bkchr reopened this Jan 10, 2025
@kianenigma
Copy link
Contributor Author

This could be just its own referendum?

yeah it could, but since it would require Root, and we have previously done other fixes related to this bug as runtime upgrade, I opted for this.

We can still do Root, but it will certainly be longer, and a more cumbersome process.

@bkchr
Copy link
Contributor

bkchr commented Jan 10, 2025

This could also be done via the whitelisted track? I mean this is just fixing up stuff, nothing controversial.

@kianenigma
Copy link
Contributor Author

Yeah since it is a technical bug, fellowship can be asked to whitelist.

I think there is an easier path if we merge this as-is, since we are close to publishing 1.4 anyways, but if you think otherwise, we can also pursue it via the fellowship.

relay/polkadot/src/lib.rs Outdated Show resolved Hide resolved
@acatangiu
Copy link
Contributor

do we do CHANGELOG for this?

kianenigma and others added 2 commits January 15, 2025 18:08
@kianenigma
Copy link
Contributor Author

/merge

relay/polkadot/src/lib.rs Outdated Show resolved Hide resolved
@fellowship-merge-bot fellowship-merge-bot bot enabled auto-merge (squash) January 23, 2025 14:42
@fellowship-merge-bot
Copy link
Contributor

Enabled auto-merge in Pull Request

Available commands
  • /merge: Enables auto-merge for Pull Request
  • /merge cancel: Cancels auto-merge for Pull Request
  • /merge help: Shows this menu

For more information see the documentation

@fellowship-merge-bot fellowship-merge-bot bot merged commit 5099ad4 into polkadot-fellows:main Jan 23, 2025
46 of 48 checks passed
@bkontur
Copy link
Contributor

bkontur commented Jan 24, 2025

In my PR on the actual main, polkadot check-migrations CI job failed:
https://github.com/polkadot-fellows/runtimes/actions/runs/12947252387/job/36113430989?pr=547

[2025-01-24T10:40:51Z ERROR runtime] panicked at /home/runner/work/runtimes/runtimes/relay/polkadot/src/lib.rs:2039:13:
    assertion failed: pallet_staking::Ledger::<Runtime>::get(CorruptStash::get()).is_some()
thread 'main' panicked at cli/main.rs:326:10:
called `Result::unwrap()` on an `Err` value: Input("failed to execute TryRuntime_on_runtime_upgrade: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0xa96e - polkadot_runtime.wasm!rust_begin_unwind\n    1: 0x3ca5 - polkadot_runtime.wasm!core::panicking::panic_fmt::hf7f2b23977fc8496\n    2: 0x9b68 - polkadot_runtime.wasm!core::panicking::panic::h6230965df90522ef\n    3: 0x5cae5b - polkadot_runtime.wasm!<(TupleElement0,TupleElement1,TupleElement2,TupleElement3,TupleElement4,TupleElement5,TupleElement6,TupleElement7,TupleElement8,TupleElement9) as frame_support::traits::hooks::OnRuntimeUpgrade>::try_on_runtime_upgrade::h3468e69caa69cbad\n    4: 0x6c9492 - polkadot_runtime.wasm!TryRuntime_on_runtime_upgrade")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Relevant code: https://github.com/polkadot-fellows/runtimes/blob/main/relay/polkadot/src/lib.rs#L2039

Why? Was this fixed on chain somehow?

@bkchr
Copy link
Contributor

bkchr commented Jan 24, 2025

@kianenigma ^^^^

Looks like we can remove the migration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants