Antelope Infra

Random Number Generator

A decentralized commit-reveal RNG for Antelope chains. Multiple oracle accounts commit hashed values, reveal them on-chain, and the contract combines the reveals into verifiable randomness consumed by the dApps in this ecosystem.

Contract

The smart contract stores commits, reveals, and finalized RNG values in the rngs table.

Oracle CLI

The CLI signs commit and reveal actions with dedicated oracle keys and can be run under PM2 for continuous operation.

dApp Consumers

The pig care, lottery, racing, and registry apps read recent RNG values to drive fair, auditable game outcomes.

How It Works

  1. Oracle accounts commit hashed random values for the active cycle.
  2. After the commit phase, each oracle reveals its original value.
  3. The contract XORs the revealed values into a final RNG output.
  4. The output is persisted on-chain and consumed by dependent dApps.

Latest On-Chain RNG

Loading latest values from randomng.gm...

Latest RNG Loading...
Latest Cycle Loading...
Rows Sampled Loading...
Newest Timestamp Loading...
Cycle Created Value
Loading recent RNG outputs...

Useful Commands

make build
make deploy
make oracle
make query-rngs
make test

Environment

RNG_ENDPOINT=https://jungle4.greymass.com
RNG_CHAIN_ID=73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d
RNG_CONTRACT=your-contract-account
RNG_ACCOUNT=your-oracle-account
RNG_PRIVATE_KEY=your-oracle-private-key