Pulses

Storage Map v216 → v411 Changed in v411

Verified randomness pulses from the Drand beacon, keyed by round number.

Explore chain
Queried by: validatorsdevelopersanalytics

The Big Picture

This is the randomness everyone consumes. Each pulse is cryptographically verified randomness from Drand's distributed beacon. No one - not miners, validators, or users - can predict or manipulate this value. Use it anywhere you need provably fair, unpredictable outcomes.

Why This Matters

Need randomness? Use Drand pulses. Block hashes can be manipulated, timestamps are predictable. Drand randomness is generated by threshold BLS across many independent parties - truly unpredictable and verifiable.

Example Scenario

Query LastStoredRound() returns 12345678. Query Pulses(12345678) returns {round: 12345678, randomness: 0x...32bytes...}. Use those 32 bytes to seed your fair selection, shuffle UIDs, or determine random outcomes.

Common Questions

How do I get the latest randomness?
Query LastStoredRound() for the newest round, then Pulses(that_round) for the data. Don't assume rounds - new pulses are added regularly.
Is the randomness truly unpredictable?
Yes - Drand uses threshold BLS signatures. Multiple independent parties must contribute, and no subset can predict the output. It's cryptographically guaranteed unpredictable.
What if I need randomness for a past event?
Pulses are stored historically (within OldestStoredRound..LastStoredRound). You can query any round in that range. For audit/replay, this provides deterministic randomness.

Use Cases

  • Get verifiable randomness for fair selection mechanisms
  • Build lottery or random ordering systems
  • Implement unpredictable outcomes for games or auctions
  • Seed random number generators with verified entropy

From Chain Metadata

map round number to pulse

Purpose & Usage

Purpose

Store verifiable randomness for on-chain consumption by any pallet or contract.

Common Query Patterns

  • Query by round number for specific randomness
  • Get latest round via LastStoredRound then query
  • Iterate range for historical randomness analysis

Notes

  • Each pulse contains round number and randomness bytes
  • Randomness is 32 bytes of verifiable unpredictable data
  • Old pulses may be pruned based on OldestStoredRound
Part of: Commit-Reveal Weights (CRV3)Distributed Randomness

Query Keys

#NameTypeDescription
1
round
raw: key1
u64 key1 (u64)

Stored Value

value (Pulse)

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 Pulses storage
const key1 = 0n;

const result = await api.query.Drand.Pulses.getValue(key1);
console.log("Pulses:", result);

On-Chain Activity

Write Frequency
●●●●●○ High 1M–10M est. writes

1M–10M estimated writes

#18 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 7,429,232

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
Map
First Version
v216
Current Version
v411