Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion circuits/bin/dkg/share_computation/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" }
2 changes: 1 addition & 1 deletion circuits/bin/dkg/share_computation_chunk_batch/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
bb_proof_verification = { git = "https://github.com/gnosisguild/aztec-packages/", tag = "v3.0.0-nightly.20260102", directory = "barretenberg/noir/bb_proof_verification" }
2 changes: 1 addition & 1 deletion circuits/bin/recursive_aggregation/fold/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
2 changes: 1 addition & 1 deletion circuits/bin/threshold/user_data_encryption/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
5 changes: 5 additions & 0 deletions crates/aggregator/src/proof_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
27 changes: 13 additions & 14 deletions crates/aggregator/src/threshold_plaintext_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,21 +508,20 @@ 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()?;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/events/src/enclave_event/e3_requested.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
}
Expand Down
11 changes: 10 additions & 1 deletion crates/net/src/net_sync_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -250,9 +251,17 @@ impl Handler<EventStoreQueryResponse> 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<EnclaveEvent<Unsequenced>> = 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();
Expand Down
94 changes: 51 additions & 43 deletions crates/tests/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -720,7 +722,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,
};

bus.publish_without_context(e3_requested)?;
Expand Down Expand Up @@ -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),
)
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions crates/zk-prover/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions crates/zk-prover/versions.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"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-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"
}
2 changes: 1 addition & 1 deletion examples/CRISP/circuits/bin/fold/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Loading