From 90427b6afaa7bbcfb1480273c2674aad804e8948 Mon Sep 17 00:00:00 2001 From: 0xjei Date: Fri, 13 Mar 2026 11:47:16 +0100 Subject: [PATCH 1/2] move user_data_encryption to bin/threshold --- .../bin/recursive_aggregation/wrapper/threshold/Nargo.toml | 3 +-- circuits/bin/threshold/Nargo.toml | 1 + .../wrapper => }/threshold/user_data_encryption/Nargo.toml | 2 +- .../wrapper => }/threshold/user_data_encryption/src/main.nr | 0 examples/CRISP/packages/crisp-sdk/package.json | 2 +- examples/CRISP/packages/crisp-sdk/src/vote.ts | 2 +- examples/CRISP/scripts/compile_circuits.sh | 2 +- packages/enclave-sdk/package.json | 2 +- packages/enclave-sdk/src/crypto/user-data-encryption.ts | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) rename circuits/bin/{recursive_aggregation/wrapper => }/threshold/user_data_encryption/Nargo.toml (88%) rename circuits/bin/{recursive_aggregation/wrapper => }/threshold/user_data_encryption/src/main.nr (100%) diff --git a/circuits/bin/recursive_aggregation/wrapper/threshold/Nargo.toml b/circuits/bin/recursive_aggregation/wrapper/threshold/Nargo.toml index a5c793731f..72a1438e2f 100644 --- a/circuits/bin/recursive_aggregation/wrapper/threshold/Nargo.toml +++ b/circuits/bin/recursive_aggregation/wrapper/threshold/Nargo.toml @@ -3,6 +3,5 @@ members = [ "pk_generation", "pk_aggregation", "share_decryption", - "decrypted_shares_aggregation", - "user_data_encryption" + "decrypted_shares_aggregation" ] \ No newline at end of file diff --git a/circuits/bin/threshold/Nargo.toml b/circuits/bin/threshold/Nargo.toml index 58ba2e9827..e303fbe8aa 100644 --- a/circuits/bin/threshold/Nargo.toml +++ b/circuits/bin/threshold/Nargo.toml @@ -2,6 +2,7 @@ members = [ "pk_generation", "pk_aggregation", + "user_data_encryption", "user_data_encryption_ct0", "user_data_encryption_ct1", "share_decryption", diff --git a/circuits/bin/recursive_aggregation/wrapper/threshold/user_data_encryption/Nargo.toml b/circuits/bin/threshold/user_data_encryption/Nargo.toml similarity index 88% rename from circuits/bin/recursive_aggregation/wrapper/threshold/user_data_encryption/Nargo.toml rename to circuits/bin/threshold/user_data_encryption/Nargo.toml index dcefc9d3e3..688e4019e9 100644 --- a/circuits/bin/recursive_aggregation/wrapper/threshold/user_data_encryption/Nargo.toml +++ b/circuits/bin/threshold/user_data_encryption/Nargo.toml @@ -4,5 +4,5 @@ type = "bin" authors = ["Gnosis Guild / Enclave"] [dependencies] -lib = { path = "../../../../../lib" } +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" } diff --git a/circuits/bin/recursive_aggregation/wrapper/threshold/user_data_encryption/src/main.nr b/circuits/bin/threshold/user_data_encryption/src/main.nr similarity index 100% rename from circuits/bin/recursive_aggregation/wrapper/threshold/user_data_encryption/src/main.nr rename to circuits/bin/threshold/user_data_encryption/src/main.nr diff --git a/examples/CRISP/packages/crisp-sdk/package.json b/examples/CRISP/packages/crisp-sdk/package.json index 7a2efcefcf..159d773206 100644 --- a/examples/CRISP/packages/crisp-sdk/package.json +++ b/examples/CRISP/packages/crisp-sdk/package.json @@ -25,7 +25,7 @@ "compile:circuits": "pnpm compile:crisp && pnpm compile:user_data_encryption_ct0 && pnpm compile:user_data_encryption_ct1 && pnpm compile:user_data_encryption && pnpm compile:fold", "compile:user_data_encryption_ct0": "cd ../../../../circuits/bin/threshold/user_data_encryption_ct0 && nargo compile", "compile:user_data_encryption_ct1": "cd ../../../../circuits/bin/threshold/user_data_encryption_ct1 && nargo compile", - "compile:user_data_encryption": "cd ../../../../circuits/bin/recursive_aggregation/wrapper/threshold/user_data_encryption && nargo compile", + "compile:user_data_encryption": "cd ../../../../circuits/bin/threshold/user_data_encryption && nargo compile", "compile:crisp": "cd ../../circuits/bin/crisp && nargo compile", "compile:fold": "cd ../../circuits/bin/fold && nargo compile", "build:wasm": "pnpm -C ../crisp-zk-inputs build", diff --git a/examples/CRISP/packages/crisp-sdk/src/vote.ts b/examples/CRISP/packages/crisp-sdk/src/vote.ts index 7648f038ad..0ffcd55d9e 100644 --- a/examples/CRISP/packages/crisp-sdk/src/vote.ts +++ b/examples/CRISP/packages/crisp-sdk/src/vote.ts @@ -15,7 +15,7 @@ import crispCircuit from '../../../circuits/bin/crisp/target/crisp.json' import foldCircuit from '../../../circuits/bin/fold/target/crisp_fold.json' import userDataEncryptionCt0Circuit from '../../../../../circuits/bin/threshold/target/user_data_encryption_ct0.json' import userDataEncryptionCt1Circuit from '../../../../../circuits/bin/threshold/target/user_data_encryption_ct1.json' -import userDataEncryptionCircuit from '../../../../../circuits/bin/recursive_aggregation/wrapper/threshold/target/user_data_encryption.json' +import userDataEncryptionCircuit from '../../../../../circuits/bin/threshold/target/user_data_encryption.json' import { bytesToHex, encodeAbiParameters, parseAbiParameters, numberToHex, getAddress } from 'viem/utils' import { Hex } from 'viem' diff --git a/examples/CRISP/scripts/compile_circuits.sh b/examples/CRISP/scripts/compile_circuits.sh index e029853c1c..a164fa10af 100755 --- a/examples/CRISP/scripts/compile_circuits.sh +++ b/examples/CRISP/scripts/compile_circuits.sh @@ -21,7 +21,7 @@ if ! (cd "$ENCLAVE_CIRCUITS/bin/threshold/user_data_encryption_ct1" && nargo com fi echo "Compiling user_data_encryption..." -if ! (cd "$ENCLAVE_CIRCUITS/bin/recursive_aggregation/wrapper/threshold/user_data_encryption" && nargo compile); then +if ! (cd "$ENCLAVE_CIRCUITS/bin/threshold/user_data_encryption" && nargo compile); then echo "Error: user_data_encryption compilation failed" exit 1 fi diff --git a/packages/enclave-sdk/package.json b/packages/enclave-sdk/package.json index 2e9775383f..d5eb121aff 100644 --- a/packages/enclave-sdk/package.json +++ b/packages/enclave-sdk/package.json @@ -43,7 +43,7 @@ "compile:circuits": "pnpm compile:user_data_encryption_ct0 && pnpm compile:user_data_encryption_ct1 && pnpm compile:user_data_encryption", "compile:user_data_encryption_ct0": "cd ../../circuits/bin/threshold/user_data_encryption_ct0 && nargo compile", "compile:user_data_encryption_ct1": "cd ../../circuits/bin/threshold/user_data_encryption_ct1 && nargo compile", - "compile:user_data_encryption": "cd ../../circuits/bin/recursive_aggregation/wrapper/threshold/user_data_encryption && nargo compile", + "compile:user_data_encryption": "cd ../../circuits/bin/threshold/user_data_encryption && nargo compile", "prebuild": "pnpm -C ../enclave-contracts build && pnpm -C ../../ wasm:build && pnpm compile:circuits", "build": "tsup", "dev": "tsup --watch", diff --git a/packages/enclave-sdk/src/crypto/user-data-encryption.ts b/packages/enclave-sdk/src/crypto/user-data-encryption.ts index ecbf389aeb..8440b5e2e5 100644 --- a/packages/enclave-sdk/src/crypto/user-data-encryption.ts +++ b/packages/enclave-sdk/src/crypto/user-data-encryption.ts @@ -7,7 +7,7 @@ import { Barretenberg, UltraHonkBackend, type ProofData } from '@aztec/bb.js' import userDataEncryptionCt0Circuit from '../../../../circuits/bin/threshold/target/user_data_encryption_ct0.json' import userDataEncryptionCt1Circuit from '../../../../circuits/bin/threshold/target/user_data_encryption_ct1.json' -import userDataEncryptionCircuit from '../../../../circuits/bin/recursive_aggregation/wrapper/threshold/target/user_data_encryption.json' +import userDataEncryptionCircuit from '../../../../circuits/bin/threshold/target/user_data_encryption.json' import { CompiledCircuit, Noir } from '@noir-lang/noir_js' import { proofToFields } from '../utils' From 8b42c68349811606a4a59e08ecbfc171e359cd86 Mon Sep 17 00:00:00 2001 From: 0xjei Date: Fri, 13 Mar 2026 12:00:28 +0100 Subject: [PATCH 2/2] fix lint errors --- .../enclave-contracts/test/E3Lifecycle/E3Integration.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/enclave-contracts/test/E3Lifecycle/E3Integration.spec.ts b/packages/enclave-contracts/test/E3Lifecycle/E3Integration.spec.ts index b2d246993d..ec7486ae42 100644 --- a/packages/enclave-contracts/test/E3Lifecycle/E3Integration.spec.ts +++ b/packages/enclave-contracts/test/E3Lifecycle/E3Integration.spec.ts @@ -294,7 +294,7 @@ describe("E3 Integration - Refund/Timeout Mechanism", function () { const { mockCircuitVerifier } = await ignition.deploy( MockCircuitVerifierModule, ); - const circuitVerifier = MockCircuitVerifierFactory.connect( + const _circuitVerifier = MockCircuitVerifierFactory.connect( await mockCircuitVerifier.getAddress(), owner, ); @@ -415,7 +415,7 @@ describe("E3 Integration - Refund/Timeout Mechanism", function () { bondingRegistry, registry, slashingManager: slashingManagerTyped, - circuitVerifier, + _circuitVerifier, usdcToken, enclToken, e3Program,