From 382ddcf6a728a91a95126c3b33e294490a8445a7 Mon Sep 17 00:00:00 2001 From: Konrad Stepniak Date: Tue, 5 Nov 2024 10:31:56 +0100 Subject: [PATCH] fix: prove_commit_block in pipeline.rs --- cli/polka-storage-provider/server/src/pipeline/mod.rs | 2 +- pallets/storage-provider/src/lib.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/polka-storage-provider/server/src/pipeline/mod.rs b/cli/polka-storage-provider/server/src/pipeline/mod.rs index 2ef5f36db..6f27f28c7 100644 --- a/cli/polka-storage-provider/server/src/pipeline/mod.rs +++ b/cli/polka-storage-provider/server/src/pipeline/mod.rs @@ -408,7 +408,7 @@ async fn prove_commit( let seed = draw_randomness( &digest, DomainSeparationTag::InteractiveSealChallengeSeed, - precommit_block, + prove_commit_block, &entropy, ); diff --git a/pallets/storage-provider/src/lib.rs b/pallets/storage-provider/src/lib.rs index 8bc9a11fd..09ffda3cd 100644 --- a/pallets/storage-provider/src/lib.rs +++ b/pallets/storage-provider/src/lib.rs @@ -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::::InvalidProof)?;