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§
- auth
- chain_
bridge - challenge
- Challenge generation from slot/slot_hash and conversion to mining tasks.
- config
- consensus
- device_
protocol - Device protocol abstraction: native, ESP32-S, ESP8266, and WASM device types and status.
- device_
registry - Device registry: persistence and in-memory state for miners (ESP, CPU, GPU) and real-time progress.
- error
- Error types for PoT-O core operations.
- esp_
compat - ESP32/ESP8266 compatibility: device types, mining config, and tensor constraints.
- genesis
- gossip_
client - Gossip client for peer-to-peer challenge distribution using async HTTP.
- hex_api
- http_
api - internal_
api - Internal API for peer-to-peer communication and challenge broadcasting.
- ledger
- marketplace
- mdns_
discovery - mDNS (Multicast DNS) service discovery for PoT-O validators.
- mempool
- messaging
- 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_
auth - peer_
network - Peer network: local-only and optional VPN mesh for multi-node discovery.
- peer_
store - pool_
coordinator - Pool Coordinator: Manages batch proof submission and coordination with primary validator.
- pool_
strategy - Pool strategy: solo and proportional/PPLNS pool info and reward distribution.
- pot_o
- PoT-O consensus: proof generation, verification, and engine stats.
- proof_
trace - rate_
limit - rewards
- security
- Proof authority and node authentication: Ed25519, mTLS, HMAC device auth.
- spv
- state_
root - tensor
- Tensor types: shape, data (F32/U8), and operations (hash, clamp for ESP).
- token_
config - Token configuration module
- tx
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
- 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 - Ed25519 authority that signs challenges with the validator’s keypair.
- Engine
Config - Configuration for the AI3 engine.
- Engine
Stats - Extension
Registry - Genesis
- Gossip
Client - Async HTTP-based gossip client for broadcasting challenges to peers.
- Ledger
- Ledger
Entry - Ledger
Snapshot - Local
Only Network - MMLPath
Validator - Validates a tensor transformation using Minimum Message Length (Kolmogorov) principles.
- Marketplace
- The marketplace engine.
- Matrix
Multiply - Matrix multiplication (self-multiply for square-ish inputs)
- Mdns
Discovery - mDNS service discovery for validator peer discovery
- Mempool
- Pending transaction pool
- Messaging
- Connection manager for miner WebSocket sessions.
Each connected miner gets an
mpsc::UnboundedSenderthat the WS task polls. - Miner
Capabilities - Capabilities advertised by a miner (operations, tensor size, ESP flag).
- Miner
Share - Miner
Stats - Aggregate stats for a miner (completed/failed tasks, compute time).
- 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.
- Node
Identity - Order
- A single order in the marketplace.
- Order
Book - Order book for a specific asset pair (sell_asset → buy_asset).
- PPLNS
Pool - Peer
Discovery - Information about a discovered peer validator
- 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.
- Proof
Record - Proportional
Pool - Solo
Strategy - 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
Shape - Shape of a tensor (dimension sizes).
- Trade
- A filled trade record.
- Transaction
- A single chain transaction.
- Tribechain
Bridge - TxReceipt
- VpnMesh
Config - VpnMesh
Network - Wasm
Device
Enums§
- Activation
Function - Device
Type - ESPDevice
Type - ESP device types supported by the mining network (from .AI3)
- Market
Asset - Asset identifier — either a ledger token or a bridged Solana mint.
- Miner
Message - Message sent from a miner to the validator over WebSocket.
- Order
Side - Buy or sell side.
- Order
Status - Order status.
- Pool
Type - 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.
- Validator
Message - Message sent from the validator to a miner over WebSocket.
- Vector
Op
Constants§
- BLOCK_
TIME_ TARGET - Block time target in seconds.
- DEFAULT_
LEDGER_ PATH - DEFAULT_
PORT - Default HTTP listen port for the validator API.
- ESP_
MAX_ TENSOR_ DIM - Maximum tensor dimensions for ESP-compatible challenges.
- VERSION
- Crate version (from Cargo.toml).
Traits§
- Chain
Bridge - 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§
Type Aliases§
- Tribe
Result - Result type alias using
TribeError.