Skip to content

Commit

Permalink
fix: use live sectors for proving partitions (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
th7nder authored Dec 12, 2024
1 parent 7af27a4 commit 47b0ff7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pallets/storage-provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ pub mod pallet {
.try_insert(
*partition_number,
primitives::pallets::PartitionState {
sectors: partition.sectors.clone(),
sectors: partition.live_sectors(),
},
)
.ok()?;
Expand Down
12 changes: 6 additions & 6 deletions storage-provider/server/src/pipeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ async fn find_sector_for_piece(
/// This function is *cancellation safe* as if future is dropped,
/// it can be dropped only when waiting for `spawn_blocking`.
/// When dropped when waiting, the sector state won't be preserved and adding piece can be retried.
#[tracing::instrument(skip_all, fields(piece_cid, deal_id))]
#[tracing::instrument(skip(state, deal, commitment))]
async fn add_piece(
state: Arc<PipelineState>,
piece_path: PathBuf,
Expand Down Expand Up @@ -311,7 +311,7 @@ async fn add_piece(
Ok(())
}

#[tracing::instrument(skip_all, fields(sector_number))]
#[tracing::instrument(skip(state))]
/// Creates a replica and calls pre-commit on-chain.
///
/// This method is *NOT CANCELLATION SAFE*.
Expand Down Expand Up @@ -446,7 +446,7 @@ async fn precommit(
Ok(())
}

#[tracing::instrument(skip_all, fields(sector_number))]
#[tracing::instrument(skip(state))]
async fn prove_commit(
state: Arc<PipelineState>,
sector_number: SectorNumber,
Expand Down Expand Up @@ -565,7 +565,7 @@ async fn prove_commit(
Ok(())
}

#[tracing::instrument(skip_all, fields(deadline_index))]
#[tracing::instrument(skip(state))]
async fn submit_windowed_post(
state: Arc<PipelineState>,
deadline_index: u64,
Expand All @@ -590,7 +590,7 @@ async fn submit_windowed_post(
.xt_client
.wait_for_height(deadline.start, true)
.await?;
tracing::info!("Waiting finished, let's go");
tracing::info!("Waiting finished (block: {}), let's go", deadline.start);

let Some(digest) = state
.xt_client
Expand Down Expand Up @@ -729,7 +729,7 @@ async fn schedule_posts(state: Arc<PipelineState>) -> Result<(), PipelineError>
Ok(())
}

#[tracing::instrument(skip_all, fields(deadline_index))]
#[tracing::instrument(skip(state))]
fn schedule_post(state: Arc<PipelineState>, deadline_index: u64) -> Result<(), PipelineError> {
state
.pipeline_sender
Expand Down

0 comments on commit 47b0ff7

Please sign in to comment.