swap_authorities

Call v138 → v212, v216 → current #0

Replaces Aura consensus authorities with new validator set.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: subnet owners

The Big Picture

This is a critical governance call that changes who produces blocks. Used during network upgrades or emergency situations where the validator set must be replaced immediately.

Use Cases

  • Emergency validator rotation
  • Scheduled authority changes
  • Network upgrades requiring new validators

From Chain Metadata

The extrinsic sets the new authorities for Aura consensus. It is only callable by the root account. The extrinsic will call the Aura pallet to change the authorities.

Input Parameters

#NameTypeDescription
0
new_authorities
BoundedVec BoundedVec<<T as Config>::AuthorityId, T::MaxAuthorities>new_authorities (BoundedVec)

Permissions

Origin
Root
Required Role

Requirements

  • Caller is root account
  • Valid authority list provided

Effects

Postconditions

  • Aura authorities updated to new set
  • Block production shifts to new validators

Side Effects

  • Existing validators lose block production rights
  • Network consensus mechanism updates

Code Examples

// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Build swap_authorities call (typed, named args)
const new_authorities = undefined as any /* BoundedVec — replace with real value */;

const tx = api.tx.AdminUtils.swap_authorities({
  new_authorities,
});

Version History

v138 block 1,907,363 1 args
v216 block 4,510,996 1 args Current

Runtime Info

View Source
Pallet Index
19
Call Index
0
First Version
v138
Current Version
v411