filecoin-project / rust-fil-proofs

Proofs for Filecoin in Rust
Other
489 stars 314 forks source link

Separate API call for C1 phase with pieces of the replica data only #1746

Open vmx opened 7 months ago

vmx commented 7 months ago

Description

Currently the C1 phase API call requires a path to the replica file. Challenges are generated and the corresponding Merkle paths are extracted from the replica together with its Merkle tree.

The idea is to create a new API call, that doesn't require the full replica file, but only the pieces that are needed for the Merkle paths. This means that the challenges can be generated externally (the process is deterministic) and the corresponding pieces of the replica file are extracted and then transmitted to the new API call.

The execution would be the same as for the normal C1 phase, the only difference is that the lowest level of the replica Merkle tree (the replica itself) isn't used, but a list of the data that resides at the corresponding challenges.

Acceptance criteria

There is a new API call that works.

Risks + pitfalls

This might need changes to the merkletree crate as it's abstraction of the Merkle Trees we use.

Where to begin