Skip to main content

Crate tribewarez_pot_o

Crate tribewarez_pot_o 

Source
Expand description

§tribewarez-pot-o

Proof of Tensor Optimizations (PoT-O) on-chain program for Solana.

This crate implements the PoT-O blockchain validation system, which combines proof-of-work concepts with tensor network analysis to optimize mining rewards. It manages miner accounts, validates cryptographic proofs submitted by off-chain validators, and distributes rewards with optional tensor-aware enhancements.

§Core Features

  • Proof Validation: Validates mining proofs submitted by the off-chain PoT-O validator
  • Miner Management: Creates and maintains miner accounts with proof history tracking
  • Reward Distribution: Distributes mining rewards with support for tensor-weighted bonuses
  • Difficulty Adjustment: Automatically adjusts mining difficulty based on network conditions
  • Tensor Network Support: v0.2.0 feature for enhanced reward calculations using tensor metrics

§Key Instructions

  • initialize: Set up the PoT-O configuration (admin-only)
  • register_miner: Register a new miner account
  • submit_proof: Submit a mining proof for validation and reward distribution
  • update_pool_config: Update configuration parameters (admin-only)
  • create_tensor_pool: Create a tensor network pool for enhanced rewards (admin-only)

§Events

This program emits events for proof submissions, reward distributions, and configuration changes. See the events module for detailed event documentation.

§Services

The services module provides trait implementations for proof validation and reward distribution, supporting both legacy (v0.1.x) and tensor-aware (v0.2.0) configurations.

Modules§

accounts
An Anchor generated module, providing a set of structs mirroring the structs deriving Accounts, where each field is a Pubkey. This is useful for specifying accounts for a client.
events
instruction
An Anchor generated module containing the program’s set of instructions, where each method handler in the #[program] mod is associated with a struct defining the input arguments to the method. These should be used directly, when one wants to serialize Anchor instruction data, for example, when speciying instructions on a client.
program
Module representing the program.
services
tribewarez_pot_o
PoT-O: Proof of Tensor Optimizations on-chain program. Validates mining proofs submitted by the off-chain PoT-O validator, manages miner accounts, distributes rewards, and adjusts difficulty.

Structs§

AdjustDifficulty
AdjustDifficultyBumps
ClaimRewards
ClaimRewardsBumps
InitParams
Parameters for initializing the PoT-O configuration. These values are set once during program initialization and can be updated via update_pool_config.
Initialize
InitializeBumps
MinerAccount
Per-miner account storing mining history and statistics. Created when a miner first registers. Updated each time a proof is submitted.
PotOConfig
Global PoT-O configuration account. Stores network-wide settings for proof validation, reward distribution, and tensor network parameters. This is a singleton account (one per program) created by the admin during initialization.
ProofParams
Parameters for submitting and validating mining proofs. Contains cryptographic commitments and validation data for the proof.
ProofRecord
Proof record account storing details of a submitted mining proof. Created each time a miner submits a valid proof.
RegisterMiner
RegisterMinerBumps
RequestSwap
RequestSwapBumps
SubmitProof
SubmitProofBumps
UpdatePoolConfig
UpdatePoolConfigBumps

Enums§

PotOError

Statics§

ID
The static program ID

Functions§

check_id
Confirms that a given pubkey is equivalent to the program ID
entry
The Anchor codegen exposes a programming model where a user defines a set of methods inside of a #[program] module in a way similar to writing RPC request handlers. The macro then generates a bunch of code wrapping these user defined methods into something that can be executed on Solana.
entrypoint
Safety
id
Returns the program ID