Skip to content

Errors

Cmd+F for your error number. The row tells you what’s happening and where to look.

CodeVariantMeaningMost-likely causeFix
6000InvalidSignaturePairing returned Some(false) — equation didn’t holdSignature doesn’t match drand evmnet for this round. Most common cause: feeding a signature from a different drand chain (mainnet BLS12-381, fastnet, quicknet).Use fetchBeacon() (SDK default is evmnet) or pass the evmnet chain hash explicitly
6001InvalidG1PointSignature bytes fail the on-curve check (y² != x³ + 3 mod p) or x ≥ pWrong encoding — 48-byte compressed G1, 96-byte G2, or x above field primeSignature must be 64 bytes, uncompressed (x || y) big-endian. Drand’s REST API returns this shape; the SDK parses it correctly.
6002RoundZeroRound number is 0Integer default or off-by-one bug in the callerDrand rounds start at 1. Use getCurrentRound() or pass an explicit bigint ≥ 1.
6004NoSquareRootSVDW hash-to-curve: all 3 candidate field elements fail the square-root checkShould not occur for honest drand input — SVDW theorem guarantees one candidate succeeds. Indicates constant corruption or syscall-oracle regression.File an issue. Do not retry.
6006PairingErroralt_bn128_pairing syscall returned Err, or output length was wrongMalformed pairing inputs. Should not occur with valid drand beacons and a correct Config.File an issue with the round number and full transaction log.

These never fire during verify. They’re init/update-time guards on the Config PDA.

CodeVariantMeaning
6007WrongChainHashchain_hash argument doesn’t match EXPECTED_EVMNET_CHAIN_HASH. Rejects wrong-chain deploys at init time.
6008WrongPubkeypubkey_g2 argument doesn’t match EXPECTED_EVMNET_G2_PUBKEY. Fallback guard from ADR 0027.
6010InvalidGenesisTimegenesis_time doesn’t match EXPECTED_EVMNET_GENESIS_TIME
6011InvalidPeriodperiod doesn’t match EXPECTED_EVMNET_PERIOD
6012UnauthorizedInitThe signer calling initialize isn’t the BPFLoaderUpgradeable upgrade_authority. Closes the deploy-to-init front-run window.

Kept in the enum per ADR 0028’s append-only, never-renumber rule so consumer SDKs stay stable across program versions.

CodeVariantWhy unreachable
6003InvalidFieldElementHash-to-field uses from_be_bytes_mod_order, so no range check is ever needed. Reserved for a future canonical-Fq guard if one is added.
6005InvalidG2PointFallback G2 validation path (ADR 0027) is strictly stronger than subgroup check for this single-chain deployment. Not reachable with the current pubkey.
6009ReturnDataMissingAnchor 0.30 Pattern A return-data handling (ADR 0030) always sets return data on success. A CPI caller would only see this if the deployed program was replaced by one that doesn’t emit return data.

Not Alea-specific, but you may see them:

CodeNameMeaning
2001ConstraintHasOnehas_one = authority mismatch. Fires AFTER account deserialization, BEFORE the handler body. Wrong authority signer on an init/admin call.
3010AccountNotSignerAn account declared Signer<'info> was passed without a signature. Fires earlier than 2001 during account resolution.

Any code outside this table is not from Alea. Check the error’s program ID against ALEAydzHd4cN2EWcdHKp4hehAE4B88b16gqVtVqsck2U — if it doesn’t match, the error is from another program in your transaction (system program, SPL, your own program’s Anchor wrapper).

Check these in order. Most production reverts land on one of them.

  1. Wrong drand chain. Check whatever fetchBeacon / curl endpoint you’re hitting against DRAND_CHAIN_HASH. If they differ, you get 6000 (pairing fails against evmnet pubkey). Use fetchBeacon from @alea-drand/sdk; it hits evmnet by default.
  2. Stale round. If your consumer uses is_round_recent you’ll see your own StaleBeacon (or equivalent) error, not an Alea code. If not — Alea accepts any round, so the failure is application-side. See Common Pitfalls §9.
  3. Compute budget exceeded. Not a 6xxx code — Solana returns Computational budget exceeded in the logs. Add ComputeBudgetProgram.setComputeUnitLimit({ units: 900_000 }) as the first instruction.

If none of those fit and you’re seeing 6000, 6001, or 6002, re-fetch your (round, signature) pair against api.drand.sh directly.

Codes 6004 or 6006 in production mean something is off at the cryptographic or syscall layer. File an issue — these are not expected for valid drand beacons.