diff --git a/fil-proofs-tooling/Cargo.toml b/fil-proofs-tooling/Cargo.toml index 24edc790c..56269acd5 100644 --- a/fil-proofs-tooling/Cargo.toml +++ b/fil-proofs-tooling/Cargo.toml @@ -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" @@ -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] diff --git a/fil-proofs-tooling/src/bin/update_tree_r_cache/main.rs b/fil-proofs-tooling/src/bin/update_tree_r_cache/main.rs index f3f2af62e..83dd551e4 100644 --- a/fil-proofs-tooling/src/bin/update_tree_r_cache/main.rs +++ b/fil-proofs-tooling/src/bin/update_tree_r_cache/main.rs @@ -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}, diff --git a/fil-proofs-tooling/src/metadata.rs b/fil-proofs-tooling/src/metadata.rs index be125c632..68d39f557 100644 --- a/fil-proofs-tooling/src/metadata.rs +++ b/fil-proofs-tooling/src/metadata.rs @@ -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(), diff --git a/filecoin-hashers/Cargo.toml b/filecoin-hashers/Cargo.toml index 12e5a6777..4ea4ea711 100644 --- a/filecoin-hashers/Cargo.toml +++ b/filecoin-hashers/Cargo.toml @@ -9,8 +9,8 @@ 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" @@ -18,7 +18,7 @@ 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 } diff --git a/filecoin-proofs/Cargo.toml b/filecoin-proofs/Cargo.toml index 3d50f861d..e30e8a995 100644 --- a/filecoin-proofs/Cargo.toml +++ b/filecoin-proofs/Cargo.toml @@ -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" @@ -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" diff --git a/filecoin-proofs/src/api/mod.rs b/filecoin-proofs/src/api/mod.rs index 0af9b53bf..d6d147bee 100644 --- a/filecoin-proofs/src/api/mod.rs +++ b/filecoin-proofs/src/api/mod.rs @@ -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, diff --git a/filecoin-proofs/src/api/seal.rs b/filecoin-proofs/src/api/seal.rs index 79b6e5e8f..9f405e47c 100644 --- a/filecoin-proofs/src/api/seal.rs +++ b/filecoin-proofs/src/api/seal.rs @@ -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}; diff --git a/filecoin-proofs/tests/api.rs b/filecoin-proofs/tests/api.rs index 89f33ff16..7f06f3c33 100644 --- a/filecoin-proofs/tests/api.rs +++ b/filecoin-proofs/tests/api.rs @@ -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}; diff --git a/fr32/Cargo.toml b/fr32/Cargo.toml index f5dc379fb..b413b37d1 100644 --- a/fr32/Cargo.toml +++ b/fr32/Cargo.toml @@ -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" diff --git a/storage-proofs-core/Cargo.toml b/storage-proofs-core/Cargo.toml index e88323b09..faf6bbf74 100644 --- a/storage-proofs-core/Cargo.toml +++ b/storage-proofs-core/Cargo.toml @@ -19,7 +19,7 @@ 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" @@ -27,7 +27,7 @@ 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" @@ -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] diff --git a/storage-proofs-core/src/data.rs b/storage-proofs-core/src/data.rs index 323d5dffc..47941ae38 100644 --- a/storage-proofs-core/src/data.rs +++ b/storage-proofs-core/src/data.rs @@ -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. diff --git a/storage-proofs-core/src/drgraph.rs b/storage-proofs-core/src/drgraph.rs index 27757139c..3b84e119f 100644 --- a/storage-proofs-core/src/drgraph.rs +++ b/storage-proofs-core/src/drgraph.rs @@ -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::{ diff --git a/storage-proofs-core/src/parameter_cache.rs b/storage-proofs-core/src/parameter_cache.rs index b99c1d27b..ef7b98c1c 100644 --- a/storage-proofs-core/src/parameter_cache.rs +++ b/storage-proofs-core/src/parameter_cache.rs @@ -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}; diff --git a/storage-proofs-core/src/test_helper.rs b/storage-proofs-core/src/test_helper.rs index 83fa85665..d4b3abbc6 100644 --- a/storage-proofs-core/src/test_helper.rs +++ b/storage-proofs-core/src/test_helper.rs @@ -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() diff --git a/storage-proofs-porep/Cargo.toml b/storage-proofs-porep/Cargo.toml index f78e2c455..bbd28c76c 100644 --- a/storage-proofs-porep/Cargo.toml +++ b/storage-proofs-porep/Cargo.toml @@ -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" @@ -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"] } diff --git a/storage-proofs-post/Cargo.toml b/storage-proofs-post/Cargo.toml index f5cb0f16e..bb509f60a 100644 --- a/storage-proofs-post/Cargo.toml +++ b/storage-proofs-post/Cargo.toml @@ -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" diff --git a/storage-proofs-update/Cargo.toml b/storage-proofs-update/Cargo.toml index 171cea66d..e4df8e60a 100644 --- a/storage-proofs-update/Cargo.toml +++ b/storage-proofs-update/Cargo.toml @@ -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" diff --git a/storage-proofs-update/src/vanilla.rs b/storage-proofs-update/src/vanilla.rs index 1c9456c38..13d90364c 100644 --- a/storage-proofs-update/src/vanilla.rs +++ b/storage-proofs-update/src/vanilla.rs @@ -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},