pub struct ChallengeGenerator {
pub base_difficulty: u64,
pub base_mml_threshold: f64,
pub base_path_distance: u32,
pub max_tensor_dim: usize,
pub challenge_ttl_secs: i64,
}Expand description
Generates deterministic challenges from (slot, slot_hash) with configurable difficulty and thresholds.
Fields§
§base_difficulty: u64Base difficulty for generated challenges.
base_mml_threshold: f64Base MML threshold.
base_path_distance: u32Base path distance bound.
max_tensor_dim: usizeMaximum tensor dimension.
challenge_ttl_secs: i64Challenge TTL in seconds.
Implementations§
Source§impl ChallengeGenerator
impl ChallengeGenerator
Sourcepub fn new(difficulty: u64, max_tensor_dim: usize) -> ChallengeGenerator
pub fn new(difficulty: u64, max_tensor_dim: usize) -> ChallengeGenerator
Creates a generator with the given difficulty and max tensor dimension.
Trait Implementations§
Source§impl Default for ChallengeGenerator
impl Default for ChallengeGenerator
Source§fn default() -> ChallengeGenerator
fn default() -> ChallengeGenerator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChallengeGenerator
impl RefUnwindSafe for ChallengeGenerator
impl Send for ChallengeGenerator
impl Sync for ChallengeGenerator
impl Unpin for ChallengeGenerator
impl UnsafeUnpin for ChallengeGenerator
impl UnwindSafe for ChallengeGenerator
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more