Skip to content

Commit

Permalink
fix: prove_commit_block in pipeline.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
th7nder committed Nov 5, 2024
1 parent f4b96ff commit b2c0171
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli/polka-storage-provider/server/src/pipeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ async fn prove_commit(
let seed = draw_randomness(
&digest,
DomainSeparationTag::InteractiveSealChallengeSeed,
precommit_block,
prove_commit_block,
&entropy,
);

Expand Down
3 changes: 3 additions & 0 deletions pallets/storage-provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,9 @@ pub mod pallet {
// Check if we are too early with the proof submit
let interactive_block_number =
precommit.pre_commit_block_number + T::PreCommitChallengeDelay::get();

// check out this interactive block number cause i'm confused
// would need to fetch it after pre-commit
if current_block_number < interactive_block_number {
log::error!(target: LOG_TARGET, "too early to prove sector: current_block_number: {current_block_number:?} < interactive_block_number: {interactive_block_number:?}");
return Err(Error::<T>::InvalidProof)?;
Expand Down

0 comments on commit b2c0171

Please sign in to comment.