Skip to main content

Crate pot_o_validator

Crate pot_o_validator 

Source
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.
ChallengeGenerator
Generates deterministic challenges from (slot, slot_hash) with configurable difficulty and thresholds.
Convolution
1D convolution with a small fixed kernel
DeviceStatus
ESP32SDevice
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.
ESP8266Device
ESP8266 device protocol handler. Reduced tensor dimensions (32x32) and limited operation set.
ESPCompatibility
Utility for checking and optimizing tensors for ESP device constraints
ESPMiningConfig
Mining configuration for ESP devices (RPC, tensor limits, heartbeat).
Ed25519Authority
Ed25519 authority that signs challenges with the validator’s keypair.
EngineConfig
Configuration for the AI3 engine.
EngineStats
ExtensionRegistry
Genesis
GossipClient
Async HTTP-based gossip client for broadcasting challenges to peers.
Ledger
LedgerEntry
LedgerSnapshot
LocalOnlyNetwork
MMLPathValidator
Validates a tensor transformation using Minimum Message Length (Kolmogorov) principles.
Marketplace
The marketplace engine.
MatrixMultiply
Matrix multiplication (self-multiply for square-ish inputs)
MdnsDiscovery
mDNS service discovery for validator peer discovery
Mempool
Pending transaction pool
Messaging
Connection manager for miner WebSocket sessions. Each connected miner gets an mpsc::UnboundedSender that the WS task polls.
MinerCapabilities
Capabilities advertised by a miner (operations, tensor size, ESP flag).
MinerShare
MinerStats
Aggregate stats for a miner (completed/failed tasks, compute time).
MiningResult
Result of a completed mining task (output tensor, nonce, validity).
MiningTask
A single mining task (operation, input tensors, difficulty, expiry).
NativeDevice
NeuralPathValidator
Validates the neural inference path of a tensor computation.
NodeIdentity
Order
A single order in the marketplace.
OrderBook
Order book for a specific asset pair (sell_asset → buy_asset).
PPLNSPool
PeerDiscovery
Information about a discovered peer validator
PotOConsensus
The PoT-O consensus engine. Orchestrates challenge generation, tensor computation, MML validation, and neural path matching.
PotOProof
The full PoT-O proof submitted by a miner.
ProofPayload
Payload sent to the on-chain program.
ProofRecord
ProportionalPool
SoloStrategy
TaskDistributor
Distributes mining tasks to available miners (from .AI3).
Tensor
A typed tensor with shape and data (used in challenges and mining results).
TensorShape
Shape of a tensor (dimension sizes).
Trade
A filled trade record.
Transaction
A single chain transaction.
TribechainBridge
TxReceipt
VpnMeshConfig
VpnMeshNetwork
WasmDevice

Enums§

ActivationFunction
DeviceType
ESPDeviceType
ESP device types supported by the mining network (from .AI3)
MarketAsset
Asset identifier — either a ledger token or a bridged Solana mint.
MinerMessage
Message sent from a miner to the validator over WebSocket.
OrderSide
Buy or sell side.
OrderStatus
Order status.
PoolType
TensorData
Tensor element data (float or u8).
TokenType
Token type identifier on the chain.
TransactionType
Kind of on-chain transaction.
TribeError
Errors that can occur in PoT-O validator and related crates.
ValidatorMessage
Message sent from the validator to a miner over WebSocket.
VectorOp

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§

ChainBridge
DeviceProtocol
How a mining device communicates with the validator.
PeerNetwork
How validator nodes discover and communicate with each other.
PoolStrategy
How mining rewards are distributed among participants.
ProofAuthority
Security layer for proof submission and node authentication.
TensorEngine
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.
TensorOp
Trait for all tensor operations (aligned with .AI3 TensorOp).

Functions§

calculate_mining_reward
load_ledger
parse_market_asset
spawn_persist_ledger
verify_peer_signature

Type Aliases§

TribeResult
Result type alias using TribeError.