KeyRemoved

Event v151 → current #2

Emitted when the sudo key is permanently removed, disabling sudo.

View events on chain
Useful for: validatorsdevelopersanalyticsstakers

The Big Picture

KeyRemoved is a historic event for a network - it marks the permanent transition to full decentralization. Once this event fires, no single entity can override the network's rules. It's the ultimate commitment to trustlessness and a major milestone in a network's maturity.

Why This Matters

True decentralization requires that no backdoors exist. KeyRemoved proves the network operators have permanently given up their administrative backdoor. This is a trust signal to users that the network is fully trustless.

Example Scenario

After years of stable governance through Democracy and Council, the network is ready to remove sudo. The sudo multisig executes remove_key(). KeyRemoved fires with no arguments (the key is simply gone). From this block forward, the network has no admin.

Common Questions

Can this ever be reversed?
No. KeyRemoved is permanent. There's no mechanism to restore sudo. The network must rely entirely on its governance mechanisms.
What happens to the old sudo key holder?
They become a regular account with no special powers. Their only remaining influence is through normal governance participation like any other token holder.

Use Cases

  • Confirm network has achieved full decentralization
  • Historical record of when admin powers were renounced
  • Governance milestone tracking

How to Use This Event

  • Record the block and timestamp of KeyRemoved
  • Announce to community as milestone
  • Update documentation that sudo no longer exists

From Chain Metadata

The key was permanently removed.

Triggers

Emitted by

Preconditions

  • Sudo key holder executed remove_key
  • This is an irreversible action

Effects

Storage Modified

Postconditions

  • Sudo.Key storage is empty
  • No account can execute sudo calls
  • Network operates without admin override

Side Effects

  • All sudo functionality permanently disabled
  • Network is now fully trustless

This event has no data fields.

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Subscribe to KeyRemoved events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("Sudo") &&
      event.method === "KeyRemoved"
    )
    .forEach(({ event }) => {
      console.log("KeyRemoved:", event.data.toHuman());
    });
});

Runtime Info

Pallet Index
12
Event Index
2
First Version
v151
Current Version
v393