Skip to content

Commit

Permalink
feat: only test snarkpack v2 in api version 1.2.x
Browse files Browse the repository at this point in the history
fix: apply review feedback
  • Loading branch information
cryptonemo committed Oct 1, 2024
1 parent 666f33a commit 8c82df7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 10 additions & 4 deletions filecoin-proofs/tests/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,10 +943,16 @@ fn aggregate_seal_proofs<Tree: 'static + MerkleTreeTrait>(
let mut prover_id = [0u8; 32];
prover_id.copy_from_slice(AsRef::<[u8]>::as_ref(&prover_fr));

let aggregate_versions = vec![
groth16::aggregate::AggregateVersion::V1,
groth16::aggregate::AggregateVersion::V2,
];
// Note that ApiVersion 1.2.0 only supports SnarkPack v2, so only
// allow that testing here.
let aggregate_versions = match porep_config.api_version {
ApiVersion::V1_2_0 => vec![groth16::aggregate::AggregateVersion::V2],
ApiVersion::V1_1_0 => vec![
groth16::aggregate::AggregateVersion::V1,
groth16::aggregate::AggregateVersion::V2,
],
ApiVersion::V1_0_0 => vec![groth16::aggregate::AggregateVersion::V1],
};
info!(
"Aggregating {} seal proof with ApiVersion {}, Features {:?}, and PoRep ID {:?}",
num_proofs_to_aggregate,
Expand Down
4 changes: 3 additions & 1 deletion storage-proofs-porep/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ use storage_proofs_porep::stacked::{PersistentAux, PublicParams, StackedDrg, Tau

// This method should ONLY be used in purposed test code.
#[allow(dead_code)]
pub fn remove_replica_and_tree_r<Tree: MerkleTreeTrait + 'static>(cache_path: &Path) -> Result<()> {
pub(crate) fn remove_replica_and_tree_r<Tree: MerkleTreeTrait + 'static>(
cache_path: &Path,
) -> Result<()> {
let replica_path = cache_path.join("replica-path");
let tree_r_last_config = StoreConfig {
path: cache_path.to_path_buf(),
Expand Down

0 comments on commit 8c82df7

Please sign in to comment.