BeaconConfigChanged

Event v216 → current #0

Emitted when the Drand beacon configuration has been updated.

View events on chain
Useful for: validatorsdevelopers

The Big Picture

The Drand beacon provides verifiable randomness to Subtensor. This event fires when the beacon configuration (like public keys, genesis time, or period) changes. Configuration changes are rare and typically managed by governance to ensure the chain continues to receive valid randomness pulses.

Why This Matters

Drand provides unpredictable, verifiable randomness that cannot be manipulated. When the beacon configuration changes, it affects how future randomness is verified. This is critical infrastructure - track these changes to understand the randomness source.

Example Scenario

Governance decides to update the Drand beacon to use a new League of Entropy configuration. The root account calls set_beacon_config with the new parameters. BeaconConfigChanged fires confirming the update. Future write_pulse calls will verify against the new configuration.

Common Questions

How often does the beacon configuration change?
Rarely - only when the underlying Drand network upgrades or migrates. Most chains run for years on the same configuration.
What happens to pending pulses during a configuration change?
The chain transitions to the new configuration. Pulses submitted after the change must verify against the new config. There's typically coordination to avoid disruption.

Use Cases

  • Monitor Drand beacon configuration changes
  • Track when randomness source parameters are updated
  • Verify beacon configuration transitions for infrastructure planning

How to Use This Event

  • Subscribe to monitor infrastructure configuration changes
  • Index for governance and configuration audit trails
Part of: Distributed Randomness

Triggers

Preconditions

  • Caller has root/sudo privileges
  • New configuration is valid

Effects

Storage Modified

Postconditions

  • BeaconConfig storage updated with new configuration
  • Future pulses will be verified against new configuration

Side Effects

  • May invalidate pending pulse verifications if configuration changes significantly

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 BeaconConfigChanged events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("Drand") &&
      event.method === "BeaconConfigChanged"
    )
    .forEach(({ event }) => {
      console.log("BeaconConfigChanged:", event.data.toHuman());
    });
});

Runtime Info

View Source
Pallet Index
26
Event Index
0
First Version
v216
Current Version
v393