[Peras 23] wFA^LS and EveryoneVotes voting committee implementations#1975
Conversation
4fcfdf3 to
19f3766
Compare
d6a1575 to
8ead4f4
Compare
19f3766 to
9c10f37
Compare
8ead4f4 to
7381729
Compare
9c10f37 to
9bd7727
Compare
7381729 to
047702c
Compare
047702c to
c5b05a6
Compare
9bd7727 to
ddbf3ee
Compare
| Array | ||
| SeatIndex | ||
| ( PoolId -- Voter ID of this voter | ||
| , a -- Extra payload associated to this voter |
There was a problem hiding this comment.
Could you give an example here (eg pubkey I guess?)
There was a problem hiding this comment.
I'm not I understand what you would like to see here
There was a problem hiding this comment.
Sorry, I meant an example of the extra payload associated to the voter (I don't know if pubkey is one such example).
dnadales
left a comment
There was a problem hiding this comment.
Thanks for the round of fixes.
One follow-up worth surfacing: with UniqueVotesWithSameTarget from #2020 closing the type-level dedup hazard, the remaining caller contract — cmpVotes must order Eq on shared SeatIndex for both WFALS and EveryoneVotes Vote constructors — will need to be wired correctly at the Peras integration site. Worth adding this to a production-readiness tracker (new or existing).
dnadales
left a comment
There was a problem hiding this comment.
Thanks for the round of fixes.
544897f to
8fa80b6
Compare
2165523 to
663a8cb
Compare
8fa80b6 to
3fe34cd
Compare
663a8cb to
3c84f5e
Compare
3fe34cd to
465919f
Compare
3c84f5e to
93a201b
Compare
465919f to
1e8dc62
Compare
93a201b to
8915540
Compare
1e8dc62 to
ff292c6
Compare
8915540 to
54452b6
Compare
This commit implements the deterministic core of the weighted Fait-Accompli algorithm using a precomputed extended stake distribution, shareable across multiple voting committees running on the same epoch. The implementation includes a tiebreaker mechanism to allow altering the order of pools with the same stake when the threshold index between persistent and non-persistent voters would land between them. This can later be instantiated to allow for a fair split across epochs. Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com>
This commit implements the local sortition fallback scheme needed by wFA^LS to allocate non-persistent voters. Each non-persistent voter provides a VRF output that gets normalized and compared against the output of a numerically-stable stake-weighted Poisson distribution. Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com>
This commit defined the weighted Fait-Accompli with local soritition voting scheme (WFALS) using the separate WFA and LS components. This includes the definition of both persistent and non-pesistent abstract votes and abstract certificates. NOTE: it is the job of the low-level vote and certificate implementation to provide the plumbing needed to convert between abstract and concrete values, possibly allowing the same concrete definitions to work with multiple voting commitee implementations. Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com>
This commit implements EveryoneVotes a simpler alternative to WFALS where every voter with non-negative stake is entitled to vote. This exists as a baseline to run benchmarks against later on. Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com>
Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com>
ff292c6 to
6dc3c20
Compare
This PR implements two concrete voting committee strategies:
WFALS), andEveryoneVotes)While Peras will use
WFALSat the beginning,EveryoneVotesserves as a baseline for future benchmarks, as well as a starting point for Leios shall they end up opting for a simpler approach.NOTES:
WFALSdepends on two separate sub-componenents:WFA: the pure weighted Fait-Accompli seat split algorithm, which relies on an "extended stake distribution"ExtWFAStakeDistr(a sorted array of pools with cumulative stake). The latter can be precomputed at the beginning of an epoch and shared across multiple voting committees (e.g. shared between Leios and Peras).LS: the Local Sortition check for non-persistent voters, mapping their VRF outputs into seats sampled through a Poisson distribution.For simplicity,
EveryoneVotesreuses the sameExtWFAStakeDistras WFALS. This way, if Leios is instantiated withEveryoneVotes, it could still use the same precomputed data as Peras.Both voting committee implementations defined their own abstract vote and certificate type and it's up to the clients to marshal between these types and their concrete ones (possibly using the same underlying representation and serialization routines)