pub struct Challenge {
pub id: String,
pub slot: u64,
pub slot_hash: String,
pub operation_type: String,
pub input_tensor: Tensor,
pub difficulty: u64,
pub mml_threshold: f64,
pub path_distance_max: u32,
pub max_tensor_dim: usize,
pub created_at: DateTime<Utc>,
pub expires_at: DateTime<Utc>,
}Expand description
A PoT-O mining challenge derived from a Solana slot hash.
Fields§
§id: StringUnique challenge id.
slot: u64Solana slot number.
slot_hash: StringSlot hash (e.g. 64-char hex).
operation_type: StringTensor operation type (e.g. matrix_multiply, relu).
input_tensor: TensorInput tensor for the operation.
difficulty: u64Mining difficulty (path distance, etc.).
mml_threshold: f64MML score threshold to accept a proof.
path_distance_max: u32Maximum allowed Hamming distance for neural path.
max_tensor_dim: usizeMax tensor dimension.
created_at: DateTime<Utc>Creation time.
expires_at: DateTime<Utc>Expiry time.
Implementations§
Source§impl Challenge
impl Challenge
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Returns true if the challenge has expired.
Sourcepub fn to_mining_task(&self, requester: &str) -> MiningTask
pub fn to_mining_task(&self, requester: &str) -> MiningTask
Converts this challenge into an AI3 mining task for the given requester.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Challenge
impl<'de> Deserialize<'de> for Challenge
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Challenge
impl RefUnwindSafe for Challenge
impl Send for Challenge
impl Sync for Challenge
impl Unpin for Challenge
impl UnsafeUnpin for Challenge
impl UnwindSafe for Challenge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more