Computes a NUL-byte prefix and/or suffix for source
using the provided
piece_lengths
and piece_size
(such that the source
, after
preprocessing, will occupy a subtree of a merkle tree built using the bytes
from target
), runs the resultant byte stream through the preprocessor,
and writes the result to target
. Returns a tuple containing the number of
bytes written to target
(source
plus alignment) and the commitment.
Given a porep_config and a list of seal commit outputs, this method aggregates
those proofs (naively padding the count if necessary up to a power of 2) and
returns the aggregate proof bytes.
Computes a sectors’s comm_d
given its pieces.
Reverses the encoding process and outputs the data into out_data_path.
Decodes a range of data with the given sector key.
Encodes data into an existing replica. The original replica is
not modified and the resulting output data is written as
new_replica_path (with required artifacts located in
new_cache_path).
Generates the challenges per SectorId required for either a Window
proof-of-spacetime or a Winning proof-of-spacetime.
Generate all vanilla partition proofs across all partitions.
Generates a piece commitment for the provided byte source. Returns an error
if the byte source produced more than piece_size
bytes.
Generate a single vanilla partition proof for a specified partition.
Generates a single vanilla proof required for either Window proof-of-spacetime
or Winning proof-of-spacetime.
Generates a Window proof-of-spacetime with provided vanilla proofs of a single partition.
Generate the merkle tree on top of the labels (TreeC).
Generate the merkle tree on top of the replica (TreeRLast).
Generates a Window proof-of-spacetime.
Generates a Window proof-of-spacetime with provided vanilla proofs.
Generates a Winning proof-of-spacetime.
Given some randomness and the length of available sectors, generates the challenged sector.
Generates a Winning proof-of-spacetime with provided vanilla proofs.
Given the specified arguments, this method returns the inputs that were used to
generate the seal proof. This can be useful for proof aggregation, as verification
requires these inputs.
Given the specified arguments, this method returns the inputs that were used to
generate the sector update proof. This can be useful for proof aggregation, as verification
requires these inputs.
Unseals the sector at sealed_path
and returns the bytes for a piece
whose first (unpadded) byte begins at offset
and ends at offset
plus
num_bytes
, inclusive. Note that the entire sector is unsealed each time
this function is called.
Removes encoded data and outputs the sector key.
This new API is added and made public specifically for generating
NonInteractive PoRep proofs that will later be aggregated using
the existing aggregate_seal_commit_proofs
method. It is also
used internally outside of the NonInteractivePoRep use-case to
avoid code duplication.
Unseals the sector read from sealed_sector
and returns the bytes for a
piece whose first (unpadded) byte begins at offset
and ends at offset
plus num_bytes
, inclusive. Note that the entire sector is unsealed each
time this function is called.
Unseals the sector read from sealed_sector
and returns the bytes for a
piece whose first (unpadded) byte begins at offset
and ends at offset
plus num_bytes
, inclusive. Note that the entire sector is unsealed each
time this function is called.
Given a porep_config, an aggregate proof, a list of seeds and a combined and flattened list
of public inputs, this method verifies the aggregate seal proof.
Verifies a batch of outputs of some previously-run seal operations.
Verify all vanilla partition proofs across all partitions.
Verifies the output of some previously-run seal operation.
Verify a single vanilla partition proof for a specified partition.
Verifies a window proof-of-spacetime.
Verifies a winning proof-of-spacetime.
Writes bytes from source
to target
, adding bit-padding (“preprocessing”)
as needed. Returns a tuple containing the number of bytes written to
target
and the commitment.