Expand description
The signed pallet The signed phase of the multi-block election system.
Signed submissions work on the basis of keeping a queue of submissions from unknown signed accounts, and sorting them based on the best claimed score to the worst.
Each submission must put a deposit down. This is parameterize-able by the runtime, and might be
a constant, linear or exponential value. See signed::Config::DepositPerPage
and
signed::Config::DepositBase
.
During the queuing time, if the queue is full, and a better solution comes in, the weakest
deposit is said to be Ejected. Ejected solutions get signed::Config::EjectGraceRatio
of
their deposit back. This is because we have to delete any submitted pages from them on the spot.
They don’t get any refund of whatever tx-fee they have paid.
Once the time to evaluate the signed phase comes (Phase::SignedValidation
), the solutions are
checked from best-to-worst claim, and they end up in either of the 3 buckets:
- Rewarded: If they are the first correct solution (and consequently the best one, since we start evaluating from the best claim), they are rewarded. Rewarded solutions always get both their deposit and transaction fee back.
- Slashed: Any invalid solution that wasted valuable blockchain time gets slashed for their deposit.
- Discarded: Any solution after the first correct solution is eligible to be peacefully
discarded. But, to delete their data, they have to call
signed::Call::clear_old_round_data
. Once done, they get their full deposit back. Their tx-fee is not refunded.
§Future Plans:
Lazy Deletion In Eject: While most deletion ops of the signed phase are now lazy, if someone is ejected from the list, we still remove their data in sync.
Metadata update: imagine you mis-computed your score.
Permissionless clear_old_round_data
: Anyone can clean anyone else’s data, and get a part
of their deposit.
Re-exports§
pub use crate::weights::traits::pallet_election_provider_multi_block_signed::*;
pub use pallet::*;
Modules§
- pallet
- The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet.
Structs§
- Submission
Metadata - All of the (meta) data around a signed submission
Traits§
- Calculate
Base Deposit - Something that can compute the base deposit that is collected upon
register
. - Calculate
Page Deposit - Something that can calculate the deposit per-page upon
submit
.