diff --git a/LICENSE-MIT b/LICENSE-MIT index 1581c90d16..6af13dfaa9 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017-2019 Electric Coin Company +Copyright (c) 2017-2022 Electric Coin Company Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/bellman/src/groth16/generator.rs b/bellman/src/groth16/generator.rs index d04ed6c0a0..a20cc4ceb4 100644 --- a/bellman/src/groth16/generator.rs +++ b/bellman/src/groth16/generator.rs @@ -398,8 +398,8 @@ where *b_g2 = g2_wnaf.scalar(&bt); } - at.mul_assign(&beta); - bt.mul_assign(&alpha); + at.mul_assign(beta); + bt.mul_assign(alpha); let mut e = at; e.add_assign(&bt); diff --git a/bellman/src/groth16/mod.rs b/bellman/src/groth16/mod.rs index 7c97197aaa..4fb936bb36 100644 --- a/bellman/src/groth16/mod.rs +++ b/bellman/src/groth16/mod.rs @@ -50,7 +50,7 @@ impl Proof { let mut g1_repr = ::Repr::default(); reader.read_exact(g1_repr.as_mut())?; - let affine = E::G1Affine::from_bytes(&g1_repr); + let affine = E::G1Affine::from_bytes_unchecked(&g1_repr); let affine = if affine.is_some().into() { Ok(affine.unwrap()) } else { @@ -73,7 +73,7 @@ impl Proof { let mut g2_repr = ::Repr::default(); reader.read_exact(g2_repr.as_mut())?; - let affine = E::G2Affine::from_bytes(&g2_repr); + let affine = E::G2Affine::from_bytes_unchecked(&g2_repr); let affine = if affine.is_some().into() { Ok(affine.unwrap()) } else { diff --git a/rust-toolchain b/rust-toolchain index 32b7211cb6..154cb93b2c 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.40.0 +1.52.1 diff --git a/zcash_proofs/Cargo.toml b/zcash_proofs/Cargo.toml index 4a58e9dfbe..ed2de83f94 100644 --- a/zcash_proofs/Cargo.toml +++ b/zcash_proofs/Cargo.toml @@ -15,7 +15,7 @@ edition = "2018" bellman = { version = "0.6", path = "../bellman", default-features = false, features = ["groth16"] } blake2b_simd = "0.5" byteorder = "1" -directories = { version = "1", optional = true } +directories = { version = "3", optional = true } ff = { version = "0.6", path = "../ff" } minreq = { version = "2", features = ["https"], optional = true } pairing = { version = "0.16", path = "../pairing" } @@ -26,7 +26,7 @@ zcash_primitives = { version = "0.2", path = "../zcash_primitives" } rand_xorshift = "0.2" [features] -default = ["local-prover", "multicore"] +default = ["local-prover"] download-params = ["minreq"] local-prover = ["directories"] multicore = ["bellman/multicore"] @@ -41,3 +41,6 @@ required-features = ["download-params"] [badges] maintenance = { status = "actively-developed" } + +[lib] +crate-type = ["cdylib", "rlib"]