subspace_proof_of_space::chiapos

Struct Tables

source
pub struct Tables<const K: u8>(/* private fields */)
where
    EvaluatableUsize<{ _ }>: Sized,
    EvaluatableUsize<{ _ }>: Sized,
    EvaluatableUsize<{ _ }>: Sized,
    EvaluatableUsize<{ _ }>: Sized,
    EvaluatableUsize<{ _ }>: Sized,
    EvaluatableUsize<{ _ }>: Sized,
    EvaluatableUsize<{ _ }>: Sized;
Expand description

Collection of Chia tables

Implementations§

source§

impl Tables<15>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<15>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<15>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 120]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 120], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<16>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<16>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<16>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 128]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 128], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<17>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<17>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<17>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 136]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 136], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<18>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<18>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<18>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 144]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 144], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<19>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<19>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<19>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 152]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 152], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<20>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<20>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<20>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 160]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 160], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<21>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<21>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<21>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 168]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 168], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<22>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<22>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<22>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 176]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 176], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<23>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<23>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<23>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 184]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 184], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<24>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<24>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<24>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 192]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 192], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

source§

impl Tables<25>

source

pub fn create(seed: [u8; 32], cache: &mut TablesCache<25>) -> Self

Create Chia proof of space tables. There also exists Self::create_parallel() that trades CPU efficiency and memory usage for lower latency.

Advanced version of Self::create_simple that allows to reuse cache.

source

pub fn create_parallel(seed: [u8; 32], cache: &mut TablesCache<25>) -> Self

Almost the same as Self::create(), but uses parallelism internally for better performance (though not efficiency of CPU and memory usage), if you create multiple tables in parallel, prefer Self::create() for better overall performance.

source

pub fn create_simple(seed: [u8; 32]) -> Self

Create Chia proof of space tables.

Simpler version of Self::create.

source

pub fn find_quality<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 32]> + 'a

Find proof of space quality for given challenge.

source

pub fn find_proof<'a>( &'a self, challenge: &'a [u8; 32], ) -> impl Iterator<Item = [u8; 200]> + 'a

Find proof of space for given challenge.

source

pub fn verify( seed: [u8; 32], challenge: &[u8; 32], proof_of_space: &[u8; 200], ) -> Option<[u8; 32]>

Verify proof of space for given seed and challenge.

Trait Implementations§

source§

impl<const K: u8> Debug for Tables<K>
where EvaluatableUsize<{ _ }>: Sized, EvaluatableUsize<{ _ }>: Sized, EvaluatableUsize<{ _ }>: Sized, EvaluatableUsize<{ _ }>: Sized, EvaluatableUsize<{ _ }>: Sized, EvaluatableUsize<{ _ }>: Sized, EvaluatableUsize<{ _ }>: Sized,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<const K: u8> Freeze for Tables<K>
where EvaluatableUsize<{ metadata_size_bytes(K, 7) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 6) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 5) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 4) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 3) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 2) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 1) }>: Sized,

§

impl<const K: u8> RefUnwindSafe for Tables<K>
where EvaluatableUsize<{ metadata_size_bytes(K, 7) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 6) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 5) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 4) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 3) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 2) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 1) }>: Sized,

§

impl<const K: u8> Send for Tables<K>
where EvaluatableUsize<{ metadata_size_bytes(K, 7) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 6) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 5) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 4) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 3) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 2) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 1) }>: Sized,

§

impl<const K: u8> Sync for Tables<K>
where EvaluatableUsize<{ metadata_size_bytes(K, 7) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 6) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 5) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 4) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 3) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 2) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 1) }>: Sized,

§

impl<const K: u8> Unpin for Tables<K>
where EvaluatableUsize<{ metadata_size_bytes(K, 7) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 6) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 5) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 4) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 3) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 2) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 1) }>: Sized,

§

impl<const K: u8> UnwindSafe for Tables<K>
where EvaluatableUsize<{ metadata_size_bytes(K, 7) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 6) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 5) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 4) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 3) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 2) }>: Sized, EvaluatableUsize<{ metadata_size_bytes(K, 1) }>: Sized,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> JsonSchemaMaybe for T