Skip to content

Conversation

andresilva
Copy link
Collaborator

@andresilva andresilva commented Oct 7, 2025

This PR merges simplex and threshold_simplex into a single simplex engine that is generic over the crypto to use in consensus. It introduces a new trait SigningScheme that encapsulates the signature and certificate types used in consensus messages as well as their signing and verification.

TODO:

  • Use Viewable/Epochable/Attributable traits
  • Rename supervisor to reporter
  • Certificate read config
  • Ed25519 signing scheme
  • Participants wrapper for fast membership checks
  • Cleanup quorum / threshold handling (e.g. in Round)
  • Handle remaining FIXMEs
  • Tests
    • Make test suite generic over signing scheme
    • Fix remaining types.rs tests
    • Add signing scheme specific tests
  • Docs
    • Search occurrences of the words threshold and seed
  • Marshal needs new SigningScheme on epoch change
    • Implications for certificate read config in immutable archive
  • Make remaining crates compile
    • examples/bridge (use bls12381 threshold signing scheme)
    • examples/log (use ed25519 signing scheme)
    • Propagate changes to Alto?
  • Remove simplex
  • Rename threshold_simplex to simplex

@patrick-ogrady
Copy link
Contributor

Copy link

codecov bot commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 95.95588% with 99 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.03%. Comparing base (d4c035c) to head (50c3e34).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...shold_simplex/signing_scheme/bls12381_threshold.rs 96.22% 39 Missing ⚠️
consensus/src/threshold_simplex/mocks/reporter.rs 90.70% 21 Missing ⚠️
...us/src/threshold_simplex/signing_scheme/ed25519.rs 96.70% 18 Missing ⚠️
consensus/src/marshal/actor.rs 55.26% 17 Missing ⚠️
...sensus/src/threshold_simplex/mocks/impersonator.rs 84.61% 2 Missing ⚠️
consensus/src/marshal/cache.rs 96.77% 1 Missing ⚠️
...sensus/src/threshold_simplex/actors/voter/actor.rs 99.25% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main    #1824      +/-   ##
==========================================
- Coverage   92.19%   92.03%   -0.17%     
==========================================
  Files         305      294      -11     
  Lines       79457    75100    -4357     
==========================================
- Hits        73255    69116    -4139     
+ Misses       6202     5984     -218     
Files with missing lines Coverage Δ
consensus/src/marshal/ingress/mailbox.rs 84.00% <100.00%> (ø)
consensus/src/marshal/mod.rs 99.81% <100.00%> (-0.01%) ⬇️
...nsus/src/threshold_simplex/actors/batcher/actor.rs 92.01% <100.00%> (+0.71%) ⬆️
...us/src/threshold_simplex/actors/batcher/ingress.rs 100.00% <100.00%> (ø)
...sus/src/threshold_simplex/actors/resolver/actor.rs 90.73% <100.00%> (+0.11%) ⬆️
...s/src/threshold_simplex/actors/resolver/ingress.rs 100.00% <100.00%> (ø)
...nsus/src/threshold_simplex/actors/voter/ingress.rs 100.00% <100.00%> (ø)
...onsensus/src/threshold_simplex/actors/voter/mod.rs 97.78% <100.00%> (-0.36%) ⬇️
consensus/src/threshold_simplex/config.rs 68.75% <ø> (ø)
consensus/src/threshold_simplex/engine.rs 92.36% <100.00%> (+0.17%) ⬆️
... and 16 more

... and 15 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4c035c...50c3e34. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[consensus::marshal] Generalize to additional consensus constructions

2 participants