Skip to main content

Table

Trait Table 

Source
pub trait Table:
    SolutionPotVerifier
    + Sized
    + Send
    + Sync
    + 'static {
    type Generator: TableGenerator<Self>;

    const TABLE_TYPE: PosTableType;

    // Required methods
    fn find_proof(&self, challenge_index: u32) -> Option<PosProof>;
    fn is_proof_valid(
        seed: &PosSeed,
        challenge_index: u32,
        proof: &PosProof,
    ) -> bool;

    // Provided methods
    fn generator() -> Self::Generator { ... }
    fn generator_for(_is_post_cutover: bool) -> Self::Generator { ... }
}
Expand description

Proof of space kind

Required Associated Constants§

Source

const TABLE_TYPE: PosTableType

Proof of space table type

Required Associated Types§

Source

type Generator: TableGenerator<Self>

Instance that can be used to generate tables with better performance

Required Methods§

Source

fn find_proof(&self, challenge_index: u32) -> Option<PosProof>

Try to find proof at challenge_index if it exists

Source

fn is_proof_valid( seed: &PosSeed, challenge_index: u32, proof: &PosProof, ) -> bool

Check whether proof created earlier is valid

Provided Methods§

Source

fn generator() -> Self::Generator

Returns a stateful table generator with better performance

Source

fn generator_for(_is_post_cutover: bool) -> Self::Generator

Table generator for a sector, given whether it was plotted after the cutover. Single-impl tables ignore the argument.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§