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§

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.
ChallengeGenerator
Generates deterministic challenges from (slot, slot_hash) with configurable difficulty and thresholds.
Convolution
1D convolution with a small fixed kernel
DefiClient
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
EngineConfig
Configuration for the AI3 engine.
EngineStats
EntanglementEdge
An entanglement edge linking two vertices.
EscrowInfo
ExtensionRegistry
Central registry that holds the active extension implementations. Constructed once at startup from config/env, then passed by reference.
LiquidityPoolInfo
LocalOnlyNetwork
MMLPathValidator
Validates a tensor transformation using Minimum Message Length (Kolmogorov) principles.
MatrixMultiply
Matrix multiplication (self-multiply for square-ish inputs)
MinerCapabilities
Capabilities advertised by a miner (operations, tensor size, ESP flag).
MinerStats
Aggregate stats for a miner (completed/failed tasks, compute time).
MinimalCut
Minimal cut in the tensor network.
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.
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.
SolanaBridge
SoloStrategy
StakeAccountInfo
StakingPoolInfo
SwapQuoteInfo
TaskDistributor
Distributes mining tasks to available miners (from .AI3).
Tensor
A typed tensor with shape and data (used in challenges and mining results).
TensorNetworkState
Global tensor network state.
TensorNetworkVertex
A vertex in the tensor network (e.g., a miner or pool).
TensorShape
Shape of a tensor (dimension sizes).
Transaction
A single chain transaction.
TreasuryInfo
UserVaultInfo
WasmDevice

Enums§

ActivationFunction
DeviceType
ESPDeviceType
ESP device types supported by the mining network (from .AI3)
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.
VectorOp

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§

ChainBridge
How proofs and rewards interact with on-chain programs.
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§

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§

PortableScalar
Standard f64 floating-point
TribeResult
Result type alias using TribeError.