Module filecoin_proofs::pieces [−][src]
Structs
Functions
Given an enumeration of pieces in a staged sector and a piece to be added (represented by a Read and corresponding length, in UnpaddedBytesAmount) to the staged sector, produce a new Read and UnpaddedBytesAmount pair which includes the appropriate amount of alignment bytes for the piece to be written to the target staged sector.
Given a number of bytes already written to a staged sector (ignoring bit padding) and a number of bytes (before bit padding) to be added, return the alignment required to create a piece where len(piece) == len(sector size)/(2^n) and sufficient left padding to ensure simple merkle proof construction.
Given a list of pieces, find the byte where a given piece does or would start.
Given a list of pieces, sum the number of bytes taken by those pieces in that order.
Verify that the provided piece_infos
and comm_d
match.
Create a padding PieceInfo
of size size
.