Skip to content

Conversation

@clabby
Copy link
Collaborator

@clabby clabby commented Jan 8, 2026

Overview

Improves the consensus crate's usage of commonware-parallel. Introduced in #2621, the threshold scheme was generic over the Strategy trait, which created a huge pain for downstream consumption. Now, the scheme's functions that can take advantage of the Strategy just accept one, and the consensus engines feed it in.

This PR is mainly focused on fixing up the API, which was very painful to integrate into alto beforehand. Performance improvements for the issues spotted in the alto deployment (commonwarexyz/alto#167) are delegated to #2759.

@clabby clabby self-assigned this Jan 8, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 8, 2026

Deploying monorepo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 91bf1d5
Status: ✅  Deploy successful!
Preview URL: https://2cb95376.monorepo-eu0.pages.dev
Branch Preview URL: https://cl-improve-consensus-paralle.monorepo-eu0.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
commonware-mcp 91bf1d5 Jan 09 2026, 04:54 AM

rng: &mut R,
subject: Subject<'_, D>,
attestations: I,
_strategy: &impl Strategy,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is updated by #2759

@clabby clabby force-pushed the cl/improve-consensus-parallel-api branch from 804d8de to 2834155 Compare January 8, 2026 23:54
@clabby clabby changed the title Cl/improve consensus parallel api [consensus] Improve consensus' usage of Strategy Jan 8, 2026
@clabby clabby marked this pull request as ready for review January 9, 2026 00:48
patrick-ogrady and others added 4 commits January 8, 2026 20:15
Resolve merge conflict in threshold.rs imports.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…parallel-api

# Conflicts:
#	consensus/src/simplex/actors/resolver/state.rs
#	consensus/src/simplex/actors/voter/round.rs
#	consensus/src/simplex/types.rs
@patrick-ogrady patrick-ogrady merged commit ce99e0d into main Jan 9, 2026
124 checks passed
@patrick-ogrady patrick-ogrady deleted the cl/improve-consensus-parallel-api branch January 9, 2026 05:06
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 98.95013% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.31%. Comparing base (002fbd5) to head (91bf1d5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
consensus/src/simplex/types.rs 94.78% 6 Missing ⚠️
cryptography/src/certificate.rs 77.77% 2 Missing ⚠️
@@            Coverage Diff             @@
##             main    #2762      +/-   ##
==========================================
+ Coverage   93.29%   93.31%   +0.02%     
==========================================
  Files         372      372              
  Lines      114291   114643     +352     
==========================================
+ Hits       106628   106983     +355     
+ Misses       7663     7660       -3     
Files with missing lines Coverage Δ
consensus/src/aggregation/engine.rs 85.14% <100.00%> (+0.02%) ⬆️
consensus/src/aggregation/mocks/reporter.rs 87.85% <100.00%> (ø)
consensus/src/aggregation/mod.rs 97.96% <100.00%> (+0.01%) ⬆️
consensus/src/aggregation/types.rs 97.44% <100.00%> (+0.04%) ⬆️
consensus/src/marshal/actor.rs 92.89% <100.00%> (+0.01%) ⬆️
consensus/src/marshal/mod.rs 95.28% <100.00%> (+<0.01%) ⬆️
consensus/src/ordered_broadcast/ack_manager.rs 99.36% <100.00%> (+0.01%) ⬆️
consensus/src/ordered_broadcast/engine.rs 86.05% <100.00%> (+0.10%) ⬆️
consensus/src/ordered_broadcast/mocks/reporter.rs 85.82% <100.00%> (ø)
consensus/src/ordered_broadcast/mod.rs 99.08% <100.00%> (+<0.01%) ⬆️
... and 25 more

... and 1 file 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 0d73321...91bf1d5. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants