Skip to content

Commit

Permalink
fix: update ec-gpu-gen
Browse files Browse the repository at this point in the history
`ec-gpu-gen` needs to be updated to v0.5 as v0.4 has dependencies that
depend on yanked version. It's an indirect dependency of `bellperson` and
`neptune`, which are upgraded here.

Moving from `memmap` (which is deprecated) to `memmap2` was also needed
als dependencies also switched.

`chrono` updated their API, so there was also a small change needed.
  • Loading branch information
vmx committed Nov 18, 2022
1 parent b691d7a commit 994d4c7
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 32 deletions.
6 changes: 3 additions & 3 deletions fil-proofs-tooling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ serde_json = "1.0"
regex = "1.3.7"
commandspec = "0.12.2"
chrono = { version = "0.4.7", features = ["serde"] }
memmap = "0.7.0"
bellperson = "0.22.0"
memmap2 = "0.5.6"
bellperson = "0.24.0"
rand = "0.8"
tempfile = "3.0.8"
cpu-time = "1.0.0"
Expand All @@ -46,7 +46,7 @@ fdlimit = "0.2.0"
dialoguer = "0.10.0"
structopt = "0.3.12"
humansize = "1.1.0"
blstrs = "0.5.0"
blstrs = "0.6.0"
time = "0.3.9"

[features]
Expand Down
2 changes: 1 addition & 1 deletion fil-proofs-tooling/src/bin/update_tree_r_cache/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use filecoin_proofs::{
SectorShapeSub8, SectorShapeTop2, OCT_ARITY,
};
use generic_array::typenum::Unsigned;
use memmap::MmapOptions;
use memmap2::MmapOptions;
use merkletree::{
merkle::get_merkle_tree_len,
store::{ExternalReader, ReplicaConfig, Store, StoreConfig},
Expand Down
3 changes: 2 additions & 1 deletion fil-proofs-tooling/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ impl GitMetadata {
let repo = Repository::discover(&repo_path)?;
let head = repo.head()?;
let commit = head.peel_to_commit()?;
let date = Utc.timestamp(commit.time().seconds(), 0);
// Unwrap is OK as the given seconds won't be out of range.
let date = Utc.timestamp_opt(commit.time().seconds(), 0).unwrap();

Ok(GitMetadata {
hash: commit.id().to_string(),
Expand Down
6 changes: 3 additions & 3 deletions filecoin-hashers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs"
readme = "README.md"

[dependencies]
bellperson = "0.22.0"
blstrs = "0.5.0"
bellperson = "0.24.0"
blstrs = "0.6.0"
generic-array = "0.14.4"
merkletree = "0.22.0"
ff = "0.12.0"
anyhow = "1.0.34"
serde = "1.0.117"
rand = "0.8.0"

neptune = { version = "~7.0.0", optional = true, features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] }
neptune = { version = "~8.0.0", optional = true, features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] }
lazy_static = { version = "1.4.0", optional = true }
blake2s_simd = { version = "1.0.0", optional = true }
sha2 = { version = "0.10.2", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions filecoin-proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ storage-proofs-update = { path = "../storage-proofs-update", version = "~12.0.0"
filecoin-hashers = { version = "~7.0.0", path = "../filecoin-hashers", default-features = false, features = ["poseidon", "sha256"] }
rand = "0.8"
lazy_static = "1.2"
memmap = "0.7"
memmap2 = "0.5.6"
serde = { version = "1.0", features = ["rc", "derive"] }
serde_json = "1.0"
blake2b_simd = "1.0.0"
bellperson = "0.22.0"
bellperson = "0.24.0"
log = "0.4.7"
rayon = "1.1.0"
hex = "0.4.0"
Expand All @@ -33,7 +33,7 @@ gperftools = { version = "0.2", optional = true }
generic-array = "0.14.4"
fr32 = { path = "../fr32", version = "~5.0.0", default-features = false }
once_cell = "1.8.0"
blstrs = "0.5.0"
blstrs = "0.6.0"

[dev-dependencies]
criterion = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion filecoin-proofs/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use bincode::deserialize;
use filecoin_hashers::Hasher;
use fr32::{write_unpadded, Fr32Reader};
use log::{info, trace};
use memmap::MmapOptions;
use memmap2::MmapOptions;
use merkletree::store::{DiskStore, LevelCacheStore, StoreConfig};
use storage_proofs_core::{
cache_key::CacheKey,
Expand Down
2 changes: 1 addition & 1 deletion filecoin-proofs/src/api/seal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bincode::{deserialize, serialize};
use blstrs::{Bls12, Scalar as Fr};
use filecoin_hashers::{Domain, Hasher};
use log::{info, trace};
use memmap::MmapOptions;
use memmap2::MmapOptions;
use merkletree::store::{DiskStore, Store, StoreConfig};
use rayon::prelude::*;
use sha2::{Digest, Sha256};
Expand Down
2 changes: 1 addition & 1 deletion filecoin-proofs/tests/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use filecoin_proofs::{
};
use fr32::bytes_into_fr;
use log::info;
use memmap::MmapOptions;
use memmap2::MmapOptions;
use rand::{random, Rng, SeedableRng};
use rand_xorshift::XorShiftRng;
use storage_proofs_core::{api_version::ApiVersion, is_legacy_porep_id, sector::SectorId};
Expand Down
2 changes: 1 addition & 1 deletion fr32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ byte-slice-cast = "1.0.0"
byteorder = "1"
ff = "0.12.0"
thiserror = "1.0.6"
blstrs = "0.5.0"
blstrs = "0.6.0"

[dev-dependencies]
bitvec = "0.17"
Expand Down
6 changes: 3 additions & 3 deletions storage-proofs-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ byteorder = "1"
config = { version = "0.12.0", default-features = false, features = ["toml"] }
itertools = "0.10.3"
lazy_static = "1.2"
memmap = "0.7"
memmap2 = "0.5.6"
aes = "0.8.1"
sha2 = "0.10.2"
fs2 = "0.4"
rayon = "1.0.0"
serde = { version = "1.0", features = ["derive"]}
blake2b_simd = "1.0.0"
ff = "0.12.0"
bellperson = "0.22.0"
bellperson = "0.24.0"
serde_json = "1.0"
log = "0.4.7"
rand_chacha = "0.3"
Expand All @@ -39,7 +39,7 @@ gperftools = { version = "0.2", optional = true }
num_cpus = "1.10.1"
semver = "1.0.6"
fr32 = { path = "../fr32", version = "~5.0.0"}
blstrs = "0.5.0"
blstrs = "0.6.0"
cbc = { version = "0.1.2", features = ["std"] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-core/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::path::PathBuf;

use anyhow::{ensure, Context, Result};
use log::info;
use memmap::{MmapMut, MmapOptions};
use memmap2::{MmapMut, MmapOptions};

/// A wrapper around data either on disk or a slice in memory, that can be dropped and read back into memory,
/// to allow for better control of memory consumption.
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-core/src/drgraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ mod tests {
blake2s::Blake2sHasher, poseidon::PoseidonHasher, sha256::Sha256Hasher,
};
use generic_array::typenum::{U0, U2, U4, U8};
use memmap::{MmapMut, MmapOptions};
use memmap2::{MmapMut, MmapOptions};
use merkletree::store::StoreConfig;

use crate::merkle::{
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-core/src/parameter_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use fs2::FileExt;
use itertools::Itertools;
use lazy_static::lazy_static;
use log::info;
use memmap::MmapOptions;
use memmap2::MmapOptions;
use rand::RngCore;
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-core/src/test_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fs::OpenOptions;
use std::io::Write;
use std::path::Path;

use memmap::{MmapMut, MmapOptions};
use memmap2::{MmapMut, MmapOptions};

pub fn setup_replica(data: &[u8], replica_path: &Path) -> MmapMut {
let mut f = OpenOptions::new()
Expand Down
6 changes: 3 additions & 3 deletions storage-proofs-porep/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ rayon = "1.0.0"
serde = { version = "1.0", features = ["derive"]}
serde_json = "1.0"
ff = "0.12.0"
bellperson = "0.22.0"
bellperson = "0.24.0"
log = "0.4.7"
pretty_assertions = "1.2.0"
generic-array = "0.14.4"
anyhow = "1.0.23"
neptune = { version = "~7.0.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] }
neptune = { version = "~8.0.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] }
num_cpus = "1.10.1"
hex = "0.4.2"
bincode = "1.1.2"
Expand All @@ -38,7 +38,7 @@ libc = "0.2"
fdlimit = "0.2.0"
fr32 = { path = "../fr32", version = "~5.0.0", default-features = false }
yastl = "0.1.2"
blstrs = "0.5.0"
blstrs = "0.6.0"

[target."cfg(target_arch = \"aarch64\")".dependencies]
sha2 = { version = "0.10.2", features = ["compress", "asm"] }
Expand Down
4 changes: 2 additions & 2 deletions storage-proofs-post/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ rayon = "1.0.0"
serde = { version = "1.0", features = ["derive"]}
blake2b_simd = "1.0.0"
ff = "0.12.0"
bellperson = "0.22.0"
bellperson = "0.24.0"
log = "0.4.7"
hex = "0.4.0"
generic-array = "0.14.4"
anyhow = "1.0.23"
fr32 = { path = "../fr32", version = "~5.0.0", default-features = false }
blstrs = "0.5.0"
blstrs = "0.6.0"

[dev-dependencies]
tempfile = "3"
Expand Down
8 changes: 4 additions & 4 deletions storage-proofs-update/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ merkletree = "0.22.0"
rayon = "1.0.0"
serde = { version = "1.0", features = ["derive"]}
ff = "0.12.0"
bellperson = "0.22.0"
blstrs = "0.5.0"
bellperson = "0.24.0"
blstrs = "0.6.0"
log = "0.4.7"
generic-array = "0.14.4"
anyhow = "1.0.23"
neptune = { version = "~7.0.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] }
neptune = { version = "~8.0.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] }
lazy_static = "1.2"
fr32 = { path = "../fr32", version = "~5.0.0", default-features = false }
memmap = "0.7"
memmap2 = "0.5.6"

[dev-dependencies]
tempfile = "3"
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-update/src/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use filecoin_hashers::{Domain, HashFunction, Hasher};
use fr32::{bytes_into_fr, fr_into_bytes_slice};
use generic_array::typenum::Unsigned;
use log::{info, trace};
use memmap::{Mmap, MmapMut, MmapOptions};
use memmap2::{Mmap, MmapMut, MmapOptions};
use merkletree::{
merkle::{get_merkle_tree_leafs, get_merkle_tree_len},
store::{DiskStore, Store, StoreConfig},
Expand Down

0 comments on commit 994d4c7

Please sign in to comment.