Preperation for ValidatorSet
#2567
colibrishin
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
cc. pbft @greymistcube @limebell, pos @riemannulus @OnedgeLee
Context
Currently, we are using static validator lists for simplicity (
Policy.GetValidatorSet()
) in PBFT. If we are moving onto theValidatorSet
that changes, some changes seem to be required. This addresses from an abstract perspective. These are not sealed and stamped or "must have".ValidatorSet
A
ValidatorSet
is a set ofValidator
'sPublicKey
s that have joined into consensus. There should be a place to store and track changes (e.g.,State
). The content ofValidatorSet
can be changed. See also Transaction.Based on #2558 and #2541 use cases, the previous and current${2}$ is a current block, and in appending.) :
ValidatorSet
s are needed (In this example, Block #ValidatorSet
for validating theLastCommit
.ValidatorSet
for validating the currentBlock
'sCommit
.The validation of
BlockCommit
12 (LastCommit
andCommit
) is about checking whetherVote
s inBlockCommit
are from the givenValidatorSet
.Implementation status
Currently, we have two
ValidatorSet
definitions in libplanet/pbft and libplanet/pos. AValidatorSet
for validating the current and previousBlockCommit
is fromPolicy.GetValidatorSet()
, which returns staticValidator
s. It seems a baseline needs to be defined.Previous
ValidatorSet
forLastCommit
A
LastCommit
is a set of commits of the previousBlock
. For validating, aLastCommit
needs the previousValidatorSet
. There are multiple ways to retrieve the previousValidatorSet
with simplicity (e.g.,State
, from the previousBlock
, store the previousValidatorSet
temporarily.)Implementation status
We don't track the previous
ValidatorSet
. This work looks dependent onLastCommit
and storingValidatorSet
. It seems to be in PBFT scope.Transaction (Partially PoS)
A
ValidatorSet
can be changed by a node or validator's decision, which means aTransaction
of "mutating"ValidatorSet
is needed.3 ATransaction
is created by the node itself and it holds whether a node registers/unregisters as a validator. The detailed specification and implementation need to be discussed.Implementation status
The implementation exists in libplanet/pos. This seems partially in PBFT scope.
Block
A
Block
holds the Txs of the node's decision and theValidatorSet
of the currentBlock
. The currentValidatorSet
is used for checking whether the known node'sValidatorSet
(e.g., inState
) is identical toBlock
'sValidatorSet
(Added for checking integrity.)Implementation status
We don't have the current
ValidatorSet
field inBlock
. Above Tx is defined in libplanet/pos. It seems to be decided in PBFT.See also
Footnotes
In consensus, If +2/3
PreCommit
messages are collected for a height ( $\simeq$ index), and a lockedBlock
, then theBlock
is committed (appended) intoBlockChain
. ↩Having +2/3 commits in
BlockCommit
is checked in the constructor. ↩A
Validator
node will join into or remove itself from theValidator
"pool" by sending Tx. AValidator
node participates in consensus, then votes and proposes a nextBlock
. ↩Beta Was this translation helpful? Give feedback.
All reactions