Function filecoin_proofs_api::seal::seal_pre_commit_phase1
source · pub fn seal_pre_commit_phase1<R, S, T>(
registered_proof: RegisteredSealProof,
cache_path: R,
in_path: S,
out_path: T,
prover_id: ProverId,
sector_id: SectorId,
ticket: Ticket,
piece_infos: &[PieceInfo],
) -> Result<SealPreCommitPhase1Output>
Expand description
First step in sector sealing process. Called before seal_pre_commit_phase2
.
Reads unsealed data from in_path
, generates sealed data and writes to out_path
.
§Arguments
registered_proof
- Seal proof to generate.cache_path
- Directory path to use for generation of Merkle tree on disk.in_path
- File path of the input sector file to perform the seal operation on.out_path
- File path to write the resultant sealed sector to.prover_id
- Unique ID of the storage provider.sector_id
- ID of the sector, usually relative to the miner.ticket
- The ticket used to generate this sector’s replica-id. For Filecoin this randomness drawn from the Filecoin blockchain’s verifiable random function (VRF), which generates tickets with each new block.piece_infos
- The piece info (commitment and byte length) for each piece in the sector.
Returns Merkle tree labels and commitment for use by seal_pre_commit_phase2
.