BeaconConfig

Storage Plain v216 → v411 Changed in v411

The Drand beacon configuration used for verifying randomness pulses.

Explore chain
Queried by: validatorsdevelopers

The Big Picture

This is the 'trust anchor' for on-chain randomness. It contains the Drand network's public key and parameters. When a pulse is submitted, the chain verifies its BLS signature against this configuration. If BeaconConfig is wrong, no valid pulses can be verified.

Why This Matters

All randomness verification depends on this configuration being correct. If you're building on Drand randomness or running infrastructure, you need to ensure your offchain worker fetches from a beacon matching this configuration.

Example Scenario

Query BeaconConfig() returns {public_key: '...', genesis_time: 1692803367, period: 30, ...}. This tells you the chain expects pulses from a Drand beacon with 30-second periods starting at that genesis time. Fetch from a matching beacon (e.g., api.drand.sh).

Common Questions

What if my offchain worker uses a different beacon?
Pulse verification will fail - signatures won't match. Ensure your worker fetches from a beacon matching BeaconConfig exactly.
How often does this change?
Rarely. Only when Drand itself migrates or the chain switches beacon networks. Most chains run years on the same configuration.

Use Cases

  • Configure offchain workers to fetch from correct Drand beacon
  • Verify current randomness source parameters
  • Debug pulse verification failures
  • Audit randomness infrastructure configuration

From Chain Metadata

the drand beacon configuration

Purpose & Usage

Purpose

Stores public keys, genesis time, period, and other parameters needed to verify Drand signatures.

Common Query Patterns

  • Query to understand current randomness source
  • Verify beacon parameters before submitting pulses
  • Check configuration for offchain worker setup

Notes

  • Contains BLS public key, genesis time, period, and chain hash
  • Must match the external Drand beacon exactly
  • Changed via set_beacon_config (root only)
Part of: Distributed Randomness

Stored Value

value (BeaconConfiguration)

Relationships

Modified By

Related Events

Code Examples

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);

// Query BeaconConfig storage (no keys - plain value)
const result = await api.query.Drand.BeaconConfig.getValue();
console.log("BeaconConfig:", result);

Version History

v216 block 4,510,996 Added
v220–v232 · runtime versions skipped on chain (never deployed)
v233 block 4,920,350 Internal re-bind
v235–v237 · runtime versions skipped on chain (never deployed)
v238 block 4,936,550 Internal re-bind
v253–v256 · runtime versions skipped on chain (never deployed)
v257 block 5,228,683 Internal re-bind
v259–v260 · runtime versions skipped on chain (never deployed)
v261 block 5,328,895 Internal re-bind
v266–v272 · runtime versions skipped on chain (never deployed)
v273 block 5,659,032 Internal re-bind
v275–v275 · runtime versions skipped on chain (never deployed)
v276 block 5,781,672 Internal re-bind
v278–v289 · runtime versions skipped on chain (never deployed)
v290 block 5,947,548 Internal re-bind
v293–v296 · runtime versions skipped on chain (never deployed)
v297 block 6,067,943 Internal re-bind
v316–v319 · runtime versions skipped on chain (never deployed)
v320 block 6,523,566 Internal re-bind
v324–v325 · runtime versions skipped on chain (never deployed)
v326 block 6,608,228 Internal re-bind
v327–v333 · runtime versions skipped on chain (never deployed)
v334 block 6,811,690 Internal re-bind
v353–v360 · runtime versions skipped on chain (never deployed)
v361 block 7,063,679 Internal re-bind
v363–v364 · runtime versions skipped on chain (never deployed)
v365 block 7,135,419 Internal re-bind
v378–v384 · runtime versions skipped on chain (never deployed)
v385 block 7,782,670 Internal re-bind
v386–v390 · runtime versions skipped on chain (never deployed)
v391 block 7,782,857 Internal re-bind
v394–v400 · runtime versions skipped on chain (never deployed)
v401 block 8,036,576 Internal re-bind
v403–v410 · runtime versions skipped on chain (never deployed)
v411 block 8,283,784 Internal re-bind Current

Runtime Info

View Source
Pallet
Drand
Storage Kind
Plain
First Version
v216
Current Version
v411