Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
feat!: Update to ACVM 0.13.0 (#205)
Browse files Browse the repository at this point in the history
* feat: update to ACVM 0.13.0

* chore: remove lingering `ComputeMerkleRoot` test

* chore: remove unused `blake2s` dependency

* fix: Allow async functions without send on async trait (#198)

* feat!: Replace `js` feature with `wasm32` target (#202)

feat!: Replace `js` feature with wasm32 target

* chore: bump ACVM commit

* feat!: Add latest BB to acvm 0.13 (#214)

* chore: remove `compute_merkle_root` constraints

* chore: add "Brillig" to cspell

* feat: added keccakvar constraints

* feat!: added keccakvar constraints (#213)

feat: added keccakvar constraints

* chore: update bb sys and bb

* fix: changes to update to latest bb

* fix: fix wasm hash_index

* chore: updated bb-sys pointer

---------

Co-authored-by: TomAFrench <[email protected]>

* feat: update acvm pointer

* fix: Add `lib` crate-type to build  (#215)

add lib crate type

* Update Cargo.toml

* Update Cargo.toml

* update cargo lock

* remove original commit from barretenberg in flake.nix and flake.lock

---------

Co-authored-by: Blaine Bublitz <[email protected]>
Co-authored-by: sirasistant <[email protected]>
Co-authored-by: Maxim Vezenov <[email protected]>
Co-authored-by: kevaundray <[email protected]>
  • Loading branch information
5 people authored Jun 1, 2023
1 parent 91ea65f commit 298446e
Show file tree
Hide file tree
Showing 13 changed files with 157 additions and 923 deletions.
35 changes: 24 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 26 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,50 @@ license = "MIT OR Apache-2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib", "lib"]

[dependencies]
acvm = { version = "0.12.0", features = ["bn254"] }
acvm = { version = "0.13.0", features = ["bn254"] }
bincode = "1.3.3"
bytesize = "1.2"
reqwest = { version = "0.11.16", default-features = false, features = ["rustls-tls"] }
serde = { version = "1.0.136", features = ["derive"] }
serde-big-array = "0.5.1"
thiserror = "1.0.21"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# Native
barretenberg-sys = { version = "0.1.2", optional = true }
barretenberg-sys = { version = "0.2.0", optional = true }

# Wasm
wasmer = { version = "2.3", optional = true, default-features = false }
getrandom = { version = "0.2", optional = true }
rust-embed = { version = "6.6.0", optional = true, features = [
"debug-embed",
"interpolate-folder-path",
"include-exclude",
] }
getrandom = { version = "0.2", optional = true }
wasmer = { version = "2.3", optional = true, default-features = false, features = [
"sys-default",
"cranelift",
"default-compiler",
"default-cranelift",
"default-universal"
] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = [ "js" ] }
rust-embed = { version = "6.6.0", features = [
"debug-embed",
"interpolate-folder-path",
"include-exclude",
] }
wasmer = { version = "2.3", default-features = false, features = [ "js-default" ] }

[build-dependencies]
pkg-config = "0.3"

[dev-dependencies]
blake2 = "0.10.6"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "1.0", features = [ "macros" ] }

[features]
Expand All @@ -43,18 +61,7 @@ native = [
"dep:barretenberg-sys"
]
wasm = [
"wasmer",
"dep:rust-embed",
"dep:getrandom",
"wasmer/sys-default",
"wasmer/cranelift",
"wasmer/default-compiler",
"wasmer/default-cranelift",
"wasmer/default-universal"
]
js = [
"wasmer",
"dep:wasmer",
"dep:rust-embed",
"dep:getrandom",
"wasmer/js-default"
"dep:getrandom"
]
14 changes: 2 additions & 12 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"bbmalloc",
"bbfree",
"bindgen",
"Brillig",
"cout",
"fdstat",
"filestat",
Expand All @@ -18,7 +19,6 @@
"keccak",
"linearization",
"logstr",
"merkle",
"nargo",
"PAIRINGSBN",
"pedersen",
Expand All @@ -32,20 +32,10 @@
"preimages",
"preprocess",
"pubkey",
"QARITH",
"QECC",
"QLOGIC",
"QRANGE",
"reqwest",
"rollups",
"schnorr",
"secp",
"Shleft",
"Shright",
"Spilsbury",
"subslice",
"TURBOVERIFIER",
"vals",
"wasi",
"subarray",
"ESUCCESS",
Expand Down Expand Up @@ -77,4 +67,4 @@
"wasmer",
"getrandom"
]
}
}
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/acvm_interop/common_reference_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use acvm::{acir::circuit::Circuit, async_trait, CommonReferenceString};
use crate::{composer::Composer, BackendError, Barretenberg};

// TODO(#185): Ensure CRS download works in JS
#[async_trait]
#[async_trait(?Send)]
impl CommonReferenceString for Barretenberg {
type Error = BackendError;

Expand Down
4 changes: 1 addition & 3 deletions src/acvm_interop/proof_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,19 @@ impl ProofSystemCompiler for Barretenberg {
Opcode::ROM(_) => true,
Opcode::RAM(_) => true,
Opcode::Oracle(_) => true,
Opcode::Brillig(_) => true,
Opcode::BlackBoxFuncCall(func) => match func.get_black_box_func() {
BlackBoxFunc::AND
| BlackBoxFunc::XOR
| BlackBoxFunc::RANGE
| BlackBoxFunc::SHA256
| BlackBoxFunc::Blake2s
| BlackBoxFunc::Keccak256
| BlackBoxFunc::ComputeMerkleRoot
| BlackBoxFunc::SchnorrVerify
| BlackBoxFunc::Pedersen
| BlackBoxFunc::HashToField128Security
| BlackBoxFunc::EcdsaSecp256k1
| BlackBoxFunc::FixedBaseScalarMul => true,

BlackBoxFunc::AES => false,
},
}
}
Expand Down
Loading

0 comments on commit 298446e

Please sign in to comment.