Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

beacon/v2 package

Overview

Package beacon is SPLASH's on-chain record of the drand evmnet randomness beacon.

WHAT CHANGED, AND WHY IT IS NOT A REFACTOR (2026-09-28). This realm used to verify signatures from a beacon SPLASH itself ran: one compiled-in BLS key, held by this project, publishing a round every five minutes. The key holder could sign ANY round at will and therefore knew every future round's randomness permanently, which is r/splash/arcade/raffle/AUDIT-2026-09-28.md findings 4 and 10 and was the single worst property of the product. It now verifies drand evmnet, a threshold beacon this project does not control. Two consequences run through every comment below:

  • NOBODY CAN SIGN A FUTURE ROUND. Round r's signature does not exist before its time, and no party below the DKG threshold can make it exist. That is what the games' round bindings are for and it is now true rather than assumed.
  • NOBODY CAN DESTROY A PAST ROUND. Every round from 1 to the head is served forever by at least three independent relays, and Publish is permissionless, so anything deleted here is re-creatable by anyone. "The randomness is lost" stopped being a reachable state, which is why Prune, PruneWindow and the raffle's resolvable() are gone -- see DRAND-MIGRATION.md section 3.

THIS REALM IS NOT A MIRROR OF DRAND AND MUST NEVER BECOME ONE. At a three-second cadence, keeping up would mean one Publish every three seconds at 16,970,375 gas each: 0.62% of EVERY BLOCK on the chain, for ever, for data that is read about fifty times a year (DRAND-MIGRATION.md sections 2 and 9.5 have the measured arithmetic; 9.5 also records that this said 2.4% until 2026-09-30, off by the same 4.4x as every other gas figure derived from the pre-optimisation VerifyDrand, and that at 0.62% the STORAGE cost rather than the gas share is what rules mirroring out). It is an ON-DEMAND RECORD: a round is stored when something on this chain has a reason to look at it, and nothing else is stored at all.

There is no owner, no pause and no upgrade path. Once a round is published its randomness is fixed for ever.

Function

AnchorHeight

func AnchorHeight() int64
Ask AI Claude ChatGPT

AnchorHeight is the chain height of the last relay that raised the estimate's anchor. Panics if no round has ever been published. See anchorHeight and StaleBlocks.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/beacon/v2.AnchorHeight()"

Result