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

consider removing liveness slashing #1964

Closed
ordian opened this issue Oct 20, 2023 · 14 comments
Closed

consider removing liveness slashing #1964

ordian opened this issue Oct 20, 2023 · 14 comments
Assignees

Comments

@ordian
Copy link
Member

ordian commented Oct 20, 2023

That is to remove im-online pallet and give up slashes for offline-ness.

Ideally we'd want to unify our slashing and disabling strategy and being offline has been mostly an operational issue, not a coordinated malicious attack. Missing out rewards should be enough of a punishment for being offline.

cc @burdges

@burdges
Copy link

burdges commented Oct 20, 2023

We originally slashed for being off-line just to wake up inactive validators, who predated the chain doing anything. It's good to remove it now. We could wait for approval rewards to remove it I guess, but likely good to remove it sooner.

We should've liveness tests I think, but without slashing. We'd kinda thought grandpa voting sufficed, but maybe approvals should listen to grandpa's liveness. We can discuss this another time, since it'll never involve slashing.

@s0me0ne-unkn0wn s0me0ne-unkn0wn self-assigned this Nov 9, 2023
@ordian
Copy link
Member Author

ordian commented Nov 9, 2023

We could make the removal process two-stage:

  1. First, we modify the slashing fraction here to return 0.
  2. Then we propose to remove the pallet from the runtimes (Kusama and Polkadot) along with any required migration.

The pallet seems to have some on-chain and off-chain storage which needs to be cleaned up in a migration. Also this pallet defines a session key which will no longer be needed, not sure about implications for a migration.

@andresilva
Copy link
Contributor

Also this pallet defines a session key which will no longer be needed, not sure about implications for a migration.

We'll also need a migration to handle the new session keys format (i.e. removal of im-online key from the struct). It's simple though, same thing as is done here: https://github.com/polkadot-fellows/runtimes/blob/7bd91e826e4b2d95f6d2ee7f6bb0f0f47d095859/relay/kusama/src/lib.rs#L1706-L1714

@ordian ordian moved this from Backlog to In Progress in parachains team board Nov 9, 2023
@bkchr
Copy link
Member

bkchr commented Nov 9, 2023

We could make the removal process two-stage:\n\nFirst, we modify the slashing fraction here to return 0.\nThen we propose to remove the pallet from the runtimes (Kusama and Polkadot) along with any required migration.

Why do we need to do this in a two stage process?

@ordian
Copy link
Member Author

ordian commented Nov 9, 2023

We don't need to, but considering that writing and testing all the migrations is non-trivial and there's a backlog of changes making it's way into fellowship runtimes, modifying the slashing fraction to 0 would ensure we get to the desired effect quickly.

@bkchr
Copy link
Member

bkchr commented Nov 13, 2023

We don't need to, but considering that writing and testing all the migrations is non-trivial and there's a backlog of changes making it's way into fellowship runtimes, modifying the slashing fraction to 0 would ensure we get to the desired effect quickly.

Do we NEED this effect quickly? Why not just do it properly from the beginning... I mean writing this SessionKey migration is no magic and also doesn't require that much work or whatever.

@ordian
Copy link
Member Author

ordian commented Nov 13, 2023

I'm just worried it's going to take several months to land this change (in fellowship and then to enact on-chain) if we don't merge a simple PR now. Which might delay the rollout of disabling as well (although we don't currently view this is a hard prerequisite, more like a nice-to-have, but this might change). But it’s not a hill I’m willing to die on.

@bkchr
Copy link
Member

bkchr commented Nov 13, 2023

I'm just worried it's going to take several months to land this change (in fellowship and then to enact on-chain) if we don't merge a simple PR now.

If we write the migration now, it will take the same amount as getting the "patched" pallet on chain. The next runtime upgrade will be prepared hopefully in the next weeks, enough time to directly add the fix to the fellowship. Writing the initial migration for removing the session key is done in < 1 hour. Removing the old state/offchain state can come later.

@s0me0ne-unkn0wn
Copy link
Contributor

I mean writing this SessionKey migration is no magic and also doesn't require that much work or whatever.

It's not only about the session key... Please have a look at this draft in your spare time: #2265

@bkchr
Copy link
Member

bkchr commented Nov 13, 2023

Removing the old state/offchain state can come later.

I already said this.

@s0me0ne-unkn0wn
Copy link
Contributor

I already said this.

Oh sorry, missed that. Yes, that does make sense. Removing on-chain storage is not a big deal as well IIUC (it looks like a single frame_support::migrations::RemovePallet migration to me), so we can proceed with session keys migration AND on-chain storage removal, but leave off-chain storage cleanup for a follow-up, am I right?

@bkchr
Copy link
Member

bkchr commented Nov 13, 2023

so we can proceed with session keys migration AND on-chain storage removal, but leave off-chain storage cleanup for a follow-up, am I right?

Yeah that sounds good to me!

@Overkillus Overkillus moved this from In Progress to Review in progress in parachains team board Jan 17, 2024
github-merge-queue bot pushed a commit that referenced this issue Feb 19, 2024
This is a follow-up for `im-online` pallet removal that is cleaning up
its off-chain storage. Must be merged no earlier than #2265 is enacted.
Related: #1964

---------

Co-authored-by: Bastian Köcher <[email protected]>
bkchr pushed a commit to polkadot-fellows/runtimes that referenced this issue Feb 29, 2024
# Summary

This PR aims to remove `im-online` pallet, its session keys, and its
on-chain storage from both Kusama and Polkadot relay chain runtimes,
thus giving up liveness slashing.

# Motivation

* Missing out on rewards because of being offline is enough disincentive
for validators. Slashing them for being offline is redundant.
* Disabling liveness slashing is a prerequisite for validator disabling.

# See also

paritytech/polkadot-sdk#1964
paritytech/polkadot-sdk#784
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this issue Mar 25, 2024
This is a follow-up for `im-online` pallet removal that is cleaning up
its off-chain storage. Must be merged no earlier than paritytech#2265 is enacted.
Related: paritytech#1964

---------

Co-authored-by: Bastian Köcher <[email protected]>
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 26, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 27, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
bkchr pushed a commit that referenced this issue Apr 10, 2024
@Overkillus
Copy link
Contributor

Overkillus commented Apr 10, 2024

With runtime release 1.2 liveness offences should no longer occur.

As seen in this PR removing ImOnline added to the 1.2 runtime release as seen here.

Some residual aspects of ImOnline will be further removed over time but they do not affect disabling. Issue closing.

@github-project-automation github-project-automation bot moved this from Review in progress to Completed in parachains team board Apr 10, 2024
@ordian
Copy link
Member Author

ordian commented Apr 10, 2024

I'm just worried it's going to take several months to land this change (in fellowship and then to enact on-chain) if we don't merge a simple PR now.

Who would have thought :P

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

No branches or pull requests

6 participants