Break down NPOS & POS implementation used in Substrate / Polkadot #48
Unanswered
chungquantin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Link to the Facebook thread: https://www.facebook.com/groups/1202788154012237/posts/1217539365870449/
Implementation Guide
Nominated Proof of Stake in Substrate
Substrate uses Nominated Proof-of-Stake (NPoS) in the consensus algorithm. Nodes can apply to become validators, and other users in the network can nominate different validators and candidates. Elections are held at regular intervals, and the election algorithm used is the Phragmén method . The winning node will become the next round of official validators, participating in block production, block finality voting, etc.
NPoS functionality relies on a series of modules,
Staking
: used to manage verification, nomination, cancellation of verification, nomination, verifier score statistics and reward distribution, etc.;Session
: Manage the session keys of the validator (Session Keys), control the length and rotation of the Session;Authorship
: Used in runtime to track the current block producer and uncles. The staking module uses this information to count the points used for rewards;offenses, babe, grandpa, im-online
: work together to deal with illegal writing of validators. Just like a validator produces multiple blocks in the current slot, GRANDPA voters vote multiple times for different blocks in the same round. A large number of the validator is offline for a long time, etc.;Utility
: Implements the auxiliary function of sending transactions in batches, which is needed by validators to withdraw rewards through front-end apps.If you are interested in how to add the above different modules step by step, you can refer to the code submission record here .
Reference
Beta Was this translation helpful? Give feedback.
All reactions