Skip to content

Commit

Permalink
fix: more sector logging (#1610)
Browse files Browse the repository at this point in the history
Sometimes it's unclear from which sector an error originates from,
hence include the sector ID in the log messages.
  • Loading branch information
vmx authored Aug 3, 2022
1 parent 82afead commit 9660e22
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions storage-proofs-post/src/fallback/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,10 @@ pub fn vanilla_proof<Tree: MerkleTreeTrait>(
let rows_to_discard = default_rows_to_discard(tree_leafs, Tree::Arity::to_usize());

trace!(
"Generating proof for tree leafs {} and arity {}",
"Generating proof for tree leafs {} and arity {} for sector {}",
tree_leafs,
Tree::Arity::to_usize(),
sector_id,
);

let inclusion_proofs = (0..challenges.len())
Expand Down Expand Up @@ -385,9 +386,10 @@ impl<'a, Tree: 'a + MerkleTreeTrait> ProofScheme<'a> for FallbackPoSt<'a, Tree>
default_rows_to_discard(tree_leafs, Tree::Arity::to_usize());

trace!(
"Generating proof for tree leafs {} and arity {}",
"Generating proof for tree leafs {} and arity {} for sector {}",
tree_leafs,
Tree::Arity::to_usize(),
sector_id,
);

// avoid rehashing fixed inputs
Expand Down Expand Up @@ -595,6 +597,8 @@ impl<'a, Tree: 'a + MerkleTreeTrait> ProofScheme<'a> for FallbackPoSt<'a, Tree>
let comm_c = sector_proof.comm_c;
let inclusion_proofs = &sector_proof.inclusion_proofs;

trace!("Verifying inclusion proofs for sector {}", sector_id);

// Verify that H(Comm_c || Comm_r_last) == Comm_R

// comm_r_last is the root of the proof
Expand Down

0 comments on commit 9660e22

Please sign in to comment.