From 6258ccfffd3f4f50170c4765a970c23f73405c49 Mon Sep 17 00:00:00 2001 From: nemo Date: Tue, 14 Jun 2022 13:25:43 -0400 Subject: [PATCH 01/11] feat: update dependencies (bellperson, neptune, ff, etc) --- Cargo.toml | 4 ++++ fil-proofs-tooling/Cargo.toml | 7 +++++-- filecoin-hashers/Cargo.toml | 8 ++++---- filecoin-proofs/Cargo.toml | 6 +++--- fr32/Cargo.toml | 4 ++-- storage-proofs-core/Cargo.toml | 6 +++--- storage-proofs-porep/Cargo.toml | 8 ++++---- storage-proofs-post/Cargo.toml | 6 +++--- storage-proofs-update/Cargo.toml | 8 ++++---- 9 files changed, 32 insertions(+), 25 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0ae193df9..c2f838be6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,3 +12,7 @@ members = [ "filecoin-hashers", "storage-proofs-update", ] + +[patch.crates-io] +bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "forward-port-updates" } +neptune = { path = "/home/nemo/pl/neptune" } diff --git a/fil-proofs-tooling/Cargo.toml b/fil-proofs-tooling/Cargo.toml index 98d4d20b5..7d02f25f9 100644 --- a/fil-proofs-tooling/Cargo.toml +++ b/fil-proofs-tooling/Cargo.toml @@ -22,7 +22,7 @@ regex = "1.3.7" commandspec = "0.12.2" chrono = { version = "0.4.7", features = ["serde"] } memmap = "0.7.0" -bellperson = "0.18.0" +bellperson = "0.20.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.4.0" +blstrs = "0.5.0" time = "0.3.9" [features] @@ -72,3 +72,6 @@ profile = ["storage-proofs-core/profile", "measurements"] [target.'cfg(target_arch = "x86_64")'.dependencies] raw-cpuid = "10.3.0" + +[patch.crates-io] +bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "forward-port-updates" } diff --git a/filecoin-hashers/Cargo.toml b/filecoin-hashers/Cargo.toml index 287866b16..eb45eb1fb 100644 --- a/filecoin-hashers/Cargo.toml +++ b/filecoin-hashers/Cargo.toml @@ -9,16 +9,16 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs" readme = "README.md" [dependencies] -bellperson = "0.18.0" -blstrs = "0.4.0" +bellperson = "0.20.0" +blstrs = "0.5.0" generic-array = "0.14.4" merkletree = "0.21.0" -ff = "0.11.0" +ff = "0.12.0" anyhow = "1.0.34" serde = "1.0.117" rand = "0.8.0" -neptune = { version = "5.1.0", optional = true, features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "6.2.0", optional = true, features = ["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 ea5cdb900..ce8ec69d2 100644 --- a/filecoin-proofs/Cargo.toml +++ b/filecoin-proofs/Cargo.toml @@ -20,7 +20,7 @@ memmap = "0.7" serde = { version = "1.0", features = ["rc", "derive"] } serde_json = "1.0" blake2b_simd = "1.0.0" -bellperson = "0.18.0" +bellperson = "0.20.0" log = "0.4.7" rayon = "1.1.0" hex = "0.4.0" @@ -33,12 +33,12 @@ gperftools = { version = "0.2", optional = true } generic-array = "0.14.4" fr32 = { path = "../fr32", version = "^4.0.0", default-features = false } once_cell = "1.8.0" -blstrs = "0.4.0" +blstrs = "0.5.0" [dev-dependencies] criterion = "0.3" tempfile = "3" -ff = "0.11.0" +ff = "0.12.0" fil_logger = "0.1.6" rand_xorshift = "0.3.0" diff --git a/fr32/Cargo.toml b/fr32/Cargo.toml index 58d91db85..78c808edb 100644 --- a/fr32/Cargo.toml +++ b/fr32/Cargo.toml @@ -11,9 +11,9 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs" anyhow = "1.0.23" byte-slice-cast = "1.0.0" byteorder = "1" -ff = "0.11.0" +ff = "0.12.0" thiserror = "1.0.6" -blstrs = "0.4.0" +blstrs = "0.5.0" [dev-dependencies] bitvec = "0.17" diff --git a/storage-proofs-core/Cargo.toml b/storage-proofs-core/Cargo.toml index 8fc361a9c..df5a0ffc3 100644 --- a/storage-proofs-core/Cargo.toml +++ b/storage-proofs-core/Cargo.toml @@ -26,8 +26,8 @@ fs2 = "0.4" rayon = "1.0.0" serde = { version = "1.0", features = ["derive"]} blake2b_simd = "1.0.0" -ff = "0.11.0" -bellperson = "0.18.0" +ff = "0.12.0" +bellperson = "0.20.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 = "^4.0.0"} -blstrs = "0.4.0" +blstrs = "0.5.0" cbc = { version = "0.1.2", features = ["std"] } [dev-dependencies] diff --git a/storage-proofs-porep/Cargo.toml b/storage-proofs-porep/Cargo.toml index 8a11b48a7..70527ba0a 100644 --- a/storage-proofs-porep/Cargo.toml +++ b/storage-proofs-porep/Cargo.toml @@ -20,13 +20,13 @@ num-traits = "0.2" rayon = "1.0.0" serde = { version = "1.0", features = ["derive"]} serde_json = "1.0" -ff = "0.11.0" -bellperson = "0.18.0" +ff = "0.12.0" +bellperson = "0.20.0" log = "0.4.7" pretty_assertions = "1.2.0" generic-array = "0.14.4" anyhow = "1.0.23" -neptune = { version = "5.1.0", features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "6.2.0", features = ["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 = "^4.0.0", default-features = false } yastl = "0.1.2" -blstrs = "0.4.0" +blstrs = "0.5.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 0143f01a2..4f1ef6e4c 100644 --- a/storage-proofs-post/Cargo.toml +++ b/storage-proofs-post/Cargo.toml @@ -16,14 +16,14 @@ sha2 = "0.10.2" rayon = "1.0.0" serde = { version = "1.0", features = ["derive"]} blake2b_simd = "1.0.0" -ff = "0.11.0" -bellperson = "0.18.0" +ff = "0.12.0" +bellperson = "0.20.0" log = "0.4.7" hex = "0.4.0" generic-array = "0.14.4" anyhow = "1.0.23" fr32 = { path = "../fr32", version = "^4.0.0", default-features = false } -blstrs = "0.4.0" +blstrs = "0.5.0" [dev-dependencies] tempfile = "3" diff --git a/storage-proofs-update/Cargo.toml b/storage-proofs-update/Cargo.toml index 49b8cb429..6bb534c73 100644 --- a/storage-proofs-update/Cargo.toml +++ b/storage-proofs-update/Cargo.toml @@ -15,13 +15,13 @@ filecoin-hashers = { path = "../filecoin-hashers", version = "^6.0.0", default-f merkletree = "0.21.0" rayon = "1.0.0" serde = { version = "1.0", features = ["derive"]} -ff = "0.11.0" -bellperson = "0.18.0" -blstrs = "0.4.0" +ff = "0.12.0" +bellperson = "0.20.0" +blstrs = "0.5.0" log = "0.4.7" generic-array = "0.14.4" anyhow = "1.0.23" -neptune = { version = "5.1.0", features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "6.2.0", features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } lazy_static = "1.2" fr32 = { path = "../fr32", version = "^4.0.0", default-features = false } memmap = "0.7" From 2cfb36d70fa282dd2dd10c3175ec9645df3e30ff Mon Sep 17 00:00:00 2001 From: nemo Date: Mon, 13 Jun 2022 16:15:31 -0400 Subject: [PATCH 02/11] * feat: extend proofs API such that aggregation can use snarkpack versions * feat: extend aggregation tests to ensure version incompatibility * feat: update bellperson and neptune to latest * feat: update CI nightly --- .circleci/config.yml | 3 +- fil-proofs-param/src/bin/paramfetch.rs | 3 +- filecoin-proofs/src/api/seal.rs | 4 + filecoin-proofs/tests/api.rs | 491 ++++++++-------------- storage-proofs-core/src/api_version.rs | 4 + storage-proofs-core/src/compound_proof.rs | 4 + 6 files changed, 196 insertions(+), 313 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d58ce428..a6c49f4b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: nightly-toolchain: type: string - default: "nightly-2022-03-10" + default: "nightly-2022-05-09" executors: default: @@ -131,6 +131,7 @@ jobs: at: "." - restore_rustup_cache - restore_parameter_cache + - run: rustup install << pipeline.parameters.nightly-toolchain >> - run: name: Test with use_multicore_sdr command: | diff --git a/fil-proofs-param/src/bin/paramfetch.rs b/fil-proofs-param/src/bin/paramfetch.rs index da3d7a2b3..618c200c8 100644 --- a/fil-proofs-param/src/bin/paramfetch.rs +++ b/fil-proofs-param/src/bin/paramfetch.rs @@ -23,8 +23,7 @@ use tar::Archive; lazy_static! { static ref CLI_ABOUT: String = format!( - "Downloads missing or outdated Groth parameter files from ipfs using ipget.\n\ - \n\ + "Downloads missing or outdated Groth parameter files from ipfs using ipget.\n\n Set the $FIL_PROOFS_PARAMETER_CACHE env-var to specify the path to the parameter cache directory (location where params are written), otherwise params will be written to '{}'.", parameter_cache_dir_name(), diff --git a/filecoin-proofs/src/api/seal.rs b/filecoin-proofs/src/api/seal.rs index e12a56564..79b6e5e8f 100644 --- a/filecoin-proofs/src/api/seal.rs +++ b/filecoin-proofs/src/api/seal.rs @@ -724,6 +724,7 @@ pub fn aggregate_seal_commit_proofs( comm_rs: &[[u8; 32]], seeds: &[[u8; 32]], commit_outputs: &[SealCommitOutput], + aggregate_version: groth16::aggregate::AggregateVersion, ) -> Result { info!("aggregate_seal_commit_proofs:start"); @@ -784,6 +785,7 @@ pub fn aggregate_seal_commit_proofs( &srs_prover_key, &hashed_seeds_and_comm_rs, proofs.as_slice(), + aggregate_version, )?; let mut aggregate_proof_bytes = Vec::new(); aggregate_proof.write(&mut aggregate_proof_bytes)?; @@ -809,6 +811,7 @@ pub fn verify_aggregate_seal_commit_proofs( comm_rs: &[[u8; 32]], seeds: &[[u8; 32]], commit_inputs: Vec>, + aggregate_version: groth16::aggregate::AggregateVersion, ) -> Result { info!("verify_aggregate_seal_commit_proofs:start"); @@ -878,6 +881,7 @@ pub fn verify_aggregate_seal_commit_proofs( &hashed_seeds_and_comm_rs, commit_inputs.as_slice(), &aggregate_proof, + aggregate_version, )?; trace!("end verifying aggregate proof"); diff --git a/filecoin-proofs/tests/api.rs b/filecoin-proofs/tests/api.rs index 7ac87cecb..7243cb15d 100644 --- a/filecoin-proofs/tests/api.rs +++ b/filecoin-proofs/tests/api.rs @@ -335,15 +335,7 @@ fn test_seal_proof_aggregation_1_2kib_porep_id_v1_1_base_8() -> Result<()> { let mut porep_id = [0u8; 32]; porep_id[..8].copy_from_slice(&porep_id_v1_1.to_le_bytes()); assert!(!is_legacy_porep_id(porep_id)); - let verified = aggregate_proofs::( - SECTOR_SIZE_2_KIB, - &porep_id, - ApiVersion::V1_1_0, - proofs_to_aggregate, - )?; - assert!(verified); - - Ok(()) + aggregate_proofs::(SECTOR_SIZE_2_KIB, &porep_id, proofs_to_aggregate) } #[test] @@ -353,15 +345,7 @@ fn test_seal_proof_aggregation_3_2kib_porep_id_v1_1_base_8() -> Result<()> { let porep_id = ARBITRARY_POREP_ID_V1_1_0; assert!(!is_legacy_porep_id(porep_id)); - let verified = aggregate_proofs::( - SECTOR_SIZE_2_KIB, - &porep_id, - ApiVersion::V1_1_0, - proofs_to_aggregate, - )?; - assert!(verified); - - Ok(()) + aggregate_proofs::(SECTOR_SIZE_2_KIB, &porep_id, proofs_to_aggregate) } #[test] @@ -371,15 +355,7 @@ fn test_seal_proof_aggregation_5_2kib_porep_id_v1_1_base_8() -> Result<()> { let porep_id = ARBITRARY_POREP_ID_V1_1_0; assert!(!is_legacy_porep_id(porep_id)); - let verified = aggregate_proofs::( - SECTOR_SIZE_2_KIB, - &porep_id, - ApiVersion::V1_1_0, - proofs_to_aggregate, - )?; - assert!(verified); - - Ok(()) + aggregate_proofs::(SECTOR_SIZE_2_KIB, &porep_id, proofs_to_aggregate) } #[test] @@ -389,15 +365,7 @@ fn test_seal_proof_aggregation_257_2kib_porep_id_v1_1_base_8() -> Result<()> { let porep_id = ARBITRARY_POREP_ID_V1_1_0; assert!(!is_legacy_porep_id(porep_id)); - let verified = aggregate_proofs::( - SECTOR_SIZE_2_KIB, - &porep_id, - ApiVersion::V1_1_0, - proofs_to_aggregate, - )?; - assert!(verified); - - Ok(()) + aggregate_proofs::(SECTOR_SIZE_2_KIB, &porep_id, proofs_to_aggregate) } #[test] @@ -407,15 +375,7 @@ fn test_seal_proof_aggregation_2_4kib_porep_id_v1_1_base_8() -> Result<()> { let porep_id = ARBITRARY_POREP_ID_V1_1_0; assert!(!is_legacy_porep_id(porep_id)); - let verified = aggregate_proofs::( - SECTOR_SIZE_4_KIB, - &porep_id, - ApiVersion::V1_1_0, - proofs_to_aggregate, - )?; - assert!(verified); - - Ok(()) + aggregate_proofs::(SECTOR_SIZE_4_KIB, &porep_id, proofs_to_aggregate) } #[test] @@ -425,15 +385,7 @@ fn test_seal_proof_aggregation_1_32kib_porep_id_v1_1_base_8() -> Result<()> { let porep_id = ARBITRARY_POREP_ID_V1_1_0; assert!(!is_legacy_porep_id(porep_id)); - let verified = aggregate_proofs::( - SECTOR_SIZE_32_KIB, - &porep_id, - ApiVersion::V1_1_0, - proofs_to_aggregate, - )?; - assert!(verified); - - Ok(()) + aggregate_proofs::(SECTOR_SIZE_32_KIB, &porep_id, proofs_to_aggregate) } #[test] @@ -443,15 +395,7 @@ fn test_seal_proof_aggregation_818_32kib_porep_id_v1_1_base_8() -> Result<()> { let porep_id = ARBITRARY_POREP_ID_V1_1_0; assert!(!is_legacy_porep_id(porep_id)); - let verified = aggregate_proofs::( - SECTOR_SIZE_32_KIB, - &porep_id, - ApiVersion::V1_1_0, - proofs_to_aggregate, - )?; - assert!(verified); - - Ok(()) + aggregate_proofs::(SECTOR_SIZE_32_KIB, &porep_id, proofs_to_aggregate) } //#[test] @@ -507,44 +451,73 @@ fn test_seal_proof_aggregation_818_32kib_porep_id_v1_1_base_8() -> Result<()> { fn aggregate_proofs( sector_size: u64, porep_id: &[u8; 32], - api_version: ApiVersion, num_proofs_to_aggregate: usize, -) -> Result { +) -> Result<()> { let mut rng = XorShiftRng::from_seed(TEST_SEED); let prover_fr: DefaultTreeDomain = Fr::random(&mut rng).into(); let mut prover_id = [0u8; 32]; prover_id.copy_from_slice(AsRef::<[u8]>::as_ref(&prover_fr)); - let mut commit_outputs = Vec::with_capacity(num_proofs_to_aggregate); - let mut commit_inputs = Vec::with_capacity(num_proofs_to_aggregate); - let mut seeds = Vec::with_capacity(num_proofs_to_aggregate); - let mut comm_rs = Vec::with_capacity(num_proofs_to_aggregate); + let api_version = ApiVersion::V1_1_0; + let aggregate_versions = vec![ + groth16::aggregate::AggregateVersion::V1, + groth16::aggregate::AggregateVersion::V2, + ]; + for aggregate_version in aggregate_versions { + let mut commit_outputs = Vec::with_capacity(num_proofs_to_aggregate); + let mut commit_inputs = Vec::with_capacity(num_proofs_to_aggregate); + let mut seeds = Vec::with_capacity(num_proofs_to_aggregate); + let mut comm_rs = Vec::with_capacity(num_proofs_to_aggregate); + + let (commit_output, commit_input, seed, comm_r) = create_seal_for_aggregation::<_, Tree>( + &mut rng, + sector_size, + prover_id, + porep_id, + api_version, + )?; - let (commit_output, commit_input, seed, comm_r) = create_seal_for_aggregation::<_, Tree>( - &mut rng, - sector_size, - prover_id, - porep_id, - api_version, - )?; + for _ in 0..num_proofs_to_aggregate { + commit_outputs.push(commit_output.clone()); + commit_inputs.extend(commit_input.clone()); + seeds.push(seed); + comm_rs.push(comm_r); + } - for _ in 0..num_proofs_to_aggregate { - commit_outputs.push(commit_output.clone()); - commit_inputs.extend(commit_input.clone()); - seeds.push(seed); - comm_rs.push(comm_r); + let config = porep_config(sector_size, *porep_id, api_version); + let aggregate_proof = aggregate_seal_commit_proofs::( + config, + &comm_rs, + &seeds, + commit_outputs.as_slice(), + aggregate_version, + )?; + assert!(verify_aggregate_seal_commit_proofs::( + config, + aggregate_proof.clone(), + &comm_rs, + &seeds, + commit_inputs.clone(), + aggregate_version, + )?); + + // This ensures that once we generate an snarkpack proof + // with one version, it cannot verify with another. + let conflicting_aggregate_version = match aggregate_version { + groth16::aggregate::AggregateVersion::V1 => groth16::aggregate::AggregateVersion::V2, + groth16::aggregate::AggregateVersion::V2 => groth16::aggregate::AggregateVersion::V1, + }; + assert!(!verify_aggregate_seal_commit_proofs::( + config, + aggregate_proof, + &comm_rs, + &seeds, + commit_inputs, + conflicting_aggregate_version, + )?); } - let config = porep_config(sector_size, *porep_id, api_version); - let aggregate_proof = - aggregate_seal_commit_proofs::(config, &comm_rs, &seeds, commit_outputs.as_slice())?; - verify_aggregate_seal_commit_proofs::( - config, - aggregate_proof, - &comm_rs, - &seeds, - commit_inputs, - ) + Ok(()) } fn get_layer_file_paths(cache_dir: &tempfile::TempDir) -> Vec { @@ -803,7 +776,7 @@ fn test_winning_post_empty_sector_challenge() -> Result<()> { challenge_count: WINNING_POST_CHALLENGE_COUNT, typ: PoStType::Winning, priority: false, - api_version: ApiVersion::V1_0_0, + api_version, }; assert!(generate_winning_post_sector_challenge::( @@ -928,34 +901,19 @@ fn test_window_post_single_partition_smaller_2kib_base_8() -> Result<()> { .get(§or_size) .expect("unknown sector size"); - window_post::( - sector_size, - sector_count / 2, - sector_count, - false, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - sector_count / 2, - sector_count, - true, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - sector_count / 2, - sector_count, - false, - ApiVersion::V1_1_0, - )?; - window_post::( - sector_size, - sector_count / 2, - sector_count, - true, - ApiVersion::V1_1_0, - ) + let versions = vec![ApiVersion::V1_0_0, ApiVersion::V1_1_0]; + for version in versions { + window_post::( + sector_size, + sector_count / 2, + sector_count, + false, + version, + )?; + window_post::(sector_size, sector_count / 2, sector_count, true, version)?; + } + + Ok(()) } #[test] @@ -968,34 +926,19 @@ fn test_window_post_two_partitions_matching_2kib_base_8() -> Result<()> { .get(§or_size) .expect("unknown sector size"); - window_post::( - sector_size, - 2 * sector_count, - sector_count, - false, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - true, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - false, - ApiVersion::V1_1_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - true, - ApiVersion::V1_1_0, - ) + let versions = vec![ApiVersion::V1_0_0, ApiVersion::V1_1_0]; + for version in versions { + window_post::( + sector_size, + 2 * sector_count, + sector_count, + false, + version, + )?; + window_post::(sector_size, 2 * sector_count, sector_count, true, version)?; + } + + Ok(()) } #[test] @@ -1008,34 +951,19 @@ fn test_window_post_two_partitions_matching_4kib_sub_8_2() -> Result<()> { .get(§or_size) .expect("unknown sector size"); - window_post::( - sector_size, - 2 * sector_count, - sector_count, - false, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - true, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - false, - ApiVersion::V1_1_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - true, - ApiVersion::V1_1_0, - ) + let versions = vec![ApiVersion::V1_0_0, ApiVersion::V1_1_0]; + for version in versions { + window_post::( + sector_size, + 2 * sector_count, + sector_count, + false, + version, + )?; + window_post::(sector_size, 2 * sector_count, sector_count, true, version)?; + } + + Ok(()) } #[test] @@ -1048,34 +976,25 @@ fn test_window_post_two_partitions_matching_16kib_sub_8_8() -> Result<()> { .get(§or_size) .expect("unknown sector size"); - window_post::( - sector_size, - 2 * sector_count, - sector_count, - false, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - true, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - false, - ApiVersion::V1_1_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - true, - ApiVersion::V1_1_0, - ) + let versions = vec![ApiVersion::V1_0_0, ApiVersion::V1_1_0]; + for version in versions { + window_post::( + sector_size, + 2 * sector_count, + sector_count, + false, + version, + )?; + window_post::( + sector_size, + 2 * sector_count, + sector_count, + true, + version, + )?; + } + + Ok(()) } #[test] @@ -1088,34 +1007,25 @@ fn test_window_post_two_partitions_matching_32kib_top_8_8_2() -> Result<()> { .get(§or_size) .expect("unknown sector size"); - window_post::( - sector_size, - 2 * sector_count, - sector_count, - false, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - true, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - false, - ApiVersion::V1_1_0, - )?; - window_post::( - sector_size, - 2 * sector_count, - sector_count, - true, - ApiVersion::V1_1_0, - ) + let versions = vec![ApiVersion::V1_0_0, ApiVersion::V1_1_0]; + for version in versions { + window_post::( + sector_size, + 2 * sector_count, + sector_count, + false, + version, + )?; + window_post::( + sector_size, + 2 * sector_count, + sector_count, + true, + version, + )?; + } + + Ok(()) } #[test] @@ -1128,34 +1038,25 @@ fn test_window_post_two_partitions_smaller_2kib_base_8() -> Result<()> { .get(§or_size) .expect("unknown sector size"); - window_post::( - sector_size, - 2 * sector_count - 1, - sector_count, - false, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count - 1, - sector_count, - true, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - 2 * sector_count - 1, - sector_count, - false, - ApiVersion::V1_1_0, - )?; - window_post::( - sector_size, - 2 * sector_count - 1, - sector_count, - true, - ApiVersion::V1_1_0, - ) + let versions = vec![ApiVersion::V1_0_0, ApiVersion::V1_1_0]; + for version in versions { + window_post::( + sector_size, + 2 * sector_count - 1, + sector_count, + false, + version, + )?; + window_post::( + sector_size, + 2 * sector_count - 1, + sector_count, + true, + version, + )?; + } + + Ok(()) } #[test] @@ -1168,34 +1069,13 @@ fn test_window_post_single_partition_matching_2kib_base_8() -> Result<()> { .get(§or_size) .expect("unknown sector size"); - window_post::( - sector_size, - sector_count, - sector_count, - false, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - sector_count, - sector_count, - true, - ApiVersion::V1_0_0, - )?; - window_post::( - sector_size, - sector_count, - sector_count, - false, - ApiVersion::V1_1_0, - )?; - window_post::( - sector_size, - sector_count, - sector_count, - true, - ApiVersion::V1_1_0, - ) + let versions = vec![ApiVersion::V1_0_0, ApiVersion::V1_1_0]; + for version in versions { + window_post::(sector_size, sector_count, sector_count, false, version)?; + window_post::(sector_size, sector_count, sector_count, true, version)?; + } + + Ok(()) } #[test] @@ -1207,28 +1087,19 @@ fn test_window_post_partition_matching_2kib_base_8() -> Result<()> { .get(§or_size) .expect("unknown sector size"); - partition_window_post::( - sector_size, - 3, // Validate the scenarios of two partition - sector_count, - false, - ApiVersion::V1_0_0, - )?; - partition_window_post::( - sector_size, - 3, - sector_count, - true, - ApiVersion::V1_0_0, - )?; - partition_window_post::( - sector_size, - 3, - sector_count, - false, - ApiVersion::V1_1_0, - )?; - partition_window_post::(sector_size, 3, sector_count, true, ApiVersion::V1_1_0) + let versions = vec![ApiVersion::V1_0_0, ApiVersion::V1_1_0]; + for version in versions { + partition_window_post::( + sector_size, + 3, // Validate the scenarios of two partition + sector_count, + false, + version, + )?; + partition_window_post::(sector_size, 3, sector_count, true, version)?; + } + + Ok(()) } fn partition_window_post( diff --git a/storage-proofs-core/src/api_version.rs b/storage-proofs-core/src/api_version.rs index 4bc2ec0c3..45cf85748 100644 --- a/storage-proofs-core/src/api_version.rs +++ b/storage-proofs-core/src/api_version.rs @@ -63,4 +63,8 @@ fn test_fmt() { fn test_as_semver() { assert_eq!(ApiVersion::V1_0_0.as_semver().major, 1); assert_eq!(ApiVersion::V1_1_0.as_semver().major, 1); + assert_eq!(ApiVersion::V1_0_0.as_semver().minor, 0); + assert_eq!(ApiVersion::V1_1_0.as_semver().minor, 1); + assert_eq!(ApiVersion::V1_0_0.as_semver().patch, 0); + assert_eq!(ApiVersion::V1_1_0.as_semver().patch, 0); } diff --git a/storage-proofs-core/src/compound_proof.rs b/storage-proofs-core/src/compound_proof.rs index 526a0ff0a..6d7b92e11 100644 --- a/storage-proofs-core/src/compound_proof.rs +++ b/storage-proofs-core/src/compound_proof.rs @@ -280,11 +280,13 @@ where prover_srs: &ProverSRS, hashed_seeds_and_comm_rs: &[u8], proofs: &[groth16::Proof], + version: groth16::aggregate::AggregateVersion, ) -> Result> { Ok(aggregate_proofs::( prover_srs, hashed_seeds_and_comm_rs, proofs, + version, )?) } @@ -301,6 +303,7 @@ where hashed_seeds_and_comm_rs: &[u8], public_inputs: &[Vec], aggregate_proof: &groth16::aggregate::AggregateProof, + version: groth16::aggregate::AggregateVersion, ) -> Result { let mut rng = OsRng; @@ -311,6 +314,7 @@ where public_inputs, aggregate_proof, hashed_seeds_and_comm_rs, + version, )?) } From 2a50da4ca2881ba391275e95216def100de172f4 Mon Sep 17 00:00:00 2001 From: nemo Date: Tue, 14 Jun 2022 13:47:52 -0400 Subject: [PATCH 03/11] feat: update dependencies --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c2f838be6..b005bfa20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,4 +15,4 @@ members = [ [patch.crates-io] bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "forward-port-updates" } -neptune = { path = "/home/nemo/pl/neptune" } +neptune = { git = "https://github.com/filecoin-project/neptune", branch = "updated-deps" } From 38d9a335f6603d1d0faf51dedcf0777199fae5fe Mon Sep 17 00:00:00 2001 From: nemo Date: Wed, 15 Jun 2022 08:25:10 -0400 Subject: [PATCH 04/11] feat: lock versions so only patch releases are allowed Based on https://github.com/filecoin-project/rust-fil-proofs/pull/1613 --- fil-proofs-param/Cargo.toml | 10 +++++----- fil-proofs-param/src/bin/paramfetch.rs | 2 +- fil-proofs-tooling/Cargo.toml | 10 +++++----- filecoin-hashers/Cargo.toml | 2 +- filecoin-proofs/Cargo.toml | 12 ++++++------ storage-proofs-core/Cargo.toml | 8 ++++---- storage-proofs-porep/Cargo.toml | 12 ++++++------ storage-proofs-post/Cargo.toml | 8 ++++---- storage-proofs-update/Cargo.toml | 10 +++++----- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/fil-proofs-param/Cargo.toml b/fil-proofs-param/Cargo.toml index 93eabbf87..0ae7d57e7 100644 --- a/fil-proofs-param/Cargo.toml +++ b/fil-proofs-param/Cargo.toml @@ -9,11 +9,11 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs" readme = "README.md" [dependencies] -storage-proofs-core = { path = "../storage-proofs-core", version = "^11.0.0", default-features = false} -storage-proofs-porep = { path = "../storage-proofs-porep", version = "^11.0.0", default-features = false } -storage-proofs-post = { path = "../storage-proofs-post", version = "^11.0.0", default-features = false } -storage-proofs-update = { path = "../storage-proofs-update", version = "^11.0.0", default-features = false } -filecoin-proofs = { version = "^11.0.0", path = "../filecoin-proofs", default-features = false } +storage-proofs-core = { path = "../storage-proofs-core", version = "~11.0.0", default-features = false} +storage-proofs-porep = { path = "../storage-proofs-porep", version = "~11.0.0", default-features = false } +storage-proofs-post = { path = "../storage-proofs-post", version = "~11.0.0", default-features = false } +storage-proofs-update = { path = "../storage-proofs-update", version = "~11.0.0", default-features = false } +filecoin-proofs = { version = "~11.0.0", path = "../filecoin-proofs", default-features = false } rand = "0.8" lazy_static = "1.2" pbr = "1.0" diff --git a/fil-proofs-param/src/bin/paramfetch.rs b/fil-proofs-param/src/bin/paramfetch.rs index 618c200c8..e6b447073 100644 --- a/fil-proofs-param/src/bin/paramfetch.rs +++ b/fil-proofs-param/src/bin/paramfetch.rs @@ -31,7 +31,7 @@ lazy_static! { } const DEFAULT_JSON: &str = include_str!("../../parameters.json"); -const DEFAULT_IPGET_VERSION: &str = "v0.6.0"; +const DEFAULT_IPGET_VERSION: &str = "v0.8.1"; #[inline] fn get_ipget_dir(version: &str) -> String { diff --git a/fil-proofs-tooling/Cargo.toml b/fil-proofs-tooling/Cargo.toml index 7d02f25f9..c7ba690a1 100644 --- a/fil-proofs-tooling/Cargo.toml +++ b/fil-proofs-tooling/Cargo.toml @@ -10,11 +10,11 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs" readme = "README.md" [dependencies] -storage-proofs-core = { path = "../storage-proofs-core", version = "^11.0.0", default-features = false} -storage-proofs-porep = { path = "../storage-proofs-porep", version = "^11.0.0", default-features = false } -storage-proofs-post = { path = "../storage-proofs-post", version = "^11.0.0", default-features = false } -filecoin-proofs = { path = "../filecoin-proofs", default-features = false } -filecoin-hashers = { path = "../filecoin-hashers", default-features = false, features = ["poseidon", "blake2s", "sha256"] } +storage-proofs-core = { path = "../storage-proofs-core", version = "~11.0.0", default-features = false} +storage-proofs-porep = { path = "../storage-proofs-porep", version = "~11.0.0", default-features = false } +storage-proofs-post = { path = "../storage-proofs-post", version = "~11.0.0", default-features = false } +filecoin-proofs = { path = "../filecoin-proofs", version = "~11.0.0", default-features = false } +filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["poseidon", "blake2s", "sha256"] } clap = { version = "3.1.6", features = ["derive"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/filecoin-hashers/Cargo.toml b/filecoin-hashers/Cargo.toml index eb45eb1fb..7ed61b7aa 100644 --- a/filecoin-hashers/Cargo.toml +++ b/filecoin-hashers/Cargo.toml @@ -18,7 +18,7 @@ anyhow = "1.0.34" serde = "1.0.117" rand = "0.8.0" -neptune = { version = "6.2.0", optional = true, features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "~6.2.0", optional = true, features = ["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 ce8ec69d2..6982bee57 100644 --- a/filecoin-proofs/Cargo.toml +++ b/filecoin-proofs/Cargo.toml @@ -9,11 +9,11 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs" readme = "README.md" [dependencies] -storage-proofs-core = { path = "../storage-proofs-core", version = "^11.0.0", default-features = false} -storage-proofs-porep = { path = "../storage-proofs-porep", version = "^11.0.0", default-features = false } -storage-proofs-post = { path = "../storage-proofs-post", version = "^11.0.0", default-features = false } -storage-proofs-update = { path = "../storage-proofs-update", version = "^11.0.0", default-features = false } -filecoin-hashers = { version = "^6.0.0", path = "../filecoin-hashers", default-features = false, features = ["poseidon", "sha256"] } +storage-proofs-core = { path = "../storage-proofs-core", version = "~11.0.0", default-features = false} +storage-proofs-porep = { path = "../storage-proofs-porep", version = "~11.0.0", default-features = false } +storage-proofs-post = { path = "../storage-proofs-post", version = "~11.0.0", default-features = false } +storage-proofs-update = { path = "../storage-proofs-update", version = "~11.0.0", default-features = false } +filecoin-hashers = { version = "~6.0.0", path = "../filecoin-hashers", default-features = false, features = ["poseidon", "sha256"] } rand = "0.8" lazy_static = "1.2" memmap = "0.7" @@ -31,7 +31,7 @@ sha2 = "0.10.2" typenum = "1.11.2" gperftools = { version = "0.2", optional = true } generic-array = "0.14.4" -fr32 = { path = "../fr32", version = "^4.0.0", default-features = false } +fr32 = { path = "../fr32", version = "~4.0.0", default-features = false } once_cell = "1.8.0" blstrs = "0.5.0" diff --git a/storage-proofs-core/Cargo.toml b/storage-proofs-core/Cargo.toml index df5a0ffc3..1c73b8256 100644 --- a/storage-proofs-core/Cargo.toml +++ b/storage-proofs-core/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" bench = false [dependencies] -filecoin-hashers = { path = "../filecoin-hashers", version = "^6.0.0", default-features = false, features = ["sha256", "poseidon"] } +filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["sha256", "poseidon"] } rand = "0.8" merkletree = "0.21.0" byteorder = "1" @@ -38,7 +38,7 @@ cpu-time = { version = "1.0", optional = true } gperftools = { version = "0.2", optional = true } num_cpus = "1.10.1" semver = "1.0.6" -fr32 = { path = "../fr32", version = "^4.0.0"} +fr32 = { path = "../fr32", version = "~4.0.0"} blstrs = "0.5.0" cbc = { version = "0.1.2", features = ["std"] } @@ -47,8 +47,8 @@ proptest = "1.0.0" criterion = "0.3" rand_xorshift = "0.3.0" pretty_assertions = "1.2.0" -sha2raw = { path = "../sha2raw", version = "^6.0.0"} -filecoin-hashers = { path = "../filecoin-hashers", version = "^6.0.0", default-features = false, features = ["blake2s", "sha256", "poseidon"] } +sha2raw = { path = "../sha2raw", version = "~6.0.0"} +filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["blake2s", "sha256", "poseidon"] } tempfile = "3" blake2s_simd = "1.0.0" diff --git a/storage-proofs-porep/Cargo.toml b/storage-proofs-porep/Cargo.toml index 70527ba0a..92c064a06 100644 --- a/storage-proofs-porep/Cargo.toml +++ b/storage-proofs-porep/Cargo.toml @@ -10,9 +10,9 @@ readme = "README.md" [dependencies] crossbeam = "0.8" -storage-proofs-core = { path = "../storage-proofs-core", version = "^11.0.0", default-features = false} -sha2raw = { path = "../sha2raw", version = "^6.0.0"} -filecoin-hashers = { path = "../filecoin-hashers", version = "^6.0.0", default-features = false, features = ["poseidon", "sha256"]} +storage-proofs-core = { path = "../storage-proofs-core", version = "~11.0.0", default-features = false} +sha2raw = { path = "../sha2raw", version = "~6.0.0"} +filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["poseidon", "sha256"]} merkletree = "0.21.0" mapr = "0.8.0" num-bigint = "0.4.3" @@ -26,7 +26,7 @@ log = "0.4.7" pretty_assertions = "1.2.0" generic-array = "0.14.4" anyhow = "1.0.23" -neptune = { version = "6.2.0", features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "~6.2.0", features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } num_cpus = "1.10.1" hex = "0.4.2" bincode = "1.1.2" @@ -36,7 +36,7 @@ byte-slice-cast = "1.0.0" hwloc = { version = "0.5.0", optional = true } libc = "0.2" fdlimit = "0.2.0" -fr32 = { path = "../fr32", version = "^4.0.0", default-features = false } +fr32 = { path = "../fr32", version = "~4.0.0", default-features = false } yastl = "0.1.2" blstrs = "0.5.0" @@ -51,7 +51,7 @@ rand = "0.8" rand_xorshift = "0.3.0" criterion = "0.3.2" glob = "0.3.0" -filecoin-hashers = { path = "../filecoin-hashers", version = "^6.0.0", default-features = false, features = ["poseidon", "sha256", "blake2s"]} +filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["poseidon", "sha256", "blake2s"]} fil_logger = "0.1.6" [features] diff --git a/storage-proofs-post/Cargo.toml b/storage-proofs-post/Cargo.toml index 4f1ef6e4c..9b80ecbcb 100644 --- a/storage-proofs-post/Cargo.toml +++ b/storage-proofs-post/Cargo.toml @@ -9,8 +9,8 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs" readme = "README.md" [dependencies] -storage-proofs-core = { path = "../storage-proofs-core", version = "^11.0.0", default-features = false} -filecoin-hashers = { path = "../filecoin-hashers", version = "^6.0.0", default-features = false, features = ["poseidon", "sha256"]} +storage-proofs-core = { path = "../storage-proofs-core", version = "~11.0.0", default-features = false} +filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["poseidon", "sha256"]} byteorder = "1" sha2 = "0.10.2" rayon = "1.0.0" @@ -22,13 +22,13 @@ log = "0.4.7" hex = "0.4.0" generic-array = "0.14.4" anyhow = "1.0.23" -fr32 = { path = "../fr32", version = "^4.0.0", default-features = false } +fr32 = { path = "../fr32", version = "~4.0.0", default-features = false } blstrs = "0.5.0" [dev-dependencies] tempfile = "3" pretty_assertions = "1.2.0" -filecoin-hashers = { path = "../filecoin-hashers", version = "^6.0.0", default-features = false, features = ["poseidon", "sha256", "blake2s"]} +filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["poseidon", "sha256", "blake2s"]} rand = "0.8" rand_xorshift = "0.3.0" diff --git a/storage-proofs-update/Cargo.toml b/storage-proofs-update/Cargo.toml index 6bb534c73..ead27a9ae 100644 --- a/storage-proofs-update/Cargo.toml +++ b/storage-proofs-update/Cargo.toml @@ -9,9 +9,9 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs" readme = "README.md" [dependencies] -storage-proofs-core = { path = "../storage-proofs-core", version = "^11.0.0", default-features = false} -storage-proofs-porep = { path = "../storage-proofs-porep", version = "^11.0.0", default-features = false} -filecoin-hashers = { path = "../filecoin-hashers", version = "^6.0.0", default-features = false, features = ["poseidon", "sha256"]} +storage-proofs-core = { path = "../storage-proofs-core", version = "~11.0.0", default-features = false} +storage-proofs-porep = { path = "../storage-proofs-porep", version = "~11.0.0", default-features = false} +filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["poseidon", "sha256"]} merkletree = "0.21.0" rayon = "1.0.0" serde = { version = "1.0", features = ["derive"]} @@ -21,9 +21,9 @@ blstrs = "0.5.0" log = "0.4.7" generic-array = "0.14.4" anyhow = "1.0.23" -neptune = { version = "6.2.0", features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "~6.2.0", features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } lazy_static = "1.2" -fr32 = { path = "../fr32", version = "^4.0.0", default-features = false } +fr32 = { path = "../fr32", version = "~4.0.0", default-features = false } memmap = "0.7" [dev-dependencies] From 1bd48f0509d718820e13aebecea516eab7d8c8f3 Mon Sep 17 00:00:00 2001 From: nemo Date: Wed, 15 Jun 2022 08:28:09 -0400 Subject: [PATCH 05/11] feat: update bellperson to latest master --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b005bfa20..479446e9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,5 +14,5 @@ members = [ ] [patch.crates-io] -bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "forward-port-updates" } +bellperson = { git = "https://github.com/filecoin-project/bellperson" } neptune = { git = "https://github.com/filecoin-project/neptune", branch = "updated-deps" } From 5619341842c7d29e603eee0c7a149789ed3eded2 Mon Sep 17 00:00:00 2001 From: nemo Date: Thu, 16 Jun 2022 08:17:11 -0400 Subject: [PATCH 06/11] feat: update bellperson to latest release --- Cargo.toml | 1 - fil-proofs-tooling/Cargo.toml | 5 +---- filecoin-hashers/Cargo.toml | 2 +- filecoin-proofs/Cargo.toml | 2 +- storage-proofs-core/Cargo.toml | 2 +- storage-proofs-porep/Cargo.toml | 2 +- storage-proofs-post/Cargo.toml | 2 +- storage-proofs-update/Cargo.toml | 2 +- 8 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 479446e9c..1c9cdfd12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,5 +14,4 @@ members = [ ] [patch.crates-io] -bellperson = { git = "https://github.com/filecoin-project/bellperson" } neptune = { git = "https://github.com/filecoin-project/neptune", branch = "updated-deps" } diff --git a/fil-proofs-tooling/Cargo.toml b/fil-proofs-tooling/Cargo.toml index c7ba690a1..f44f7003f 100644 --- a/fil-proofs-tooling/Cargo.toml +++ b/fil-proofs-tooling/Cargo.toml @@ -22,7 +22,7 @@ regex = "1.3.7" commandspec = "0.12.2" chrono = { version = "0.4.7", features = ["serde"] } memmap = "0.7.0" -bellperson = "0.20.0" +bellperson = "0.22.0" rand = "0.8" tempfile = "3.0.8" cpu-time = "1.0.0" @@ -72,6 +72,3 @@ profile = ["storage-proofs-core/profile", "measurements"] [target.'cfg(target_arch = "x86_64")'.dependencies] raw-cpuid = "10.3.0" - -[patch.crates-io] -bellperson = { git = "https://github.com/filecoin-project/bellperson", branch = "forward-port-updates" } diff --git a/filecoin-hashers/Cargo.toml b/filecoin-hashers/Cargo.toml index 7ed61b7aa..92785685e 100644 --- a/filecoin-hashers/Cargo.toml +++ b/filecoin-hashers/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/filecoin-project/rust-fil-proofs" readme = "README.md" [dependencies] -bellperson = "0.20.0" +bellperson = "0.22.0" blstrs = "0.5.0" generic-array = "0.14.4" merkletree = "0.21.0" diff --git a/filecoin-proofs/Cargo.toml b/filecoin-proofs/Cargo.toml index 6982bee57..a283b3d35 100644 --- a/filecoin-proofs/Cargo.toml +++ b/filecoin-proofs/Cargo.toml @@ -20,7 +20,7 @@ memmap = "0.7" serde = { version = "1.0", features = ["rc", "derive"] } serde_json = "1.0" blake2b_simd = "1.0.0" -bellperson = "0.20.0" +bellperson = "0.22.0" log = "0.4.7" rayon = "1.1.0" hex = "0.4.0" diff --git a/storage-proofs-core/Cargo.toml b/storage-proofs-core/Cargo.toml index 1c73b8256..6d83a2fe1 100644 --- a/storage-proofs-core/Cargo.toml +++ b/storage-proofs-core/Cargo.toml @@ -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.20.0" +bellperson = "0.22.0" serde_json = "1.0" log = "0.4.7" rand_chacha = "0.3" diff --git a/storage-proofs-porep/Cargo.toml b/storage-proofs-porep/Cargo.toml index 92c064a06..35c0c3f1f 100644 --- a/storage-proofs-porep/Cargo.toml +++ b/storage-proofs-porep/Cargo.toml @@ -21,7 +21,7 @@ rayon = "1.0.0" serde = { version = "1.0", features = ["derive"]} serde_json = "1.0" ff = "0.12.0" -bellperson = "0.20.0" +bellperson = "0.22.0" log = "0.4.7" pretty_assertions = "1.2.0" generic-array = "0.14.4" diff --git a/storage-proofs-post/Cargo.toml b/storage-proofs-post/Cargo.toml index 9b80ecbcb..0b2f7625d 100644 --- a/storage-proofs-post/Cargo.toml +++ b/storage-proofs-post/Cargo.toml @@ -17,7 +17,7 @@ rayon = "1.0.0" serde = { version = "1.0", features = ["derive"]} blake2b_simd = "1.0.0" ff = "0.12.0" -bellperson = "0.20.0" +bellperson = "0.22.0" log = "0.4.7" hex = "0.4.0" generic-array = "0.14.4" diff --git a/storage-proofs-update/Cargo.toml b/storage-proofs-update/Cargo.toml index ead27a9ae..a419f4758 100644 --- a/storage-proofs-update/Cargo.toml +++ b/storage-proofs-update/Cargo.toml @@ -16,7 +16,7 @@ merkletree = "0.21.0" rayon = "1.0.0" serde = { version = "1.0", features = ["derive"]} ff = "0.12.0" -bellperson = "0.20.0" +bellperson = "0.22.0" blstrs = "0.5.0" log = "0.4.7" generic-array = "0.14.4" From 69e33551cb566dedb232036fd29a511da49c5d89 Mon Sep 17 00:00:00 2001 From: nemo Date: Fri, 17 Jun 2022 08:58:31 -0400 Subject: [PATCH 07/11] feat: update neptune to current master --- Cargo.toml | 2 +- filecoin-hashers/Cargo.toml | 2 +- storage-proofs-porep/Cargo.toml | 2 +- storage-proofs-porep/src/stacked/vanilla/proof.rs | 6 +++--- storage-proofs-update/Cargo.toml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1c9cdfd12..5393f1a81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,4 @@ members = [ ] [patch.crates-io] -neptune = { git = "https://github.com/filecoin-project/neptune", branch = "updated-deps" } +neptune = { git = "https://github.com/filecoin-project/neptune" } diff --git a/filecoin-hashers/Cargo.toml b/filecoin-hashers/Cargo.toml index 92785685e..18e516279 100644 --- a/filecoin-hashers/Cargo.toml +++ b/filecoin-hashers/Cargo.toml @@ -18,7 +18,7 @@ anyhow = "1.0.34" serde = "1.0.117" rand = "0.8.0" -neptune = { version = "~6.2.0", optional = true, features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "~6.2.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/storage-proofs-porep/Cargo.toml b/storage-proofs-porep/Cargo.toml index 35c0c3f1f..017c308c1 100644 --- a/storage-proofs-porep/Cargo.toml +++ b/storage-proofs-porep/Cargo.toml @@ -26,7 +26,7 @@ log = "0.4.7" pretty_assertions = "1.2.0" generic-array = "0.14.4" anyhow = "1.0.23" -neptune = { version = "~6.2.0", features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "~6.2.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } num_cpus = "1.10.1" hex = "0.4.2" bincode = "1.1.2" diff --git a/storage-proofs-porep/src/stacked/vanilla/proof.rs b/storage-proofs-porep/src/stacked/vanilla/proof.rs index 33749d891..dd64fa085 100644 --- a/storage-proofs-porep/src/stacked/vanilla/proof.rs +++ b/storage-proofs-porep/src/stacked/vanilla/proof.rs @@ -638,7 +638,7 @@ impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> StackedDrg<'a, Tr None } }; - let mut column_tree_builder = ColumnTreeBuilder::::new( + let mut column_tree_builder = ColumnTreeBuilder::::new( column_batcher, tree_batcher, nodes_count, @@ -1083,7 +1083,7 @@ impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> StackedDrg<'a, Tr None } }; - let mut tree_builder = TreeBuilder::::new( + let mut tree_builder = TreeBuilder::::new( batcher, nodes_count, tree_r_last_config.rows_to_discard, @@ -1543,7 +1543,7 @@ impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> StackedDrg<'a, Tr None } }; - let mut tree_builder = TreeBuilder::::new( + let mut tree_builder = TreeBuilder::::new( batcher, nodes_count, tree_r_last_config.rows_to_discard, diff --git a/storage-proofs-update/Cargo.toml b/storage-proofs-update/Cargo.toml index a419f4758..1bc5d33e5 100644 --- a/storage-proofs-update/Cargo.toml +++ b/storage-proofs-update/Cargo.toml @@ -21,7 +21,7 @@ blstrs = "0.5.0" log = "0.4.7" generic-array = "0.14.4" anyhow = "1.0.23" -neptune = { version = "~6.2.0", features = ["arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "~6.2.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } lazy_static = "1.2" fr32 = { path = "../fr32", version = "~4.0.0", default-features = false } memmap = "0.7" From 2f122a37324570d1acd76bcffcd102c372b61126 Mon Sep 17 00:00:00 2001 From: nemo Date: Tue, 21 Jun 2022 09:07:01 -0400 Subject: [PATCH 08/11] feat: update merkletree to latest release --- fil-proofs-tooling/Cargo.toml | 2 +- filecoin-hashers/Cargo.toml | 2 +- filecoin-proofs/Cargo.toml | 2 +- storage-proofs-core/Cargo.toml | 2 +- storage-proofs-porep/Cargo.toml | 2 +- storage-proofs-update/Cargo.toml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fil-proofs-tooling/Cargo.toml b/fil-proofs-tooling/Cargo.toml index f44f7003f..1a676835c 100644 --- a/fil-proofs-tooling/Cargo.toml +++ b/fil-proofs-tooling/Cargo.toml @@ -32,7 +32,7 @@ async-std = "1.6" blake2s_simd = "1.0.0" fil_logger = "0.1.6" log = "0.4.8" -merkletree = "0.21.0" +merkletree = "0.22.0" bincode = "1.1.2" anyhow = "1.0.23" rand_xorshift = "0.3.0" diff --git a/filecoin-hashers/Cargo.toml b/filecoin-hashers/Cargo.toml index 18e516279..ef5703ee5 100644 --- a/filecoin-hashers/Cargo.toml +++ b/filecoin-hashers/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" bellperson = "0.22.0" blstrs = "0.5.0" generic-array = "0.14.4" -merkletree = "0.21.0" +merkletree = "0.22.0" ff = "0.12.0" anyhow = "1.0.34" serde = "1.0.117" diff --git a/filecoin-proofs/Cargo.toml b/filecoin-proofs/Cargo.toml index a283b3d35..4a9249001 100644 --- a/filecoin-proofs/Cargo.toml +++ b/filecoin-proofs/Cargo.toml @@ -24,7 +24,7 @@ bellperson = "0.22.0" log = "0.4.7" rayon = "1.1.0" hex = "0.4.0" -merkletree = "0.21.0" +merkletree = "0.22.0" bincode = "1.1.2" anyhow = "1.0.23" sha2 = "0.10.2" diff --git a/storage-proofs-core/Cargo.toml b/storage-proofs-core/Cargo.toml index 6d83a2fe1..42a2e3aea 100644 --- a/storage-proofs-core/Cargo.toml +++ b/storage-proofs-core/Cargo.toml @@ -14,7 +14,7 @@ bench = false [dependencies] filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["sha256", "poseidon"] } rand = "0.8" -merkletree = "0.21.0" +merkletree = "0.22.0" byteorder = "1" config = { version = "0.12.0", default-features = false, features = ["toml"] } itertools = "0.10.3" diff --git a/storage-proofs-porep/Cargo.toml b/storage-proofs-porep/Cargo.toml index 017c308c1..06fa1cc4e 100644 --- a/storage-proofs-porep/Cargo.toml +++ b/storage-proofs-porep/Cargo.toml @@ -13,7 +13,7 @@ crossbeam = "0.8" storage-proofs-core = { path = "../storage-proofs-core", version = "~11.0.0", default-features = false} sha2raw = { path = "../sha2raw", version = "~6.0.0"} filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["poseidon", "sha256"]} -merkletree = "0.21.0" +merkletree = "0.22.0" mapr = "0.8.0" num-bigint = "0.4.3" num-traits = "0.2" diff --git a/storage-proofs-update/Cargo.toml b/storage-proofs-update/Cargo.toml index 1bc5d33e5..678e9e5e4 100644 --- a/storage-proofs-update/Cargo.toml +++ b/storage-proofs-update/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" storage-proofs-core = { path = "../storage-proofs-core", version = "~11.0.0", default-features = false} storage-proofs-porep = { path = "../storage-proofs-porep", version = "~11.0.0", default-features = false} filecoin-hashers = { path = "../filecoin-hashers", version = "~6.0.0", default-features = false, features = ["poseidon", "sha256"]} -merkletree = "0.21.0" +merkletree = "0.22.0" rayon = "1.0.0" serde = { version = "1.0", features = ["derive"]} ff = "0.12.0" From 6709a16dc6e8d4bd6076dfbd4380fd3b7a5aa1da Mon Sep 17 00:00:00 2001 From: nemo Date: Mon, 13 Jun 2022 16:16:27 -0400 Subject: [PATCH 09/11] docs: update changelog for release --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b299a762..4dc38a9e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://book.async.rs/overview ## Unreleased +## [11.1.0] - 2022-06-13 + +- Updates for aggregate proof versioning support [#1612](https://github.com/filecoin-project/rust-fil-proofs/pull/1612) + ## [11.0.2] - 2022-02-09 - Fix cache clearing by resetting the cache path first [#1563](https://github.com/filecoin-project/rust-fil-proofs/pull/1563) @@ -316,7 +320,8 @@ mainnet ready and will be replaced in a future version. This release is intende - Initial stable release -[Unreleased]: https://github.com/filecoin-project/rust-fil-proofs/compare/v11.0.2...HEAD +[Unreleased]: https://github.com/filecoin-project/rust-fil-proofs/compare/v11.1.0...HEAD +[11.1.0]: https://github.com/filecoin-project/rust-fil-proofs/tree/releases/v11.1.0 [11.0.2]: https://github.com/filecoin-project/rust-fil-proofs/tree/releases/v11.0.2 [11.0.1]: https://github.com/filecoin-project/rust-fil-proofs/tree/releases/v11.0.1 [11.0.0]: https://github.com/filecoin-project/rust-fil-proofs/tree/releases/v11.0.0 From 271aa182a7cc62fc5ec39541c0d354575aaea919 Mon Sep 17 00:00:00 2001 From: nemo Date: Wed, 15 Jun 2022 13:23:53 -0400 Subject: [PATCH 10/11] docs: update changelog for release --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dc38a9e1..0c4635e09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://book.async.rs/overview ## Unreleased +## [11.1.1] - 2022-06-15 + +- Lock versions to the correct minor number [#1614](https://github.com/filecoin-project/rust-fil-proofs/pull/1614) + ## [11.1.0] - 2022-06-13 - Updates for aggregate proof versioning support [#1612](https://github.com/filecoin-project/rust-fil-proofs/pull/1612) @@ -320,7 +324,8 @@ mainnet ready and will be replaced in a future version. This release is intende - Initial stable release -[Unreleased]: https://github.com/filecoin-project/rust-fil-proofs/compare/v11.1.0...HEAD +[Unreleased]: https://github.com/filecoin-project/rust-fil-proofs/compare/v11.1.1...HEAD +[11.1.1]: https://github.com/filecoin-project/rust-fil-proofs/tree/releases/v11.1.1 [11.1.0]: https://github.com/filecoin-project/rust-fil-proofs/tree/releases/v11.1.0 [11.0.2]: https://github.com/filecoin-project/rust-fil-proofs/tree/releases/v11.0.2 [11.0.1]: https://github.com/filecoin-project/rust-fil-proofs/tree/releases/v11.0.1 From 0b54fe7d1658552d2a8e3ce295b5a1fe326d09a2 Mon Sep 17 00:00:00 2001 From: nemo Date: Thu, 21 Jul 2022 15:43:02 -0400 Subject: [PATCH 11/11] feat: update neptune to the latest release --- Cargo.toml | 3 --- filecoin-hashers/Cargo.toml | 2 +- storage-proofs-porep/Cargo.toml | 2 +- storage-proofs-update/Cargo.toml | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5393f1a81..0ae193df9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,3 @@ members = [ "filecoin-hashers", "storage-proofs-update", ] - -[patch.crates-io] -neptune = { git = "https://github.com/filecoin-project/neptune" } diff --git a/filecoin-hashers/Cargo.toml b/filecoin-hashers/Cargo.toml index ef5703ee5..638b710f7 100644 --- a/filecoin-hashers/Cargo.toml +++ b/filecoin-hashers/Cargo.toml @@ -18,7 +18,7 @@ anyhow = "1.0.34" serde = "1.0.117" rand = "0.8.0" -neptune = { version = "~6.2.0", optional = true, features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "~7.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/storage-proofs-porep/Cargo.toml b/storage-proofs-porep/Cargo.toml index 06fa1cc4e..17294041b 100644 --- a/storage-proofs-porep/Cargo.toml +++ b/storage-proofs-porep/Cargo.toml @@ -26,7 +26,7 @@ log = "0.4.7" pretty_assertions = "1.2.0" generic-array = "0.14.4" anyhow = "1.0.23" -neptune = { version = "~6.2.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "~7.0.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } num_cpus = "1.10.1" hex = "0.4.2" bincode = "1.1.2" diff --git a/storage-proofs-update/Cargo.toml b/storage-proofs-update/Cargo.toml index 678e9e5e4..d0397cf44 100644 --- a/storage-proofs-update/Cargo.toml +++ b/storage-proofs-update/Cargo.toml @@ -21,7 +21,7 @@ blstrs = "0.5.0" log = "0.4.7" generic-array = "0.14.4" anyhow = "1.0.23" -neptune = { version = "~6.2.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } +neptune = { version = "~7.0.0", features = ["bls", "arity2", "arity4", "arity8", "arity11", "arity16", "arity24", "arity36"] } lazy_static = "1.2" fr32 = { path = "../fr32", version = "~4.0.0", default-features = false } memmap = "0.7"