Crate pallet_subspace
source ·Expand description
Subspace consensus pallet.
This pallet is in many ways complementary to sc-consensus-subspace
.
Pallet maintains crucial state required for Subspace Proof-of-Archival-Storage consensus:
- global randomness
- based on c-correlation from https://arxiv.org/abs/1910.02218
- is used to later derive together with time slot a global challenge
- solution range, which is a range of valid solution for Proof-of-Archival-Storage puzzle
- conceptually similar to work difficulty in Proof-of-Work consensus
- is updated every Era
- inherents for:
- storing segment headers and maintaining mapping from segment index to corresponding segment commitment such that validity of piece from solution can be checked later
- handling of farmer equivocation (together with
pallet-offences-subspace
) and maintaining list of blocked farmers (effectively burned plots)
Pallet also provides handy API for finding block author, block reward address, randomness and some others.
License: Apache-2.0
Re-exports§
pub use pallet::*;
Modules§
- An opt-in utility module for reporting equivocations.
- The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet. - Autogenerated weights for pallet_subspace
Structs§
- A type signifying to Subspace that it should perform era changes with an internal trigger.
Traits§
- Trigger an era change, if any should take place.