Skip to content

Pipelined Simplex (Optimistic Verification) - #190

Open
BrendanChou wants to merge 14 commits into
mainfrom
bc/optimistic
Open

Pipelined Simplex (Optimistic Verification)#190
BrendanChou wants to merge 14 commits into
mainfrom
bc/optimistic

Conversation

@BrendanChou

@BrendanChou BrendanChou commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

This integrates Commonware's pipelined Simplex path so a stable leader can prepare up to 100 proposals ahead of the active view and target 10 ms block intervals.

  • Pin all Commonware dependencies to main at fca67b22, which contains commonwarexyz/monorepo#3416.
  • Switch consensus to 1,000-view round-robin terms with a 100-view optimistic window, a 12-second stall timeout, and disabled forwarding.
  • Pace proposal timestamps at 10 ms, reject timestamps more than one second ahead, retain 256 views, and adapt marshal, follower, and indexer storage integrations to the current Commonware APIs.
  • Tune validator networking for this workload: 1,500/s base channels, 3,000/s voting and marshal channels, one tracked peer set, and a dedicated Rayon signature pool.
  • Export validator traces to the monitoring host's private Tempo endpoint and update Grafana panels for throughput, timeouts, and regional notarization and finalization latency.
  • Make validator builds explicit for Graviton (neoverse-v1) and Intel (emeraldrapids) with Docker Buildx and Just recipes.

Validation

  • cargo check --locked --workspace --all-targets
  • cargo test --locked --workspace --all-targets
  • cargo fmt --all -- --check
  • just --fmt --check
  • git diff --check

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 27, 2026

Copy link
Copy Markdown

Deploying alto with  Cloudflare Pages  Cloudflare Pages

Latest commit: 304b823
Status: ✅  Deploy successful!
Preview URL: https://97aa927e.alto-8k4.pages.dev
Branch Preview URL: https://bc-optimistic.alto-8k4.pages.dev

View logs

@patrick-ogrady patrick-ogrady changed the title [WIP] Integrate stable-leader and optimistic proposals Pipelined Simplex (Optimistic Verification) Aug 10, 2026
@patrick-ogrady
patrick-ogrady marked this pull request as ready for review August 10, 2026 23:35
Comment thread chain/src/application.rs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 304b823. Configure here.

Comment thread validator/src/main.rs
.checked_add(encoded_size)
.filter(|size| *size <= authenticated::MAX_SIZE)
.expect("block size exceeds authenticated transport maximum")
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Large blocks exceed indexer body limit

Medium Severity

configured_max_message_size and --block-size allow payloads around 2 MiB, and tests cover that value, but indexer upload handlers still use Axum’s default 2 MiB Bytes body limit with no raised DefaultBodyLimit. Encoded blocks at that size already exceed the limit once headers and the length prefix are included, so certificate and block uploads to the indexer fail while validators keep producing those blocks.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 304b823. Configure here.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.65089% with 97 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.70%. Comparing base (b880582) to head (304b823).

Files with missing lines Patch % Lines
validator/src/main.rs 35.08% 37 Missing ⚠️
follower/src/archive.rs 19.35% 25 Missing ⚠️
deploy/src/main.rs 89.14% 19 Missing ⚠️
types/src/block.rs 74.07% 14 Missing ⚠️
chain/src/application.rs 99.23% 1 Missing ⚠️
follower/src/main.rs 0.00% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #190      +/-   ##
==========================================
+ Coverage   67.36%   69.70%   +2.34%     
==========================================
  Files          30       30              
  Lines        5619     6162     +543     
==========================================
+ Hits         3785     4295     +510     
- Misses       1834     1867      +33     
Files with missing lines Coverage Δ
chain/src/engine.rs 99.14% <100.00%> (+0.28%) ⬆️
chain/src/indexer/backfiller/consumer.rs 84.84% <100.00%> (-0.51%) ⬇️
chain/src/indexer/backfiller/state.rs 99.43% <100.00%> (+<0.01%) ⬆️
chain/src/indexer/pusher.rs 96.39% <100.00%> (-0.04%) ⬇️
chain/src/lib.rs 98.62% <100.00%> (+1.64%) ⬆️
follower/src/engine.rs 97.77% <100.00%> (+0.01%) ⬆️
follower/src/resolver.rs 89.15% <ø> (ø)
follower/src/test_utils.rs 77.06% <100.00%> (+1.10%) ⬆️
indexer/src/lib.rs 95.76% <100.00%> (+0.11%) ⬆️
inspector/src/main.rs 0.00% <ø> (ø)
... and 7 more

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b880582...304b823. 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