Skip to content

Commit

Permalink
update for released deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Sep 6, 2021
1 parent 3c72a4b commit cceb016
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 34 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ members = [
"sha2raw",
"filecoin-hashers",
]

[patch.crates-io]
pairing = { git = "https://github.com/zkcrypto/pairing", branch = "main" }
4 changes: 2 additions & 2 deletions fil-proofs-param/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ byteorder = "1"
itertools = "0.9"
serde = { version = "1.0", features = ["rc", "derive"] }
serde_json = "1.0"
ff = "0.10.0"
ff = "0.11.0"
blake2b_simd = "0.5"
bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "halo" }
log = "0.4.7"
Expand All @@ -45,7 +45,7 @@ generic-array = "0.14.4"
structopt = "0.3.12"
humansize = "1.1.0"
indicatif = "0.15.0"
group = "0.10.0"
group = "0.11.0"
dialoguer = "0.8.0"
clap = "2.33.3"

Expand Down
2 changes: 1 addition & 1 deletion fil-proofs-tooling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ uom = "0.30"
merkletree = "0.21.0"
bincode = "1.1.2"
anyhow = "1.0.23"
ff = "0.10.0"
ff = "0.11.0"
rand_xorshift = "0.3.0"
bytefmt = "0.1.7"
rayon = "1.3.0"
Expand Down
2 changes: 1 addition & 1 deletion filecoin-hashers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bellperson = { git = "https://github.com/filecoin-project/bellperson", branch =
blstrs = { git = "https://github.com/filecoin-project/blstrs", branch = "halo" }
generic-array = "0.14.4"
merkletree = "0.21.0"
ff = "0.10.0"
ff = "0.11.0"
anyhow = "1.0.34"
serde = "1.0.117"
rand = "0.8.0"
Expand Down
2 changes: 1 addition & 1 deletion filecoin-hashers/src/blake2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl Element for Blake2sDomain {

impl From<Blake2sDomain> for Fr {
fn from(val: Blake2sDomain) -> Self {
Fr::from_repr(val.0).expect("from_repr failure")
Fr::from_repr_vartime(val.0).expect("from_repr failure")
}
}

Expand Down
16 changes: 8 additions & 8 deletions filecoin-hashers/src/poseidon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl Element for PoseidonDomain {
impl StdHasher for PoseidonFunction {
#[inline]
fn write(&mut self, msg: &[u8]) {
self.0 = Fr::from_repr(shared_hash(msg).0).expect("from_repr failure");
self.0 = Fr::from_repr_vartime(shared_hash(msg).0).expect("from_repr failure");
}

#[inline]
Expand All @@ -171,7 +171,7 @@ fn shared_hash(data: &[u8]) -> PoseidonDomain {
let preimage = data
.chunks(32)
.map(|ref chunk| {
Fr::from_repr(PoseidonDomain::from_slice(chunk).0).expect("from_repr failure")
Fr::from_repr_vartime(PoseidonDomain::from_slice(chunk).0).expect("from_repr failure")
})
.collect::<Vec<_>>();

Expand Down Expand Up @@ -224,7 +224,7 @@ impl HashFunction<PoseidonDomain> for PoseidonFunction {

let fr_input = input
.iter()
.map(|x| Fr::from_repr(x.0).expect("from_repr failure"))
.map(|x| Fr::from_repr_vartime(x.0).expect("from_repr failure"))
.collect::<Vec<_>>();

fr_input[1..]
Expand Down Expand Up @@ -333,8 +333,8 @@ impl LightAlgorithm<PoseidonDomain> for PoseidonFunction {
_height: usize,
) -> PoseidonDomain {
shared_hash_frs(&[
Fr::from_repr(left.0).expect("from_repr failure"),
Fr::from_repr(right.0).expect("from_repr failure"),
Fr::from_repr_vartime(left.0).expect("from_repr failure"),
Fr::from_repr_vartime(right.0).expect("from_repr failure"),
])
.into()
}
Expand All @@ -346,7 +346,7 @@ impl LightAlgorithm<PoseidonDomain> for PoseidonFunction {
.iter()
.enumerate()
.map(|(i, x)| {
if let Some(fr) = Fr::from_repr(x.0) {
if let Some(fr) = Fr::from_repr_vartime(x.0) {
fr
} else {
panic_any(format!("from_repr failure at {}", i));
Expand Down Expand Up @@ -377,7 +377,7 @@ impl From<[u8; 32]> for PoseidonDomain {
impl From<PoseidonDomain> for Fr {
#[inline]
fn from(val: PoseidonDomain) -> Self {
Fr::from_repr(val.0).expect("from_repr failure")
Fr::from_repr_vartime(val.0).expect("from_repr failure")
}
}

Expand Down Expand Up @@ -555,7 +555,7 @@ mod tests {
.collect::<Vec<_>>();

let hashed = PoseidonFunction::hash_md(&data);
let hashed_fr = Fr::from_repr(hashed.0).expect("from_repr failure");
let hashed_fr = Fr::from_repr_vartime(hashed.0).expect("from_repr failure");

let circuit_hashed = PoseidonFunction::hash_md_circuit(&mut cs, circuit_data.as_slice())
.expect("hash_md_circuit failure");
Expand Down
2 changes: 1 addition & 1 deletion filecoin-hashers/src/sha256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl From<Fr> for Sha256Domain {

impl From<Sha256Domain> for Fr {
fn from(val: Sha256Domain) -> Self {
Fr::from_repr(val.0).expect("from_repr failure")
Fr::from_repr_vartime(val.0).expect("from_repr failure")
}
}

Expand Down
4 changes: 2 additions & 2 deletions filecoin-proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ byteorder = "1"
itertools = "0.9"
serde = { version = "1.0", features = ["rc", "derive"] }
serde_json = "1.0"
ff = "0.10.0"
ff = "0.11.0"
blake2b_simd = "0.5"
bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "halo" }
log = "0.4.7"
Expand All @@ -37,7 +37,7 @@ sha2 = "0.9.1"
typenum = "1.11.2"
gperftools = { version = "0.2", optional = true }
generic-array = "0.14.4"
group = "0.10.0"
group = "0.11.0"
byte-slice-cast = "1.0.0"
fr32 = { path = "../fr32", version = "^2.0.0", default-features = false }
once_cell = "1.8.0"
Expand Down
2 changes: 1 addition & 1 deletion fr32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ anyhow = "1.0.23"
bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "halo" }
byte-slice-cast = "1.0.0"
byteorder = "1"
ff = "0.10.0"
ff = "0.11.0"
thiserror = "1.0.6"
blstrs = { git = "https://github.com/filecoin-project/blstrs", branch = "halo" }

Expand Down
2 changes: 1 addition & 1 deletion fr32/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn bytes_into_fr(le_bytes: &[u8]) -> Result<Fr> {
ensure!(le_bytes.len() == 32, Error::BadFrBytes);
let mut repr = [0u8; 32];
repr.copy_from_slice(le_bytes);
Fr::from_repr(repr).ok_or_else(|| Error::BadFrBytes.into())
Fr::from_repr_vartime(repr).ok_or_else(|| Error::BadFrBytes.into())
}

/// Converts a slice of 32 bytes (little-endian, non-Montgomery form) into an `Fr::Repr` by
Expand Down
4 changes: 2 additions & 2 deletions storage-proofs-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ serde = { version = "1.0", features = ["derive"]}
blake2b_simd = "0.5"
blake2s_simd = "0.5"
toml = "0.5"
ff = "0.10.0"
ff = "0.11.0"
bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "halo" }
serde_json = "1.0"
log = "0.4.7"
Expand All @@ -45,7 +45,7 @@ gperftools = { version = "0.2", optional = true }
num_cpus = "1.10.1"
semver = "0.11.0"
fr32 = { path = "../fr32", version = "^2.0.0" }
pairing = "0.20"
pairing = "0.21"
blstrs = { git = "https://github.com/filecoin-project/blstrs", branch = "halo" }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions storage-proofs-porep/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ num-traits = "0.2"
rayon = "1.0.0"
serde = { version = "1.0", features = ["derive"]}
serde_json = "1.0"
ff = "0.10.0"
ff = "0.11.0"
bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "halo" }
log = "0.4.7"
pretty_assertions = "0.6.1"
Expand All @@ -41,7 +41,7 @@ fdlimit = "0.2.0"
fr32 = { path = "../fr32", version = "^2.0.0", default-features = false }
yastl = "0.1.2"
fil_logger = "0.1"
pairing = "0.20"
pairing = "0.21"
blstrs = { git = "https://github.com/filecoin-project/blstrs", branch = "halo" }

[target."cfg(target_arch = \"aarch64\")".dependencies]
Expand Down
16 changes: 8 additions & 8 deletions storage-proofs-porep/src/stacked/vanilla/create_label/multi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,12 +659,12 @@ mod tests {
replica_id,
legacy_porep_id,
ApiVersion::V1_0_0,
Fr::from_u64s_le(&[
Option::from(Fr::from_u64s_le(&[
0xd3faa96b9a0fba04,
0xea81a283d106485e,
0xe3d51b9afa5ac2b3,
0x0462f4f4f1a68d37,
])
]))
.expect("create_labels_aux failed"),
);
test_create_labels_aux(
Expand All @@ -673,12 +673,12 @@ mod tests {
replica_id,
legacy_porep_id,
ApiVersion::V1_0_0,
Fr::from_u64s_le(&[
Option::from(Fr::from_u64s_le(&[
0x7e191e52c4a8da86,
0x5ae8a1c9e6fac148,
0xce239f3b88a894b8,
0x234c00d1dc1d53be,
])
]))
.expect("create_labels_aux failed"),
);

Expand All @@ -688,12 +688,12 @@ mod tests {
replica_id,
new_porep_id,
ApiVersion::V1_1_0,
Fr::from_u64s_le(&[
Option::from(Fr::from_u64s_le(&[
0xabb3f38bb70defcf,
0x777a2e4d7769119f,
0x3448959d495490bc,
0x06021188c7a71cb5,
])
]))
.expect("create_labels_aux failed"),
);

Expand All @@ -703,12 +703,12 @@ mod tests {
replica_id,
new_porep_id,
ApiVersion::V1_1_0,
Fr::from_u64s_le(&[
Option::from(Fr::from_u64s_le(&[
0x22ab81cf68c4676d,
0x7a77a82fc7c9c189,
0xc6c03d32c1e42d23,
0x0f777c18cc2c55bd,
])
]))
.expect("create_labels_aux failed"),
);
}
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-post/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rayon = "1.0.0"
serde = { version = "1.0", features = ["derive"]}
blake2b_simd = "0.5"
blake2s_simd = "0.5"
ff = "0.10.0"
ff = "0.11.0"
bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "halo" }
log = "0.4.7"
hex = "0.4.0"
Expand Down

0 comments on commit cceb016

Please sign in to comment.