[Peras 28] WIP implementing stateful voting committee handles#2002
Draft
agustinmista wants to merge 19 commits intoperas/concrete-certs-and-votesfrom
Draft
[Peras 28] WIP implementing stateful voting committee handles#2002agustinmista wants to merge 19 commits intoperas/concrete-certs-and-votesfrom
agustinmista wants to merge 19 commits intoperas/concrete-certs-and-votesfrom
Conversation
This commit uses the previously defined BLS-based crypto helpers to implement a TestCrypto scheme to be used by the upcoming property tests for WFALS and EveryoneVotes. 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>
This commit defines some common test helpers used by the upcoming property and conformance tests for both WFALS and EveryoneVotes. 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 reorganizes the existing model and conformance test infrastructure for WFALS in anticipation to the the tests for the real implementation implemented in the next commit. 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 adds conformance tests for the real WFALS implementation. In particular, we chech that the real implementation matches both the precomputed output of the rust prototype as well as the WFALS model against random stake distributions and target committee sizes. 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 property tests for the real WFALS implementation asserting that: * votes cast by eligible voters are successfully verifiable under the same voting committee, and * fake (illegal) votes are successfully rejected 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 property tests for the EveryoneVotes implementation asserting that: * votes cast by eligible voters are successfully verifiable under the same voting committee, and * fake (illegal) votes are successfully rejected 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 adds property tests to validate the implementation of ensureSameTarget, provided by the generic voting committee API. 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 adds property tests for the verification helpers for provided to use along with trivial aggregate vote signatuures and aggregate VRF outputs, which verify a collection of items by verifying each on individually in a loop. 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 a compact bitmaps via ByteStrings, adapted from the Leios voting committee demo package (leios-wfa-ls-demo): https://github.com/cardano-scaling/leios-wfa-ls-demo/blob/main/leios-wfa-ls-demo/lib/Cardano/Leios/BitMapPV.hs Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
This commit defines concrete data structures for Peras votes and certificates using BLS signatures to represent vote/cert signatures as well as non-persistent eligibility proofs. In addition it defines serialization routines for both types, using a compact bitmap representation in the case of certificates. Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
This commit defines a concrete PerasCrypto scheme using BLS signatures to instantiate all the voting committee superclasses needed by the WFALS and EveryoneVotes voting committee implementations. Note that these instances are heavily inspired by the ones defined for TestCrypto in the generic voting committee test-suite, albeit with slightly different types and more documentation. Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
This commit implements conversion routines between the brand-new (concrete) Peras votes and certificates and their corresponding (abstract) voting committee counterparts. This is done by introducing a `VotingCommitteeSupportsPeras` type class to allow us to easily change the underlying voting committee implementation via a proxy type. Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
This commit adds test helpers to aid with the definition of the upcoming roundtrip properties for concrete Peras votes and certificates. Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
This commit adds property tests for the newly added bitmap library asserting that both conversion from and/to indices as well as serialization roundtrip correctly. Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
This commit adds serialization roundtrip tests for the concrete Peras votes and certificate types. Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
…ommittee types This commit adds conversion rountrip tests between concrete Peras votes and certificates and their corresponding (abstract) counterparts in the WFALS and EveryoneVotes voting committee implementations. Notably, the roundtrip properties allow testing both total (WFALS) and partial (EveryoneVotes) conversions, generating both good and bad cases and contrasting them against their expected rountrip outcome. Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
Co-authored-by: Agustin Mista <agustin.mista@moduscreate.com> Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io> Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
b2af5bb to
25cb149
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a meaningful description of the PR and link the relevant issues
this PR might resolve.
Also note that:
WARNING
To update your feature branch if it's stale, please rebase it manually on top of
main. Don't update your feature branch by mergingmaininto it. Your pull request will not pass CI if you do.