-
Notifications
You must be signed in to change notification settings - Fork 316
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
Proof aggregation api #1395
Proof aggregation api #1395
Conversation
Not ready yet, but somewhat presentable at this point. |
c2a7298
to
9c23a6a
Compare
b8410f0
to
8208be6
Compare
TODO: When API is out of draft status, update FIP details filecoin-project/FIPs#72 |
I guess it won't work for 32Gb/64Gb sectors (yet), since the number of proofs can't be both multiples of 10 and power of 2. |
There are ways to address that -- the simplest of which is to pad by duplicating some proof a number of times to meet the pow2 requirement (which the tests do for now). Other options are being investigated. |
8208be6
to
38b2420
Compare
087eee1
to
38b2420
Compare
194f842
to
4b96992
Compare
SRS Publication to IPFS can now be done as follows:
SRS file download can now be done like this:
|
0a43459
to
6893b1d
Compare
e0746bf
to
4596099
Compare
filecoin-proofs/src/api/seal.rs
Outdated
); | ||
|
||
let num_inputs = commit_inputs.len(); | ||
let num_inputs_per_proof = num_inputs / aggregated_proofs_len; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this supposed to be fixed ? i.e. shouldn't we read that info from .. porep config or stg ?
What we want to do is twofold:
- ensure there are always X public inputs per proof -> this is different than checking there are X * Y public inputs (where Y is the number of proofs) in total
- ensure the number of proofs is a power of two, if it's not, we duplicate X public inputs as much as necessary
It feels 1. and 2. are mixed here, and 1. is checking the total number of public inputs rather than the number of public inputs per proofs. Hence the 2. check can be "biased".
In memory caching of srs prover and verifier keys (per aggregated proof count) is now separate (instead of always keeping the pair together). |
5e0bae5
to
36b3d91
Compare
Rebased against master Note: sha2raw tests are not building |
36b3d91
to
766dfc5
Compare
filecoin-proofs/src/api/seal.rs
Outdated
&commit_output.proof[..], | ||
&verifying_key, | ||
) | ||
.expect("failed to construct multi proof from bytes") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not panic
fix: remove no longer needed seal_commit_phase2_for_aggregation method
Previously, both prover and verifier keys were cached together, but since access depends on the user/caller, it's beneficial to cache the mseparately in case both aren't needed in RAM
feat: re-use input padding code where needed
e5d5413
to
302fcf2
Compare
No description provided.