-
Notifications
You must be signed in to change notification settings - Fork 315
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
Various improvements #1745
Merged
Merged
Various improvements #1745
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Include a graph of the workspace dependencies for clarity. Also add additional information to the `filecoin-proofs` crate in regards to the FFI.
Make `build_binary_tree()` private as it isn't used anywhere else.
Move information about the settings to the settings object in core. This way the `use_gpu_tree_builder` setting can easily be accessed without constructing a `StackedDrg`.
The layers for all supported sector sizes are either 2 or 11, but never 8: https://github.com/filecoin-project/rust-fil-proofs/blob/fcb22da26b2ac6ea6acafd1da41cc4f098ae332b/filecoin-proofs/src/constants.rs#L108-L124 Hence it's save to remove this case.
Currently almost everything from the cache implementation is public, although that's not really needed. With having less things public, it's easier to reason about, where the entry points are and which parts are implementation details.
The `EmptySectorUpdate::encode_into()` function doesn't use the `new_cache_path` and `sector_key_cachce_path` for anything, other than checking that they are directories. Those checks are moved to the caller instead. BREAKING CHANGE: EmptySectorUpdate::encode_into() now takes one less arguments.
The `encode_into()` function takes a `PoRepConfig` and immediately converts it into a `SectorUpdateConfig`. It's a better and more consistent with existing APIs (e.g. the `decode_from()`) to take a `SectorUpdateConfig` directly. BREAKING CHANGE: `encode_into()` not takes a `SectorUpdateConfig` instead of a `PoRepConfig`. In order to upgrade you can call let config = SectorUpdateConfig::from_porep_config(&porep_config); before calling `encode_into()`.
Re-export `AggregateVersion`: `bellperson`s `AggregateVersion` is part of the public API due to the `CompoundProof` trait. With re-exporting it, it's possible that downstream dependants like filecoin proofs API don't need to depend on `bellperson` directly, but can use this re-export instead. Re-export `filecoin_hashers::Hasher` trait: The `filecoin_hashers::Hasher` trait is needed a lot in downstream dependants when the domain of the Tree hasher needs to be accessed. Hence re-export it, so that those dependents don't need to depend directly on `filecoin_hashers` only due to this single trait.
cryptonemo
approved these changes
Jan 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a mix of smaller changes that I accumulated over the year. This PR should be reviewed on a commit by commit basis. I thought I bundle them in a single PR so that I don't have to rebase all of them all the time.
The review is not urgent, but I hope we can get all of those eventually merged.