Skip to content

fix: plaintext aggregator ignore unrelated fold proofs#1470

Merged
cedoor merged 8 commits intomainfrom
fix/plaintext-aggregator-ignore-unrelated-fold-proofs
Mar 25, 2026
Merged

fix: plaintext aggregator ignore unrelated fold proofs#1470
cedoor merged 8 commits intomainfrom
fix/plaintext-aggregator-ignore-unrelated-fold-proofs

Conversation

@cedoor
Copy link
Member

@cedoor cedoor commented Mar 23, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Improved fold-proof response handling to ignore unrelated correlation responses and use a safe fallback when expected state is absent.
    • Broadened sync event selection to include certain forwarded local events in addition to network events.
  • Chores

    • Updated Barretenberg download source and related configuration to a different release endpoint.

cedoor added 2 commits March 23, 2026 12:25
- Gate C6 fold handling on pending correlation (ProofFoldState::awaits_correlation).
- Avoid error when PK or other actors emit FoldProofs for the same e3_id.
- Use compute-response EventContext if last_ec is missing when advancing fold.

Made-with: Cursor
@vercel
Copy link

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
crisp Ready Ready Preview, Comment Mar 25, 2026 11:03am
enclave-docs Ready Ready Preview, Comment Mar 25, 2026 11:03am

Request Review

@cedoor cedoor requested a review from ctrlc03 March 23, 2026 11:29
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 23, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added correlation checking for fold-proof responses, widened sync event selection to include forwardable local events, and changed Barretenberg download URLs from AztecProtocol to gnosisguild/enclave release endpoints.

Changes

Cohort / File(s) Summary
Correlation-aware Fold Response Handling
crates/aggregator/src/proof_fold.rs, crates/aggregator/src/threshold_plaintext_aggregator.rs
Added ProofFoldState::awaits_correlation(&CorrelationId) -> bool and updated handling of ComputeResponseKind::Zk(ZkResponse::FoldProofs(...)) to ignore fold responses that don't match the expected correlation; when matched, select fold_ec from last_ec or current ec before handling.
Event Sync Filtering
crates/net/src/net_sync_manager.rs
Expanded Handler<EventStoreQueryResponse> filtering to include events with source() == EventSource::Net OR source() == EventSource::Local that satisfy NetEventTranslator::is_forwardable_event(e).
Barretenberg Download Source Migration
.github/workflows/ci.yml, crates/zk-prover/versions.json
Repointed Barretenberg tarball download URLs from AztecProtocol/aztec-packages to gnosisguild/enclave releases (fixed path tag v0.1.15 and modified filename template); CI step download/extract flow unchanged.

Sequence Diagram(s)

(omitted — changes are small, isolated control-flow updates and CI/config edits)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • ryardley
  • hmzakhalid

Poem

🐇 I nibble logs and follow threads,
Correlations kept inside my head.
I forward hops from near and far,
And fetch a tarball from a different star.
Hopping through changes — cheer and cred!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: updating the plaintext aggregator to ignore fold proof responses unrelated to the expected correlation.
Docstring Coverage ✅ Passed Docstring coverage is 90.91% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/plaintext-aggregator-ignore-unrelated-fold-proofs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

887-899: Consider extracting bb installation to a reusable composite action.

This bb installation block is duplicated from lines 800-810. Consider extracting to a reusable composite action (e.g., .github/actions/install-bb/action.yml) to reduce duplication and simplify maintenance.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 887 - 899, Extract the repeated bb
installation shell block (the script that computes TAG and BBV from
crates/zk-prover/versions.json, builds DEFAULT/URL, downloads and untars bb,
finds BB_BIN and installs it to /usr/local/bin/bb) into a reusable composite
action (e.g., .github/actions/install-bb/action.yml) that accepts an input for
ENCLAVE_BB_AMD64_LINUX_URL and any needed file paths; then replace both
duplicated blocks in ci.yml with a single uses: call to the composite action
passing the ENCLAVE_BB_AMD64_LINUX_URL env/input so the logic around TAG, BBV,
DEFAULT, URL and BB_BIN lives only in the new install-bb action.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/zk-prover/versions.json`:
- Around line 4-5: The pipeline fails because the GitHub release referenced by
bb_github_release_tag ("v0.1.15") does not include the barretenberg tarball
pointed to by bb_download_url; fix by either uploading the missing release asset
named barretenberg-amd64-linux-3.0.0-nightly.20260102.tar.gz to the v0.1.15
GitHub release so the bb_download_url resolves, or update the CI to use an
alternate URL by setting the repository variable ENCLAVE_BB_AMD64_LINUX_URL to a
valid location for that asset (ensure the variable matches the asset filename
and the download template in bb_download_url).

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 887-899: Extract the repeated bb installation shell block (the
script that computes TAG and BBV from crates/zk-prover/versions.json, builds
DEFAULT/URL, downloads and untars bb, finds BB_BIN and installs it to
/usr/local/bin/bb) into a reusable composite action (e.g.,
.github/actions/install-bb/action.yml) that accepts an input for
ENCLAVE_BB_AMD64_LINUX_URL and any needed file paths; then replace both
duplicated blocks in ci.yml with a single uses: call to the composite action
passing the ENCLAVE_BB_AMD64_LINUX_URL env/input so the logic around TAG, BBV,
DEFAULT, URL and BB_BIN lives only in the new install-bb action.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b65783c5-2098-432e-a9a0-791077396d72

📥 Commits

Reviewing files that changed from the base of the PR and between c52fa4f and 42767bd.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • crates/zk-prover/src/backend/download.rs
  • crates/zk-prover/src/backend/mod.rs
  • crates/zk-prover/src/config.rs
  • crates/zk-prover/versions.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

881-881: Duplicate hardcoded URL—same concern as line 799.

This is the same change in the zk_prover_e2e job. If the release tag is updated, both locations (lines 799 and 881) must be kept in sync.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml at line 881, Duplicate hardcoded release URL
appears twice (the curl line using env.BB_VERSION in the zk_prover_e2e job);
extract the URL or release tag into a single reusable variable (e.g., BB_RELEASE
or BB_DOWNLOAD_URL) at the workflow/env/top-level and update the curl invocation
in the zk_prover_e2e job (the curl -fsSL "...barretenberg-amd64-linux-${{
env.BB_VERSION }}.tar.gz" -o bb.tar.gz line) to reference that variable so both
jobs share the same source of truth; ensure you replace the other identical curl
usage (the one already noted at line ~799) to reference the same variable so
future tag changes only require one edit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Line 881: Duplicate hardcoded release URL appears twice (the curl line using
env.BB_VERSION in the zk_prover_e2e job); extract the URL or release tag into a
single reusable variable (e.g., BB_RELEASE or BB_DOWNLOAD_URL) at the
workflow/env/top-level and update the curl invocation in the zk_prover_e2e job
(the curl -fsSL "...barretenberg-amd64-linux-${{ env.BB_VERSION }}.tar.gz" -o
bb.tar.gz line) to reference that variable so both jobs share the same source of
truth; ensure you replace the other identical curl usage (the one already noted
at line ~799) to reference the same variable so future tag changes only require
one edit.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e1433db5-42e1-47a6-9bc6-d81950a0f0ea

📥 Commits

Reviewing files that changed from the base of the PR and between 42767bd and 1abb4e4.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • crates/zk-prover/versions.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/zk-prover/versions.json

Copy link
Member

@0xjei 0xjei left a comment

Choose a reason for hiding this comment

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

utACK

@cedoor cedoor merged commit ce3d331 into main Mar 25, 2026
28 checks passed
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