NewPulse

Event v216 → current #1

Emitted when a new randomness pulse has been successfully verified and stored.

View events on chain
Useful for: validatorsdevelopersanalytics

The Big Picture

Drand produces randomness pulses at regular intervals (typically every 30 seconds). Validators or offchain workers fetch these pulses and submit them to the chain via write_pulse. Once verified and stored, this randomness can be used by any on-chain logic - fair selection, lottery mechanisms, unpredictable ordering, etc. NewPulse confirms the randomness is now available.

Why This Matters

Verifiable randomness is essential for fair, unpredictable outcomes on-chain. Unlike block hashes (which miners can manipulate), Drand randomness is generated by a distributed network and verified cryptographically. NewPulse tells you fresh randomness is now available.

Example Scenario

An offchain worker fetches the latest Drand pulse (round 12345678) and calls write_pulse. The chain verifies the BLS signature against the beacon config. NewPulse fires with rounds=[12345678]. Now any pallet can query Pulses(12345678) to get verifiable randomness.

Common Questions

How often are new pulses submitted?
Typically every block or every few blocks, depending on configuration. Drand produces pulses every ~30 seconds, and the chain captures them as quickly as practical.
What can I use this randomness for?
Any application needing unpredictable, verifiable outcomes: fair validator selection, random ordering, lottery mechanisms, or any logic that must be provably unbiased.
Can the randomness be predicted?
No - Drand uses threshold BLS signatures from a distributed network. No single party can predict or influence the output. It's cryptographically guaranteed unpredictable.

Use Cases

  • Track availability of new randomness on-chain
  • Verify randomness is being submitted regularly
  • Build applications that consume verifiable randomness
  • Monitor beacon liveness and reliability

How to Use This Event

  • Subscribe to track new randomness availability
  • Monitor pulse frequency for beacon health
  • Index to build randomness consumption applications
  • Verify regular pulse submission for network health dashboards

From Chain Metadata

Successfully set a new pulse(s).

Part of: Distributed Randomness

Triggers

Emitted by

Preconditions

  • Pulse signature is valid against beacon configuration
  • Round number is valid (typically sequential or within bounds)
  • Pulse has not already been recorded

Effects

Postconditions

  • Pulse stored in Pulses storage for the given round(s)
  • LastStoredRound updated if this is the newest round
  • Verifiable randomness now available for on-chain use

Side Effects

  • May trigger cleanup of old pulses if storage limits approached
  • Randomness becomes available for any on-chain logic that needs it

Event Data

#NameTypeDescription
0
rounds
Vec<u64> VecDrand round numbers for the new randomness pulses

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

On-Chain Activity

Emission Frequency
●●●●○○ Significant 1M–5M emissions

Major features with millions of emissions

#14 most emitted event

As of block 7,429,232

Runtime Info

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