-
Notifications
You must be signed in to change notification settings - Fork 317
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
Create binaries to run phases independently #1678
Comments
To be clear, Proofs is a library and will remain that way. Binaries would be an enhancement, using the library. |
Thanks for calling this out. I've changed the first paragraph to make this clearer. |
This would be an awesome feature to have - it would greatly help with benchmarking seperate stages and working on improvements. It would be very nice to have a way to validate that the result of the benchmark is correct, too. Not sure if that's inherently possible as we're skipping some steps though. Example would be; cargo run --bin benchy -- single-step -- ap --sectornumber 123 --size 512MiB --result /mnt/benchfiles # Generates "unsealed" sector file (/mnt/benchfiles/unsealed/123/)
cargo run --bin benchy -- single-step -- pc1 --sectornumber 123 --result /mnt/benchfiles # Uses the "unsealed" sector file from the AP step, generates the layer files in the "cache" folder (/mnt/benchfiles/cache/123/) (if i'm not mistaken, PC1 in lotus-worker stores it there too)
cargo run --bin benchy -- single-step -- pc2 --sectornumber 123 --result /mnt/benchfiles # Uses the layer files from the PC1 step, generates its files in the "cache" folder (/mnt/benchfiles/cache/123/) (if i'm not mistaken, PC2 in lotus-worker stores it there) and so on for C1 / C2 |
@vmx It is recommended to support the following functional requirements:
|
Those are probably out of scope. The idea is to have binaries, so that you can build those tools on-top of it. You could create your own runners that do exactly the testing that you need.
Yes, ideally it should be possible to run just a certain step on the data you already have. |
Some of the requirements re-formulated as user stories: As a storage provider I'd like to
If anyone has more, please share them here. |
Yes! :) Clear documentation (or examples) on how to run the various parts, what data they need & generate, how to pass this data through etc. In here also the supranational updates would be easier to implement |
Description
Currently the Filecoin proofs are consumed by Lotus via the FFI as single library. In addition to the library use case, the idea is to provide separate binaries for each phases (or perhaps even more fine-grained, but as a start the phases should be fine). This would serve several needs that occurred in the past:
pc2
binary on the same input data and compare the results.Acceptance criteria
There are binaries that could be run in sequence the do the full lifecycle of sealing and unsealing a sector.
Risks + pitfalls
It may lead to refactorings in case the current internal APIs do not fit. Though I see it as a good thing as the APIs should already be flexible enough to make this working.
Where to begin
benchy does already partly support running certain phases only. But it's not that flexible and has known issues.
The text was updated successfully, but these errors were encountered: