Commit b2628d86 authored by 董子豪's avatar 董子豪

agg window post

parent 7138842d
......@@ -253,7 +253,7 @@ pub fn aggregate_window_post_proofs<Tree: 'static + MerkleTreeTrait>(
post_config: &PoStConfig,
randomnesses: &[ChallengeSeed],
commit_outputs: &[Vec<u8>],
partitions: usize,
total_sector_count: usize,
) -> Result<AggregateSnarkProof> {
info!("aggregate_window_post_proofs:start");
......@@ -262,7 +262,7 @@ pub fn aggregate_window_post_proofs<Tree: 'static + MerkleTreeTrait>(
"cannot aggregate with empty outputs"
);
// let partitions = get_partitions_for_window_post(total_sector_count, &post_config);
let partitions = get_partitions_for_window_post(total_sector_count, &post_config);
let verifying_key = get_post_verifying_key::<Tree>(&post_config)?;
let mut proofs: Vec<_> =
commit_outputs
......@@ -317,7 +317,6 @@ pub fn aggregate_window_post_proofs<Tree: 'static + MerkleTreeTrait>(
proofs.as_slice(),
)?;
let aggregate_window_post_proofs_time = start_time.elapsed().as_millis();
println!("aggregate proofs using {}", aggregate_window_post_proofs_time);
let mut aggregate_proof_bytes = Vec::new();
aggregate_proof.write(&mut aggregate_proof_bytes)?;
......@@ -408,7 +407,6 @@ pub fn verify_aggregate_window_post_proofs<Tree: 'static + MerkleTreeTrait>(
&aggregate_proof,
)?;
let verify_aggregate_proofs_time = start_time.elapsed().as_millis();
println!("$$ verify aggregate proofs using {}", verify_aggregate_proofs_time);
info!("end verifying aggregate proof");
info!("verify_aggregate_window_post_proofs:finish");
......@@ -416,7 +414,7 @@ pub fn verify_aggregate_window_post_proofs<Tree: 'static + MerkleTreeTrait>(
Ok(result)
}
fn get_window_post_inputs<Tree: 'static + MerkleTreeTrait>(
pub fn get_window_post_inputs<Tree: 'static + MerkleTreeTrait>(
post_config: &PoStConfig,
replicas: &BTreeMap<SectorId, PublicReplicaInfo>,
randomness: &ChallengeSeed,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment