From dc2cafa801af341d8a3c41c661bc725734ac9d36 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Mon, 23 Mar 2026 12:25:57 +0100 Subject: [PATCH 1/8] fix(aggregator): ignore unrelated FoldProofs in plaintext aggregator - 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 --- crates/aggregator/src/proof_fold.rs | 5 ++++ .../src/threshold_plaintext_aggregator.rs | 30 ++++++++++--------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/crates/aggregator/src/proof_fold.rs b/crates/aggregator/src/proof_fold.rs index 5a10858404..34c6095a25 100644 --- a/crates/aggregator/src/proof_fold.rs +++ b/crates/aggregator/src/proof_fold.rs @@ -59,6 +59,11 @@ impl ProofFoldState { && self.result.is_none() } + /// `true` if a fold step is in flight and expects this `ComputeResponse` correlation. + pub fn awaits_correlation(&self, correlation_id: &CorrelationId) -> bool { + self.correlation.as_ref() == Some(correlation_id) + } + /// Begin folding `proofs` sequentially. /// /// - 0 proofs → `result` stays `None`, `fold_input_was_empty` is set (caller can treat fold as done) diff --git a/crates/aggregator/src/threshold_plaintext_aggregator.rs b/crates/aggregator/src/threshold_plaintext_aggregator.rs index 946473dbb7..8cf79ec1ed 100644 --- a/crates/aggregator/src/threshold_plaintext_aggregator.rs +++ b/crates/aggregator/src/threshold_plaintext_aggregator.rs @@ -508,21 +508,23 @@ impl ThresholdPlaintextAggregator { })?; } - // C6 cross-node fold response + // C6 cross-node fold response (ignore unrelated FoldProofs, e.g. PK C5 fold on same bus) ComputeResponseKind::Zk(ZkResponse::FoldProofs(resp)) => { - let ec = self - .last_ec - .clone() - .ok_or_else(|| anyhow!("No EventContext for C6 fold response"))?; - if self.c6_fold.handle_response( - &correlation_id, - resp.proof, - "ThresholdPlaintextAggregator C6 fold", - &self.bus, - &self.e3_id, - &ec, - )? { - self.try_publish_complete()?; + if self.c6_fold.awaits_correlation(&correlation_id) { + let fold_ec = self + .last_ec + .clone() + .unwrap_or_else(|| ec.clone()); + if self.c6_fold.handle_response( + &correlation_id, + resp.proof, + "ThresholdPlaintextAggregator C6 fold", + &self.bus, + &self.e3_id, + &fold_ec, + )? { + self.try_publish_complete()?; + } } } From 5f8e03c6e0a660e389bcd536d94361598a336dd5 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Mon, 23 Mar 2026 12:26:38 +0100 Subject: [PATCH 2/8] style: format code with rustfmt --- crates/aggregator/src/threshold_plaintext_aggregator.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/aggregator/src/threshold_plaintext_aggregator.rs b/crates/aggregator/src/threshold_plaintext_aggregator.rs index 8cf79ec1ed..60b2967243 100644 --- a/crates/aggregator/src/threshold_plaintext_aggregator.rs +++ b/crates/aggregator/src/threshold_plaintext_aggregator.rs @@ -511,10 +511,7 @@ impl ThresholdPlaintextAggregator { // C6 cross-node fold response (ignore unrelated FoldProofs, e.g. PK C5 fold on same bus) ComputeResponseKind::Zk(ZkResponse::FoldProofs(resp)) => { if self.c6_fold.awaits_correlation(&correlation_id) { - let fold_ec = self - .last_ec - .clone() - .unwrap_or_else(|| ec.clone()); + let fold_ec = self.last_ec.clone().unwrap_or_else(|| ec.clone()); if self.c6_fold.handle_response( &correlation_id, resp.proof, From c52fa4f24db710b64bd597069a6595de40c2dd9c Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Mon, 23 Mar 2026 22:43:49 +0000 Subject: [PATCH 3/8] chore: get local events too --- crates/net/src/net_sync_manager.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/net/src/net_sync_manager.rs b/crates/net/src/net_sync_manager.rs index e18a28bf50..93f1ce003c 100644 --- a/crates/net/src/net_sync_manager.rs +++ b/crates/net/src/net_sync_manager.rs @@ -23,6 +23,7 @@ use crate::{ direct_responder::DirectResponder, events::{await_event, IncomingRequest, NetCommand, NetEvent, PeerTarget}, net_event_batch::{fetch_all_batched_events, BatchCursor, EventBatch, FetchEventsSince}, + net_event_translator::NetEventTranslator, }; /// Maximum time to wait for a `ConnectionEstablished` event after all dials @@ -250,9 +251,17 @@ impl Handler for NetSyncManager { } let aggregate_id = fetch_request.aggregate_id(); let all_events: Vec<_> = msg.into_events(); + // Include Net events (received via gossip) and Local events that + // are gossip-forwardable. Without the Local check, a node's own + // gossip events (e.g. its DecryptionshareCreated) would be excluded + // from sync responses — causing syncing peers to miss them. let events: Vec> = all_events .into_iter() - .filter(|e| e.source() == EventSource::Net) + .filter(|e| { + e.source() == EventSource::Net + || (e.source() == EventSource::Local + && NetEventTranslator::is_forwardable_event(e)) + }) .take(limit) .map(|ev| ev.clone_unsequenced()) .collect(); From 385dcb78aa3b11a5ced79aa4d3eeb294762ac633 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 24 Mar 2026 20:02:19 +0100 Subject: [PATCH 4/8] chore: point to gnosisguild aztec-packages --- .github/workflows/ci.yml | 4 ++-- circuits/bin/dkg/share_computation/Nargo.toml | 2 +- circuits/bin/dkg/share_computation_chunk_batch/Nargo.toml | 2 +- circuits/bin/recursive_aggregation/fold/Nargo.toml | 2 +- circuits/bin/recursive_aggregation/wrapper/dkg/pk/Nargo.toml | 2 +- .../wrapper/dkg/share_computation/Nargo.toml | 2 +- .../wrapper/dkg/share_decryption/Nargo.toml | 2 +- .../wrapper/dkg/share_encryption/Nargo.toml | 2 +- .../wrapper/threshold/decrypted_shares_aggregation/Nargo.toml | 2 +- .../wrapper/threshold/pk_aggregation/Nargo.toml | 2 +- .../wrapper/threshold/pk_generation/Nargo.toml | 2 +- .../wrapper/threshold/share_decryption/Nargo.toml | 2 +- circuits/bin/threshold/user_data_encryption/Nargo.toml | 2 +- crates/zk-prover/src/config.rs | 4 ++-- crates/zk-prover/versions.json | 2 +- examples/CRISP/circuits/bin/fold/Nargo.toml | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9807e3141..7feabc9c8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -796,7 +796,7 @@ jobs: - name: Install Barretenberg (bb) if: steps.cache-bb.outputs.cache-hit != 'true' run: | - curl -fsSL "https://github.com/AztecProtocol/aztec-packages/releases/download/v${{ env.BB_VERSION }}/barretenberg-amd64-linux.tar.gz" -o bb.tar.gz + curl -fsSL "https://github.com/gnosisguild/aztec-packages/releases/download/v${{ env.BB_VERSION }}/barretenberg-amd64-linux.tar.gz" -o bb.tar.gz mkdir -p bb_extract && tar -xzf bb.tar.gz -C bb_extract BB_BIN=$(find bb_extract -name bb -type f | head -n 1) sudo mv "$BB_BIN" /usr/local/bin/bb @@ -878,7 +878,7 @@ jobs: - name: Install Barretenberg (bb) if: steps.cache-bb.outputs.cache-hit != 'true' run: | - curl -fsSL "https://github.com/AztecProtocol/aztec-packages/releases/download/v${{ env.BB_VERSION }}/barretenberg-amd64-linux.tar.gz" -o bb.tar.gz + curl -fsSL "https://github.com/gnosisguild/aztec-packages/releases/download/v${{ env.BB_VERSION }}/barretenberg-amd64-linux.tar.gz" -o bb.tar.gz mkdir -p bb_extract && tar -xzf bb.tar.gz -C bb_extract BB_BIN=$(find bb_extract -name bb -type f | head -n 1) sudo mv "$BB_BIN" /usr/local/bin/bb diff --git a/circuits/bin/dkg/share_computation/Nargo.toml b/circuits/bin/dkg/share_computation/Nargo.toml index 0a9963a259..dd1824e2f8 100644 --- a/circuits/bin/dkg/share_computation/Nargo.toml +++ b/circuits/bin/dkg/share_computation/Nargo.toml @@ -5,4 +5,4 @@ authors = [""] [dependencies] lib = { path = "../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/dkg/share_computation_chunk_batch/Nargo.toml b/circuits/bin/dkg/share_computation_chunk_batch/Nargo.toml index f9383dee1c..1bf04acae9 100644 --- a/circuits/bin/dkg/share_computation_chunk_batch/Nargo.toml +++ b/circuits/bin/dkg/share_computation_chunk_batch/Nargo.toml @@ -5,4 +5,4 @@ authors = [""] [dependencies] lib = { path = "../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/recursive_aggregation/fold/Nargo.toml b/circuits/bin/recursive_aggregation/fold/Nargo.toml index 6699b53c70..e58b32207a 100644 --- a/circuits/bin/recursive_aggregation/fold/Nargo.toml +++ b/circuits/bin/recursive_aggregation/fold/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/recursive_aggregation/wrapper/dkg/pk/Nargo.toml b/circuits/bin/recursive_aggregation/wrapper/dkg/pk/Nargo.toml index 99bf2965ce..7e88c6408f 100644 --- a/circuits/bin/recursive_aggregation/wrapper/dkg/pk/Nargo.toml +++ b/circuits/bin/recursive_aggregation/wrapper/dkg/pk/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/recursive_aggregation/wrapper/dkg/share_computation/Nargo.toml b/circuits/bin/recursive_aggregation/wrapper/dkg/share_computation/Nargo.toml index 1f9856d0a6..14951be3d1 100644 --- a/circuits/bin/recursive_aggregation/wrapper/dkg/share_computation/Nargo.toml +++ b/circuits/bin/recursive_aggregation/wrapper/dkg/share_computation/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/recursive_aggregation/wrapper/dkg/share_decryption/Nargo.toml b/circuits/bin/recursive_aggregation/wrapper/dkg/share_decryption/Nargo.toml index c3e9e302cc..a175748043 100644 --- a/circuits/bin/recursive_aggregation/wrapper/dkg/share_decryption/Nargo.toml +++ b/circuits/bin/recursive_aggregation/wrapper/dkg/share_decryption/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/recursive_aggregation/wrapper/dkg/share_encryption/Nargo.toml b/circuits/bin/recursive_aggregation/wrapper/dkg/share_encryption/Nargo.toml index cdf3788bdc..e53495467d 100644 --- a/circuits/bin/recursive_aggregation/wrapper/dkg/share_encryption/Nargo.toml +++ b/circuits/bin/recursive_aggregation/wrapper/dkg/share_encryption/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/recursive_aggregation/wrapper/threshold/decrypted_shares_aggregation/Nargo.toml b/circuits/bin/recursive_aggregation/wrapper/threshold/decrypted_shares_aggregation/Nargo.toml index 8fc6167f62..6f23e79478 100644 --- a/circuits/bin/recursive_aggregation/wrapper/threshold/decrypted_shares_aggregation/Nargo.toml +++ b/circuits/bin/recursive_aggregation/wrapper/threshold/decrypted_shares_aggregation/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/recursive_aggregation/wrapper/threshold/pk_aggregation/Nargo.toml b/circuits/bin/recursive_aggregation/wrapper/threshold/pk_aggregation/Nargo.toml index 6b13c0fedb..9019475922 100644 --- a/circuits/bin/recursive_aggregation/wrapper/threshold/pk_aggregation/Nargo.toml +++ b/circuits/bin/recursive_aggregation/wrapper/threshold/pk_aggregation/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/recursive_aggregation/wrapper/threshold/pk_generation/Nargo.toml b/circuits/bin/recursive_aggregation/wrapper/threshold/pk_generation/Nargo.toml index c0536ef12a..174d57b993 100644 --- a/circuits/bin/recursive_aggregation/wrapper/threshold/pk_generation/Nargo.toml +++ b/circuits/bin/recursive_aggregation/wrapper/threshold/pk_generation/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/recursive_aggregation/wrapper/threshold/share_decryption/Nargo.toml b/circuits/bin/recursive_aggregation/wrapper/threshold/share_decryption/Nargo.toml index c3e9e302cc..a175748043 100644 --- a/circuits/bin/recursive_aggregation/wrapper/threshold/share_decryption/Nargo.toml +++ b/circuits/bin/recursive_aggregation/wrapper/threshold/share_decryption/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } \ No newline at end of file diff --git a/circuits/bin/threshold/user_data_encryption/Nargo.toml b/circuits/bin/threshold/user_data_encryption/Nargo.toml index 688e4019e9..361d22f25e 100644 --- a/circuits/bin/threshold/user_data_encryption/Nargo.toml +++ b/circuits/bin/threshold/user_data_encryption/Nargo.toml @@ -5,4 +5,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] lib = { path = "../../../lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } diff --git a/crates/zk-prover/src/config.rs b/crates/zk-prover/src/config.rs index 6b69ed80ba..a7d4799986 100644 --- a/crates/zk-prover/src/config.rs +++ b/crates/zk-prover/src/config.rs @@ -367,7 +367,7 @@ mod tests { let version = &config.required_bb_version; let (arch, os) = target.url_parts(); let url = format!( - "https://github.com/AztecProtocol/aztec-packages/releases/download/v{version}/barretenberg-{arch}-{os}.tar.gz" + "https://github.com/gnosisguild/aztec-packages/releases/download/v{version}/barretenberg-{arch}-{os}.tar.gz" ); println!("downloading {} from {}", target, url); @@ -430,7 +430,7 @@ mod tests { let version = &config.required_bb_version; let (arch, os) = target.url_parts(); let url = format!( - "https://github.com/AztecProtocol/aztec-packages/releases/download/v{version}/barretenberg-{arch}-{os}.tar.gz" + "https://github.com/gnosisguild/aztec-packages/releases/download/v{version}/barretenberg-{arch}-{os}.tar.gz" ); let client = reqwest::Client::new(); diff --git a/crates/zk-prover/versions.json b/crates/zk-prover/versions.json index 0d1c7c9585..1283679292 100644 --- a/crates/zk-prover/versions.json +++ b/crates/zk-prover/versions.json @@ -1,7 +1,7 @@ { "required_bb_version": "3.0.0-nightly.20260102", "required_circuits_version": "0.1.15", - "bb_download_url": "https://github.com/AztecProtocol/aztec-packages/releases/download/v{version}/barretenberg-{arch}-{os}.tar.gz", + "bb_download_url": "https://github.com/gnosisguild/aztec-packages/releases/download/v{version}/barretenberg-{arch}-{os}.tar.gz", "bb_checksums": { "amd64-linux": "4847ae82a1d25f9489057da2c33d1abdee3ba457e8219028a2c2336f850f8cd7", "amd64-darwin": "9137b49be56bfea5b62203b7ae4cb67c9ecc12fe1692a89badf2cf4b57323fdc", diff --git a/examples/CRISP/circuits/bin/fold/Nargo.toml b/examples/CRISP/circuits/bin/fold/Nargo.toml index 35da37b2ad..17d5516cfa 100644 --- a/examples/CRISP/circuits/bin/fold/Nargo.toml +++ b/examples/CRISP/circuits/bin/fold/Nargo.toml @@ -6,4 +6,4 @@ authors = ["Gnosis Guild / Enclave"] [dependencies] enclave_lib = { path = "../../../../../circuits/lib" } -bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } +bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" } From 7a51cc2282b57691e893d466f4ed12db2d8499e5 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 24 Mar 2026 20:18:53 +0100 Subject: [PATCH 5/8] chore: update sha256 in version.json --- crates/zk-prover/versions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/zk-prover/versions.json b/crates/zk-prover/versions.json index 1283679292..b2027859eb 100644 --- a/crates/zk-prover/versions.json +++ b/crates/zk-prover/versions.json @@ -3,10 +3,10 @@ "required_circuits_version": "0.1.15", "bb_download_url": "https://github.com/gnosisguild/aztec-packages/releases/download/v{version}/barretenberg-{arch}-{os}.tar.gz", "bb_checksums": { - "amd64-linux": "4847ae82a1d25f9489057da2c33d1abdee3ba457e8219028a2c2336f850f8cd7", + "amd64-linux": "5fa0d06de54c3cfc6d89e61b6ba309d3bd61d8c1a8057efe2205ef56a6278b0a", "amd64-darwin": "9137b49be56bfea5b62203b7ae4cb67c9ecc12fe1692a89badf2cf4b57323fdc", "arm64-linux": "a675221a823f6fada6d01b09a1c26c0f7356567f31a912a2475b6e3b63d438a2", - "arm64-darwin": "6a448b089b43918787dbfd201b32a757f562c80bf542d1b75aaf6fc9dba42b0c" + "arm64-darwin": "661fb3491d93c384299234a1f320bee6d682c5813b78bbe1ecba2e8bb8f7ab7d" }, "circuits_download_url": "https://github.com/gnosisguild/enclave/releases/download/v{version}/circuits-{version}.tar.gz" } From c5fb526152cbeb6d0dee93a32d0b73e21d1802ec Mon Sep 17 00:00:00 2001 From: Cedoor Date: Wed, 25 Mar 2026 08:38:06 +0100 Subject: [PATCH 6/8] chore: enable proof aggregation for integration tests --- crates/tests/tests/integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tests/tests/integration.rs b/crates/tests/tests/integration.rs index f408ca43ed..dfe056b6d3 100644 --- a/crates/tests/tests/integration.rs +++ b/crates/tests/tests/integration.rs @@ -720,7 +720,7 @@ async fn test_trbfv_actor() -> Result<()> { error_size, esi_per_ct: esi_per_ct as usize, params, - proof_aggregation_enabled: true, + proof_aggregation_enabled: false, }; bus.publish_without_context(e3_requested)?; From 3fffd57a844bb63984f935317fe125bb7a8e0623 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Wed, 25 Mar 2026 09:12:51 +0100 Subject: [PATCH 7/8] chore: disable proof aggregation for integration tests --- crates/events/src/enclave_event/e3_requested.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/events/src/enclave_event/e3_requested.rs b/crates/events/src/enclave_event/e3_requested.rs index 8c5432881c..9d1d471033 100644 --- a/crates/events/src/enclave_event/e3_requested.rs +++ b/crates/events/src/enclave_event/e3_requested.rs @@ -49,7 +49,7 @@ impl Default for E3Requested { seed: Seed([0u8; 32]), threshold_m: 0, threshold_n: 0, - proof_aggregation_enabled: true, + proof_aggregation_enabled: false, } } } From cf4e5471369420444e869a46e70c34a577026e15 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Wed, 25 Mar 2026 12:00:34 +0100 Subject: [PATCH 8/8] test: update integration test --- crates/tests/tests/integration.rs | 94 +++++++++++++++++-------------- 1 file changed, 51 insertions(+), 43 deletions(-) diff --git a/crates/tests/tests/integration.rs b/crates/tests/tests/integration.rs index dfe056b6d3..ae7e495501 100644 --- a/crates/tests/tests/integration.rs +++ b/crates/tests/tests/integration.rs @@ -712,6 +712,8 @@ async fn test_trbfv_actor() -> Result<()> { // Trigger actor DKG let e3_id = E3id::new("0", 1); + let proof_aggregation_enabled = true; + let e3_requested = E3Requested { e3_id: e3_id.clone(), threshold_m, @@ -720,7 +722,7 @@ async fn test_trbfv_actor() -> Result<()> { error_size, esi_per_ct: esi_per_ct as usize, params, - proof_aggregation_enabled: false, + proof_aggregation_enabled, }; bus.publish_without_context(e3_requested)?; @@ -759,48 +761,48 @@ async fn test_trbfv_actor() -> Result<()> { committee_finalized_timer.elapsed(), )); - // Wait for KeyshareCreated + C1 verification + C5 proof + cross-node DKG fold + PublicKeyAggregated - // - KeyshareCreated × 3 (forwarded from committee nodes) - // - ShareVerificationDispatched (C1 proof verification dispatched by PublicKeyAggregator) - // - ComputeRequest (C1 ZK verification) - // - ComputeResponse (C1 ZK verification result) - // - ProofVerificationPassed × 3 (one per party's C1 proof) - // - ShareVerificationComplete (C1 verification done) - // - PkAggregationProofPending (C5 proof requested by PublicKeyAggregator) - // - ComputeRequest (C5 proof generation) - // - ComputeResponse (C5 proof result) - // - PkAggregationProofSigned (C5 proof signed by ProofRequestActor) - // - DKGRecursiveAggregationComplete × 3 (per-node aggregation from NodeProofAggregator) - // - ComputeRequest × 2 (cross-node DKG fold, 3 proofs → 2 pairwise steps) - // - ComputeResponse × 2 (cross-node DKG fold results) - // - PublicKeyAggregated × 1 + // Collector (node 0): prefix order differs by `proof_aggregation_enabled` (see flow-trace DKG). + // Then C1/C5 verification, then if aggregation: DKGRecursive ×3 + cross-node fold ZK, then + // PublicKeyAggregated. let shares_to_pubkey_agg_timer = Instant::now(); + const KS3: [&str; 3] = ["KeyshareCreated"; 3]; + const DKG3: [&str; 3] = ["DKGRecursiveAggregationComplete"; 3]; + const C1_C5: [&str; 11] = [ + "ShareVerificationDispatched", + "ComputeRequest", + "ComputeResponse", + "ProofVerificationPassed", + "ProofVerificationPassed", + "ProofVerificationPassed", + "ShareVerificationComplete", + "PkAggregationProofPending", + "ComputeRequest", + "ComputeResponse", + "PkAggregationProofSigned", + ]; + const DKG_FOLD: [&str; 4] = [ + "ComputeRequest", + "ComputeResponse", + "ComputeRequest", + "ComputeResponse", + ]; + + let mut expected_events: Vec<&'static str> = Vec::new(); + if proof_aggregation_enabled { + expected_events.extend_from_slice(&KS3); + } else { + expected_events.extend_from_slice(&DKG3); + expected_events.extend_from_slice(&KS3); + } + expected_events.extend_from_slice(&C1_C5); + if proof_aggregation_enabled { + expected_events.extend_from_slice(&DKG3); + expected_events.extend_from_slice(&DKG_FOLD); + } + expected_events.push("PublicKeyAggregated"); let h = nodes .expect_events_with_timeouts( - &[ - "KeyshareCreated", - "KeyshareCreated", - "KeyshareCreated", - "ShareVerificationDispatched", - "ComputeRequest", - "ComputeResponse", - "ProofVerificationPassed", - "ProofVerificationPassed", - "ProofVerificationPassed", - "ShareVerificationComplete", - "PkAggregationProofPending", - "ComputeRequest", - "ComputeResponse", - "PkAggregationProofSigned", - "DKGRecursiveAggregationComplete", - "DKGRecursiveAggregationComplete", - "DKGRecursiveAggregationComplete", - "ComputeRequest", - "ComputeResponse", - "ComputeRequest", - "ComputeResponse", - "PublicKeyAggregated", - ], + &expected_events, Duration::from_secs(5000), Duration::from_secs(5000), ) @@ -887,15 +889,21 @@ async fn test_trbfv_actor() -> Result<()> { // - 1 ComputeRequest (C7 proof generation) // - 1 ComputeResponse (C7 proof result) // - 1 AggregationProofSigned (C7 proof signed by ProofRequestActor) - // - 8 ComputeRequest + 8 ComputeResponse (C6 fold: 9 proofs -> 8 pairwise steps) + // - If proof aggregation: ComputeRequest + ComputeResponse per C6 fold step (9 proofs -> 8 steps) // - 1 PlaintextAggregated (with C7 + C6 proofs) // - 1 E3RequestComplete (published after PlaintextAggregated by request router) // Internal events from committee nodes (ComputeRequest/Response for CalculateDecryptionShare) // stay on their local buses. let c6_proof_count = threshold_n as usize * num_votes_per_voter; let c6_fold_steps = c6_proof_count.saturating_sub(1); - let c6_fold_events = 2 * c6_fold_steps; - let expected_count = 1 + 3 + 1 + 2 + 9 + 1 + 2 + 1 + 2 + 1 + 2 + c6_fold_events + 1; + let c6_fold_events = if proof_aggregation_enabled { + 2 * c6_fold_steps + } else { + 0 + }; + // Sum matches the comment above through AggregationProofSigned, then fold, then PlaintextAggregated. + // E3RequestComplete is not included (arrives after; not needed for take). + let expected_count = 1 + 3 + 1 + 2 + 9 + 1 + 2 + 1 + 2 + 1 + c6_fold_events + 1; let h = nodes .take_history_with_timeouts(