← Back to Projects
alea
Live October 29, 2025

alea

Documentation

Rust TypeScript Shell Makefile DeFi

The problem

A decentralized randomness beacon system built on the Linera microchain platform. - beacon-microchain: Linera microchain contract for the randomness beacon

  • entropy-worker: Off-chain worker node for entropy generation

  • entropy-aggregator: Off-chain aggregator node for collecting and submitting entropy

  • Rust 1.70+

  • Cargo

To build all crates in release mode:

cargo build --all --release

To build individual crates:


cargo build -p beacon-microchain


cargo build -p entropy-worker


cargo build -p entropy-aggregator

After building, you can run the off-chain components:


cargo run --bin entropy-worker


cargo run --bin entropy-aggregator

To check for warnings and style issues:

cargo clippy --all -- -D warnings

To run tests (when available):

cargo test --all

Represents a randomness event with:

  • round_id: The round identifier
  • random_number: 32-byte random number
  • nonce: 16-byte nonce
  • attestation: Attestation data

Maintains the beacon state with:

  • current_round_id: Current round identifier
  • events: Map of round IDs to RandomnessEvent

For local development without requiring actual TEE hardware, you can use the mock TEE implementation:


export ENTROPY_USE_MOCK_TEE=true


cargo run -p entropy-aggregator

When using the mock TEE, you’ll see a log message: “Using mock TEE for local development”.

What I built

alea is built with Rust, TypeScript, Shell. See the GitHub repository for full technical details.

Key results

  • 0 GitHub stars, 0 forks
  • Built with Rust, TypeScript, Shell, Makefile
  • Created 2025-10-29, last updated 2026-02-15