Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vmx opened this issue Jan 31, 2024 · 0 comments
Open

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

vmx opened this issue Jan 31, 2024 · 0 comments

Comments

@vmx
Copy link
Contributor

vmx commented Jan 31, 2024

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

  • Check if the replica is part of the Merkle path generation directly in merkletree or if the replica offsets are already extracted separately
  • Depending on that, either implement it directly in rust-fil-proofs or modify merkletree to support such "sparse leafs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant