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

feat!: Update to ACVM 0.13.0 #205

Merged
merged 16 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from 15 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
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"
]
}
}
7 changes: 4 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 flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
};

barretenberg = {
url = "github:AztecProtocol/barretenberg";
url = "github:AztecProtocol/barretenberg?rev=46dba6250e5b1eea792a6b4f6a299c1ecb88d694";
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
# All of these inputs (a.k.a. dependencies) need to align with inputs we
# use so they use the `inputs.*.follows` syntax to reference our inputs
inputs = {
Expand Down
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