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

fix: use production parameter parent caches #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vmx
Copy link
Contributor

@vmx vmx commented Aug 21, 2023

In the C++ demo, the parent cache files didn't point to the parent caches
that match the production parameters (they depend on the PoRep ID).
Note that for 16KiB sectors, it isn't specified, hence I left the current value.

In the C++ demo, the parent cache files didn't point to the parent caches
that match the production parameters. Note that for 16KiB sectors,
it's not specified, hence I left the current value.
@sandsentinel
Copy link
Collaborator

Where can we obtain these new caches?

they depend on the PoRep ID

Is there a specific PoRep ID that we must use if we use these?

@vmx
Copy link
Contributor Author

vmx commented Aug 22, 2023

Where can we obtain these new caches?

You generate them. Usually when using the Filecoin proofs they are automatically generated if they don't exist yet. But you can also generate them with the gen_graph_cache tool. By default they are generated in /var/tmp/filecoin-parents, but you can change the output directory via the FIL_PROOFS_PARENT_CACHE env variable:

FIL_PROOFS_PARENT_CACHE=/dir/to/create/files/in cargo run --release --bin gen_graph_cache

There is also a list of the expected parameters checked in at https://github.com/filecoin-project/rust-fil-proofs/blob/2ec0a0fe4005a6f2f6659bbbc167a1d41ee855e0/storage-proofs-porep/parent_cache.json.

Is there a specific PoRep ID that we must use if we use these?

No, you only need to use the correct PoRep ID to generate them. The usage is independent of the PoRep ID. You can get the PoRep ID that corresponds to a certain proof version and sector size via RegisteredSealProof::porep_id().

@vmx
Copy link
Contributor Author

vmx commented Oct 5, 2023

With commit 199d8e2, only the 2KiB one is left to be updated.

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

Successfully merging this pull request may close these issues.

2 participants