diff --git a/filecoin-proofs/src/api/post_util.rs b/filecoin-proofs/src/api/post_util.rs index 1c76fd96e5..146247f0da 100644 --- a/filecoin-proofs/src/api/post_util.rs +++ b/filecoin-proofs/src/api/post_util.rs @@ -6,10 +6,8 @@ use anyhow::{anyhow, ensure, Context, Result}; use bincode::deserialize; use filecoin_hashers::Hasher; use log::{info, trace}; -use storage_proofs_core::{ - cache_key::CacheKey, merkle::MerkleTreeTrait, proof::ProofScheme, sector::SectorId, -}; -use storage_proofs_post::fallback::{self, generate_leaf_challenge, FallbackPoSt, SectorProof}; +use storage_proofs_core::{cache_key::CacheKey, compound_proof::PubVanRsp, merkle::MerkleTreeTrait, sector::SectorId}; +use storage_proofs_post::fallback::{self, generate_leaf_challenge, SectorProof}; use crate::{ api::as_safe_commitment, @@ -288,10 +286,11 @@ pub fn partition_vanilla_proofs( info!("partition_vanilla_proofs:finish"); - ensure!( - FallbackPoSt::::verify_all_partitions(pub_params, pub_inputs, &partition_proofs)?, - "partitioned vanilla proofs failed to verify" - ); + /* After splitting partitions, all partitions cannot be checked */ + // ensure!( + // FallbackPoSt::::verify_all_partitions(pub_params, pub_inputs, &partition_proofs)?, + // "partitioned vanilla proofs failed to verify" + // ); Ok(partition_proofs) } @@ -308,3 +307,14 @@ pub(crate) fn get_partitions_for_window_post( None } } + +pub fn get_post_vanilla_params( + post_config: &PoStConfig, +) -> Result { + let rsp = PubVanRsp { + challengecount: post_config.challenge_count, + sectorcount: post_config.sector_count, + }; + + Ok(rsp) +} diff --git a/storage-proofs-core/src/compound_proof.rs b/storage-proofs-core/src/compound_proof.rs index 6532a835fb..4823a74360 100644 --- a/storage-proofs-core/src/compound_proof.rs +++ b/storage-proofs-core/src/compound_proof.rs @@ -16,6 +16,7 @@ use rand::{rngs::OsRng, RngCore}; use rayon::prelude::{ IndexedParallelIterator, IntoParallelIterator, IntoParallelRefIterator, ParallelIterator, }; +use serde::{Deserialize, Serialize}; use crate::{ error::Result, @@ -497,3 +498,9 @@ where Ok(res) } } + +#[derive(Serialize, Deserialize)] +pub struct PubVanRsp { + pub challengecount: usize, + pub sectorcount: usize, +}