Crate subspace_verification

Source
Expand description

Verification primitives for Subspace.

Structs§

PieceCheckParams
Parameters for checking piece validity
VerifySolutionParams
Parameters for solution verification

Enums§

Error
Errors encountered by the Subspace consensus primitives.

Functions§

calculate_block_weight
Calculate weight derived from provided solution range
check_reward_signature
Check the reward signature validity.
derive_next_solution_range
Derives next solution range based on the total era slots and slot probability
derive_pot_entropy
Derive proof of time entropy from chunk and proof of time for injection purposes.
is_piece_valid
Validate witness embedded within a piece produced by archiver
is_record_commitment_hash_valid
Validate witness for record commitment hash produced by archiver
is_within_solution_range
Returns Some(solution_distance) if solution distance is within the solution range for provided parameters.
verify_solution
Verify whether solution is valid, returns solution distance that is <= solution_range/2 on success.