Expand description
Verification primitives for Subspace.
Structs§
- Piece
Check Params - Parameters for checking piece validity
- Verify
Solution Params - 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.