Skip to content

refactor(zk): own protocol proof request execution - #2329

Open
neogiacomo wants to merge 1 commit into
refactor/compute-ownershipfrom
refactor/zk-request-execution
Open

neogiacomo wants to merge 1 commit into
refactor/compute-ownershipfrom
refactor/zk-request-execution

Conversation

@neogiacomo

Copy link
Copy Markdown
Contributor

What and why

Stack: #2327 -> this PR -> native TrBFV execution follow-up. Base: refactor/compute-ownership; merge/review in that order. Refs #2321 and #2221; this is the protocol-request adapter boundary, not a redesign of the reusable backend/process runner.

  • Move C0-C7 preparation/proving, share-proof verification, recursive request adapters and their existing tests from multithread to zk/prover/src/request_execution.rs.
  • Expose synchronous execute_zk_request and stable zk_operation_name APIs. Admission, replay/retry policy, cancellation, correlation publication and reporting actors stay in the dispatcher. Node-fold timings cross the boundary as data through a callback, not an Actix dependency.
  • Remove the dispatcher's direct polynomial, witness, configuration and FHE dependencies. Make the execution owner's previously test-only dependencies explicit normal dependencies.
  • Preserve upstream signature admission, all existing witness computations, work IDs, artifact selection, response/error envelopes and telemetry labels. The dispatcher does not create an extra request clone at the new boundary.
  • Replace the transitional ZK ownership paragraph with the actual owner map. The remaining stack item is native TrBFV request execution/result adaptation.

Verification

Commands used the shared build cache, E3_ZK_PROVER_SKIP_FIXTURE_BUILD=1, debug information disabled and four Cargo build jobs. The fixture flag prevents incidental circuit generation; it is not proof acceptance.

  • cargo check --offline -p e3-multithread --lib: passed with the production dependency graph.
  • cargo test --locked --offline -p e3-zk-prover --lib request_execution::: 4 passed, 1 prepared C7 test ignored.
  • cargo test --locked --offline -p e3-multithread -p e3-zk-prover -p e3-ciphernode-builder --lib: reported 240 passed, 2 ignored. The artifact-dependent C0 recovery test returns early without matching compiled C0 artifacts; do not count that as crypto evidence.
  • cargo clippy --locked --offline --no-deps -p e3-multithread -p e3-zk-prover --lib -- -D warnings: passed.
  • One-time read-only comparison of all 17 relocated helpers: 16 bodies/string literals unchanged apart from formatting/self-crate qualification; the node-fold adapter replaces its report-actor send with a timing callback while retaining the same proof invocation.
  • Blueprint check/navigation tests, repository configuration and documentation-link checks passed. Normal commit/push hooks retained.

New public-boundary coverage checks C6 validation, correlation identity, rejected request kinds, and retryable verifier-process errors versus completed statement rejection. Prepared real-proof tests are still required for acceptance; no local full proof campaign or new artifact qualification is claimed. The existing broad strict-Clippy findings in untouched zk/config are not changed or suppressed.

Compatibility

Review references: proof statements, DKG, threshold decryption, persistence/replay.

Read-only self-review found no intended change to cryptographic statements, parameters, witness/JSON/public-input shape, committee ordering, signatures, durable/wire encodings or deployed verifier compatibility. No artifact restamping/regeneration or release-counter change is proposed. The proposed rollout is a normal rolling binary upgrade without data migration; rollback retains the previous binary and unchanged formats/artifacts, subject to human review and CI qualification.

The executor API is additive and protocol-specific. It creates no pool, retry loop, signing operation or bus publication; callers must use the existing bounded execution boundary. The parent's explicit Rust constructor changes remain documented in #2327. This does not close the durability/outbox design in #2265 or authorize package publication/deployment.

@neogiacomo neogiacomo added documentation Improvements or additions to documentation ciphernode Related to the ciphernode package noir Task related to the noir fork or noir focussed code refactoring improving a software's internal structure without changing its external behavior or functionality labels Oct 20, 2026
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
interfold-dashboard Ready Ready Preview Oct 20, 2026 5:04pm UTC
interfold-docs Ready Ready Preview Oct 20, 2026 5:04pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: theinterfold/interfold/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7472c2e5-f3c4-427f-a1de-768a566d6792
📥 Commits

Reviewing files that changed from the base of the PR and between 3854b35 and 96f2331.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 11
  • crates/multithread/Cargo.toml
  • crates/multithread/README.md
  • crates/multithread/src/multithread.rs
  • crates/zk/prover/Cargo.toml
  • crates/zk/prover/README.md
  • crates/zk/prover/src/lib.rs
  • crates/zk/prover/src/request_execution.rs
  • crates/zk/prover/src/request_execution_tests.rs
  • scripts/blueprint/facts/02-clients-compute.json
  • scripts/blueprint/facts/05-zk.json
  • scripts/blueprint/refs/B-ciphernode.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Architecture change

From a739f01bf to 96f23318e. Open this change in the blueprint: green is new, red is removed and yellow is changed, and a number on a box counts the changes inside it.

Before After New Removed
Crate dependencies 291 287 5 9
Every change (14)
  • e3-zk-prover now depends on e3-bfv-client
  • e3-zk-prover now depends on e3-crypto
  • e3-zk-prover now depends on e3-polynomial
  • e3-zk-prover now depends on e3-polynomial-fhe
  • e3-zk-prover now depends on e3-trbfv
  • e3-multithread no longer depends on e3-bfv-client
  • e3-multithread no longer depends on e3-committee
  • e3-multithread no longer depends on e3-committee-hash
  • e3-multithread no longer depends on e3-data
  • e3-multithread no longer depends on e3-fhe-params
  • e3-multithread no longer depends on e3-polynomial
  • e3-multithread no longer depends on e3-polynomial-fhe
  • e3-multithread no longer depends on e3-zk-config
  • e3-multithread no longer depends on e3-zk-witness

Experimental. The page goes away when the pull request closes. scripts/blueprint/diff/README.md says how to turn it off or remove it.

Refs #2321. Move protocol ZK adapters and their tests into the prover owner, leaving resource admission, replay/retry policy and result publication in the dispatcher.

This branch was successfully deployed

3 active deployments
github-pages — 96f23318 Deployed Oct 20, 2026 by neogiacomo via Publish the previews #261
Preview – interfold-docs — 96f23318 Deployed Oct 20, 2026 by vercel[bot]
Preview – interfold-dashboard — 96f23318 Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciphernode Related to the ciphernode package documentation Improvements or additions to documentation noir Task related to the noir fork or noir focussed code refactoring improving a software's internal structure without changing its external behavior or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant