chore(zk-host): orchestrate groth16 aggregation#3760
Conversation
81402dd to
53f88f5
Compare
a616c18 to
d6059e9
Compare
d6059e9 to
ad17dd2
Compare
ad17dd2 to
dc54f02
Compare
dc54f02 to
414f4ed
Compare
414f4ed to
9c0d54d
Compare
9c0d54d to
c169874
Compare
🟡 Heimdall Review Status
|
7d3a72a to
5a20aae
Compare
ZK host now treats SnarkGroth16 jobs as a composed range-to-aggregation flow: it records the initial STARK range session, lets backends advance to a SNARK aggregation session, and resumes from the recorded SNARK session so prover-service continues handling a single generic proof request. Co-authored-by: Codex <codex-noreply@coinbase.com>
5a20aae to
42e1fa4
Compare
| // Reuse the configured proof limits for both range and aggregation stages. | ||
| cycle_limit: self.config.range_cycle_limit, | ||
| gas_limit: self.config.range_gas_limit, |
There was a problem hiding this comment.
Stale comment: this says "Reuse the configured proof limits for both range and aggregation stages" but the aggregation request (line 856-857) now correctly uses aggregation_cycle_limit / aggregation_gas_limit. This comment should be removed or updated to just say these are the range-specific limits.
| // Reuse the configured proof limits for both range and aggregation stages. | |
| cycle_limit: self.config.range_cycle_limit, | |
| gas_limit: self.config.range_gas_limit, | |
| cycle_limit: self.config.range_cycle_limit, | |
| gas_limit: self.config.range_gas_limit, |
| async fn download(&self, backend_session_id: &str) -> Result<ProofResult, ZkProverError> { | ||
| async fn download( | ||
| &self, | ||
| _session_type: SessionType, |
There was a problem hiding this comment.
session_type is ignored here, and download() unconditionally returns ProofResult::Compressed. The cluster, mock, and dry-run backends all dispatch on session_type to return the correct ProofResult variant. While the network backend currently blocks Groth16 at submit(), this will silently return the wrong proof type if Groth16 support is added without updating download(). Consider either adding the same session_type check, or asserting session_type == Stark to fail loudly.
Review SummaryThe PR introduces a well-structured two-stage Groth16 aggregation flow: STARK range proof → SNARK aggregation. The orchestration in FindingsMinor (2 inline comments posted):
Note on prior review commentsMost of the 13 existing inline comments from the previous review run are stale and refer to code patterns that no longer exist in the current iteration (e.g., |
✅ base-std fork tests: all 616 passedbase/base is fully in sync with the base-std spec.
|
Summary
ZK host now treats SnarkGroth16 jobs as a composed range-to-aggregation flow: it records the initial STARK range session, lets backends advance to a SNARK aggregation session, and resumes from the recorded SNARK session so prover-service continues handling a single generic proof request.