diff --git a/packages/tokens/src/confidential/circuits/gadgets/assert_on_curve/Nargo.toml b/packages/tokens/src/confidential/circuits/gadgets/assert_on_curve/Nargo.toml index b3c538cb3..1954d09f1 100644 --- a/packages/tokens/src/confidential/circuits/gadgets/assert_on_curve/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/gadgets/assert_on_curve/Nargo.toml @@ -2,7 +2,9 @@ name = "gadget_assert_on_curve" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../../lib" } diff --git a/packages/tokens/src/confidential/circuits/gadgets/commit/Nargo.toml b/packages/tokens/src/confidential/circuits/gadgets/commit/Nargo.toml index 949e4ec76..6eb764e62 100644 --- a/packages/tokens/src/confidential/circuits/gadgets/commit/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/gadgets/commit/Nargo.toml @@ -2,7 +2,9 @@ name = "gadget_commit" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../../lib" } diff --git a/packages/tokens/src/confidential/circuits/gadgets/ecdh/Nargo.toml b/packages/tokens/src/confidential/circuits/gadgets/ecdh/Nargo.toml index 13ca43027..5752d2821 100644 --- a/packages/tokens/src/confidential/circuits/gadgets/ecdh/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/gadgets/ecdh/Nargo.toml @@ -2,7 +2,9 @@ name = "gadget_ecdh" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../../lib" } diff --git a/packages/tokens/src/confidential/circuits/gadgets/encrypt_amount/Nargo.toml b/packages/tokens/src/confidential/circuits/gadgets/encrypt_amount/Nargo.toml index 7fa25d395..3df97ef50 100644 --- a/packages/tokens/src/confidential/circuits/gadgets/encrypt_amount/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/gadgets/encrypt_amount/Nargo.toml @@ -2,7 +2,9 @@ name = "gadget_encrypt_amount" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../../lib" } diff --git a/packages/tokens/src/confidential/circuits/gadgets/poseidon_with_domain/Nargo.toml b/packages/tokens/src/confidential/circuits/gadgets/poseidon_with_domain/Nargo.toml index 4cfc862c2..133a8f0fb 100644 --- a/packages/tokens/src/confidential/circuits/gadgets/poseidon_with_domain/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/gadgets/poseidon_with_domain/Nargo.toml @@ -2,7 +2,9 @@ name = "gadget_poseidon_with_domain" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../../lib" } diff --git a/packages/tokens/src/confidential/circuits/gadgets/sponge_squeeze_2/Nargo.toml b/packages/tokens/src/confidential/circuits/gadgets/sponge_squeeze_2/Nargo.toml index 766e33042..63ec733df 100644 --- a/packages/tokens/src/confidential/circuits/gadgets/sponge_squeeze_2/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/gadgets/sponge_squeeze_2/Nargo.toml @@ -2,7 +2,9 @@ name = "gadget_sponge_squeeze_2" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../../lib" } diff --git a/packages/tokens/src/confidential/circuits/gadgets/vk_from_sk/Nargo.toml b/packages/tokens/src/confidential/circuits/gadgets/vk_from_sk/Nargo.toml index a35d194d3..32a6f7d15 100644 --- a/packages/tokens/src/confidential/circuits/gadgets/vk_from_sk/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/gadgets/vk_from_sk/Nargo.toml @@ -2,7 +2,9 @@ name = "gadget_vk_from_sk" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../../lib" } diff --git a/packages/tokens/src/confidential/circuits/lib/Nargo.toml b/packages/tokens/src/confidential/circuits/lib/Nargo.toml index a9e611afe..efc3a91fb 100644 --- a/packages/tokens/src/confidential/circuits/lib/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/lib/Nargo.toml @@ -2,4 +2,6 @@ name = "stellar_confidential_lib" type = "lib" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" diff --git a/packages/tokens/src/confidential/circuits/register/Nargo.toml b/packages/tokens/src/confidential/circuits/register/Nargo.toml index 98971fec4..7a96462d0 100644 --- a/packages/tokens/src/confidential/circuits/register/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/register/Nargo.toml @@ -2,7 +2,9 @@ name = "circuit_register" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../lib" } diff --git a/packages/tokens/src/confidential/circuits/revoke_spender/Nargo.toml b/packages/tokens/src/confidential/circuits/revoke_spender/Nargo.toml index 551d338c2..8aff11097 100644 --- a/packages/tokens/src/confidential/circuits/revoke_spender/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/revoke_spender/Nargo.toml @@ -2,7 +2,9 @@ name = "circuit_revoke_spender" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../lib" } diff --git a/packages/tokens/src/confidential/circuits/set_spender/Nargo.toml b/packages/tokens/src/confidential/circuits/set_spender/Nargo.toml index 62980e59d..cafa69d34 100644 --- a/packages/tokens/src/confidential/circuits/set_spender/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/set_spender/Nargo.toml @@ -2,7 +2,9 @@ name = "circuit_set_spender" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../lib" } diff --git a/packages/tokens/src/confidential/circuits/spender_transfer/Nargo.toml b/packages/tokens/src/confidential/circuits/spender_transfer/Nargo.toml index 69220db49..82aba9780 100644 --- a/packages/tokens/src/confidential/circuits/spender_transfer/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/spender_transfer/Nargo.toml @@ -2,7 +2,9 @@ name = "circuit_spender_transfer" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../lib" } diff --git a/packages/tokens/src/confidential/circuits/transfer/Nargo.toml b/packages/tokens/src/confidential/circuits/transfer/Nargo.toml index a2a4f9f12..cba72e967 100644 --- a/packages/tokens/src/confidential/circuits/transfer/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/transfer/Nargo.toml @@ -2,7 +2,9 @@ name = "circuit_transfer" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../lib" } diff --git a/packages/tokens/src/confidential/circuits/vks/README.md b/packages/tokens/src/confidential/circuits/vks/README.md index 5d4179b2b..76db7eda5 100644 --- a/packages/tokens/src/confidential/circuits/vks/README.md +++ b/packages/tokens/src/confidential/circuits/vks/README.md @@ -19,6 +19,28 @@ Reproducible from the circuit sources with the pinned toolchain: Both versions are pinned in `.github/workflows/noir.yml`. CI re-runs the extraction and diffs against the files here; any drift fails the build. +## Proving + +Proofs the deployed verifier accepts must be generated with the same +pinned toolchain and non-default `bb` flags: + +```bash +nargo execute --package circuit_ +bb prove -s ultra_honk --oracle_hash keccak \ + -b target/circuit_.json -w target/.gz -o +``` + +- `--oracle_hash keccak` is required: the on-chain verifier + ([rs-soroban-ultrahonk](https://github.com/NethermindEth/rs-soroban-ultrahonk)) + reproduces the Fiat-Shamir transcript with Keccak, while `bb` defaults to + `poseidon2`. A proof generated with the default transcript is rejected. +- Do **not** pass `--zk`: the verifier currently implements only the non-zk + `ultra_flavor`. + +The verifier backend is unfinished (see the module-level warning in +`../../verifier/mod.rs`). This recipe is provisional and will be finalized +together with the verifier, including the zero-knowledge setting. + ## Regenerating ```bash diff --git a/packages/tokens/src/confidential/circuits/withdraw/Nargo.toml b/packages/tokens/src/confidential/circuits/withdraw/Nargo.toml index 47b30c97e..2a65f986b 100644 --- a/packages/tokens/src/confidential/circuits/withdraw/Nargo.toml +++ b/packages/tokens/src/confidential/circuits/withdraw/Nargo.toml @@ -2,7 +2,9 @@ name = "circuit_withdraw" type = "bin" authors = ["OpenZeppelin"] -compiler_version = ">=0.30.0" +# Nargo requirements cannot name prereleases; the supported toolchain is +# nargo 1.0.0-beta.11 + bb 0.87.0, pinned in .github/workflows/noir.yml. +compiler_version = "=1.0.0" [dependencies] stellar_confidential_lib = { path = "../lib" }