Skip to content

[Peras 25] Conformance and property tests for voting committee implementations#1977

Open
agustinmista wants to merge 7 commits intoperas/bls-crypto-for-voting-committeesfrom
peras/voting-committee-tests
Open

[Peras 25] Conformance and property tests for voting committee implementations#1977
agustinmista wants to merge 7 commits intoperas/bls-crypto-for-voting-committeesfrom
peras/voting-committee-tests

Conversation

@agustinmista
Copy link
Copy Markdown
Contributor

@agustinmista agustinmista commented Apr 13, 2026

This PR provides:

  • Property tests for generic committee helpers (VotesWithSameTarget) and crypto instance definition helpers (trivialVerifyAggregate(VoteSignature|VRFOutput)).
  • Conformance tests for WFALS between the real implementation and:
    • the (Haskell) model, against randomly generated stake distributions,
    • the (Rust) prototype, against its precomputed outputs for the example stake distribution taken from mainnet.
  • Property tests for both WFALS and EveryoneVotes, asserting that:
    • votes cast by eligible voters are successfully verifiable under the same voting committee, and
    • fake (illegal) votes are successfully rejected.

NOTES:

  • The first two commits reorganize a bit the test suite (originally only containing WFALS tests), to share definitions and make room for EveryoneVotes tests.

@agustinmista agustinmista self-assigned this Apr 13, 2026
@agustinmista agustinmista marked this pull request as ready for review April 13, 2026 12:01
@dnadales dnadales moved this to 🗓️ Next up in Consensus Team Backlog Apr 13, 2026
@dnadales dnadales self-assigned this Apr 13, 2026
@agustinmista agustinmista force-pushed the peras/voting-committee-tests branch from 0fba5cd to ed32da6 Compare April 14, 2026 07:48
@agustinmista agustinmista force-pushed the peras/bls-crypto-for-voting-committees branch from d90d865 to 542a547 Compare April 14, 2026 07:48
@agustinmista agustinmista force-pushed the peras/voting-committee-tests branch from ed32da6 to fb6fc29 Compare April 14, 2026 14:04
@agustinmista agustinmista force-pushed the peras/bls-crypto-for-voting-committees branch from 542a547 to e6ad1a9 Compare April 14, 2026 14:04
@agustinmista agustinmista force-pushed the peras/voting-committee-tests branch 3 times, most recently from 01757d1 to 89aeea0 Compare April 15, 2026 12:44
@agustinmista agustinmista force-pushed the peras/bls-crypto-for-voting-committees branch from e6ad1a9 to 91664c2 Compare April 15, 2026 12:44
@qnikst qnikst linked an issue Apr 21, 2026 that may be closed by this pull request
@agustinmista agustinmista force-pushed the peras/voting-committee-tests branch from 8dfe125 to 9af74bb Compare April 21, 2026 09:53
@agustinmista agustinmista force-pushed the peras/bls-crypto-for-voting-committees branch from 91664c2 to 0b3f25f Compare April 21, 2026 09:53
agustinmista and others added 5 commits April 24, 2026 13:14
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>
agustinmista and others added 2 commits April 24, 2026 13:14
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>
@agustinmista agustinmista force-pushed the peras/voting-committee-tests branch from 9af74bb to 6a7c5f1 Compare April 24, 2026 11:15
@agustinmista agustinmista force-pushed the peras/bls-crypto-for-voting-committees branch from 0b3f25f to 1e2b1a9 Compare April 24, 2026 11:15
@jasagredo jasagredo moved this from 🗓️ Next up to 👀 In review in Consensus Team Backlog Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Implement committee selection schemes

3 participants