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
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
4 changes: 3 additions & 1 deletion packages/tokens/src/confidential/circuits/lib/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
22 changes: 22 additions & 0 deletions packages/tokens/src/confidential/circuits/vks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_<name> <witness_name>
bb prove -s ultra_honk --oracle_hash keccak \
-b target/circuit_<name>.json -w target/<witness_name>.gz -o <out_dir>
```

- `--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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Loading