Expand description
PoT-O Validator library: re-exports of core, ai3-lib, mining, and extensions, plus config.
Use this crate when building tooling or tests that need the same types as the validator binary.
Modules§
- chain_
bridge - Chain bridge: submit proofs and query miners on Solana (and optional EVM/cross-chain).
- challenge
- Challenge generation from slot/slot_hash and conversion to mining tasks.
- config
- Validator configuration: TOML file and environment overrides.
- defi
- HTTP API support for tribewarez-staking, tribewarez-swap, tribewarez-vault. Fetches on-chain account data via Solana RPC and returns JSON-serializable types.
- device_
protocol - Device protocol abstraction: native, ESP32-S, ESP8266, and WASM device types and status.
- error
- Error types for PoT-O core operations.
- esp_
compat - ESP32/ESP8266 compatibility: device types, mining config, and tensor constraints.
- math
- Multi-tier arithmetic for tensor network calculations
- mining
- Mining task types, results, miner capabilities, and task distribution.
- mml_
path - MML (Minimum Message Length) path validation: compression-based score and threshold check.
- neural_
path - Neural path validation: expected path signature from challenge and actual path from tensor + nonce.
- operations
- Tensor operations: matrix multiply, convolution, activations, vector ops (aligned with .AI3).
- peer_
network - Peer network: local-only and optional VPN mesh for multi-node discovery.
- pool_
strategy - Pool strategy: solo and proportional/PPLNS pool info and reward distribution.
- pot_o
- PoT-O consensus: proof generation, verification, and engine stats.
- security
- Proof authority and node authentication: Ed25519, mTLS, HMAC device auth.
- types
- Core types for PoT-O system.
Structs§
- AI3Engine
- Main AI3 engine: coordinates tensor operations and mining tasks (Ported from .AI3 ai3-lib with PoT-O extensions).
- Block
- Minimal block representation aligned with .AI3 core::Block.
- Challenge
- A PoT-O mining challenge derived from a Solana slot hash.
- Challenge
Generator - Generates deterministic challenges from (slot, slot_hash) with configurable difficulty and thresholds.
- Convolution
- 1D convolution with a small fixed kernel
- Defi
Client - Device
Status - ESP32S
Device - ESP32-S device protocol handler. Tracks registered devices by ID and provides heartbeat status. The actual mining runs on the ESP firmware; this represents the validator-side view of a connected ESP32-S.
- ESP8266
Device - ESP8266 device protocol handler. Reduced tensor dimensions (32x32) and limited operation set.
- ESPCompatibility
- Utility for checking and optimizing tensors for ESP device constraints
- ESPMining
Config - Mining configuration for ESP devices (RPC, tensor limits, heartbeat).
- Ed25519
Authority - Engine
Config - Configuration for the AI3 engine.
- Engine
Stats - Entanglement
Edge - An entanglement edge linking two vertices.
- Escrow
Info - Extension
Registry - Central registry that holds the active extension implementations. Constructed once at startup from config/env, then passed by reference.
- Liquidity
Pool Info - Local
Only Network - MMLPath
Validator - Validates a tensor transformation using Minimum Message Length (Kolmogorov) principles.
- Matrix
Multiply - Matrix multiplication (self-multiply for square-ish inputs)
- Miner
Capabilities - Capabilities advertised by a miner (operations, tensor size, ESP flag).
- Miner
Stats - Aggregate stats for a miner (completed/failed tasks, compute time).
- Minimal
Cut - Minimal cut in the tensor network.
- Mining
Result - Result of a completed mining task (output tensor, nonce, validity).
- Mining
Task - A single mining task (operation, input tensors, difficulty, expiry).
- Native
Device - Neural
Path Validator - Validates the neural inference path of a tensor computation.
- PotO
Consensus - The PoT-O consensus engine. Orchestrates challenge generation, tensor computation, MML validation, and neural path matching.
- PotO
Proof - The full PoT-O proof submitted by a miner.
- Proof
Payload - Payload sent to the on-chain program.
- Solana
Bridge - Solo
Strategy - Stake
Account Info - Staking
Pool Info - Swap
Quote Info - Task
Distributor - Distributes mining tasks to available miners (from .AI3).
- Tensor
- A typed tensor with shape and data (used in challenges and mining results).
- Tensor
Network State - Global tensor network state.
- Tensor
Network Vertex - A vertex in the tensor network (e.g., a miner or pool).
- Tensor
Shape - Shape of a tensor (dimension sizes).
- Transaction
- A single chain transaction.
- Treasury
Info - User
Vault Info - Wasm
Device
Enums§
- Activation
Function - Device
Type - ESPDevice
Type - ESP device types supported by the mining network (from .AI3)
- Tensor
Data - Tensor element data (float or u8).
- Token
Type - Token type identifier on the chain.
- Transaction
Type - Kind of on-chain transaction.
- Tribe
Error - Errors that can occur in PoT-O validator and related crates.
- Vector
Op
Constants§
- BH_
ENTROPY_ COEFF - Black hole entropy coefficient S = (A/4) * (c³/(hbar·G)) = (k_Bc³)/(4G*hbar)
- BLOCK_
TIME_ TARGET - Block time target in seconds.
- BOLTZMANN_
CONSTANT - Boltzmann constant (k_B) in J/K Relates entropy to thermodynamic quantities
- DEFAULT_
BOND_ DIM_ QUBIT - Bond dimension for qubits (d=2) Minimal quantum system: two-level system
- DEFAULT_
BOND_ DIM_ QUDIT - Bond dimension for qudits (d=8) Eight-level quantum system
- DEFAULT_
BOND_ DIM_ QUQUART - Bond dimension for ququarts (d=4) Four-level quantum system
- DEFAULT_
COUPLING_ STRENGTH - Default coupling strength (fixed-point, scale 1e6) Represents neutral/moderate entanglement
- DEFAULT_
PORT - Default HTTP listen port for the validator API.
- ESP_
MAX_ TENSOR_ DIM - Maximum tensor dimensions for ESP-compatible challenges.
- GRAVITATIONAL_
CONSTANT - Newton’s gravitational constant (G) in m³/(kg·s²)
- MAX_
BOND_ DIMENSION - Maximum bond dimension (practical limit for on-chain computation)
- MAX_
ENTROPY_ FIXED - Maximum entropy threshold for on-chain validation (prevents overflow in fixed-point arithmetic)
- MAX_
TENSOR_ EDGES - Maximum number of edges in on-chain tensor network
- MAX_
TENSOR_ VERTICES - Maximum number of vertices in on-chain tensor network (Limited by account size and Solana transaction size)
- MIN_
BOND_ DIMENSION - Minimum bond dimension (must be at least 2 for meaningful entanglement)
- PLANCK_
ENERGY - Planck energy (E_P) in joules
- PLANCK_
LENGTH - Planck length (ℓ_P) in meters Characteristic scale at which quantum effects of spacetime dominate
- PLANCK_
MASS - Planck mass (m_P) in kilograms
- PLANCK_
TIME - Planck time (t_P) in seconds Characteristic temporal scale for quantum gravity
- REDUCED_
PLANCK - Reduced Planck constant (ℏ = h / 2π) in J·s
- SPEED_
OF_ LIGHT - Speed of light (c) in m/s
- VERSION
- Crate version (from Cargo.toml).
Traits§
- Chain
Bridge - How proofs and rewards interact with on-chain programs.
- Device
Protocol - How a mining device communicates with the validator.
- Peer
Network - How validator nodes discover and communicate with each other.
- Pool
Strategy - How mining rewards are distributed among participants.
- Proof
Authority - Security layer for proof submission and node authentication.
- Tensor
Engine - Abstraction over the tensor execution engine so callers can depend on a trait (e.g. for testing or alternate backends) instead of a concrete struct.
- Tensor
Op - Trait for all tensor operations (aligned with .AI3 TensorOp).
Functions§
- approximate_
minimal_ cut - Approximate minimal cut using greedy algorithm
- coherence_
probability - Tanh-based coherence function for probabilistic unlock
- effective_
distance - Calculate effective distance from mutual information
- entropy_
from_ cut - Calculate entropy from a minimal cut
- ln
- Natural logarithm (standard libm)
- mutual_
information - Calculate mutual information between two regions
- tanh
- Tanh for coherence/probability
- total_
network_ entropy - Calculate total entropy of entire network
Type Aliases§
- Portable
Scalar - Standard f64 floating-point
- Tribe
Result - Result type alias using
TribeError.