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

Proof aggregation api #1395

Merged
merged 28 commits into from
Jun 1, 2021
Merged

Proof aggregation api #1395

merged 28 commits into from
Jun 1, 2021

Conversation

cryptonemo
Copy link
Collaborator

No description provided.

@cryptonemo
Copy link
Collaborator Author

Not ready yet, but somewhat presentable at this point.

@cryptonemo cryptonemo force-pushed the feat-aggregation branch 2 times, most recently from b8410f0 to 8208be6 Compare February 15, 2021 17:22
@cryptonemo
Copy link
Collaborator Author

TODO: When API is out of draft status, update FIP details filecoin-project/FIPs#72

@ozhtdong
Copy link

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.

@cryptonemo
Copy link
Collaborator Author

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.

@cryptonemo
Copy link
Collaborator Author

SRS Publication to IPFS can now be done as follows:

cargo run --release --bin srspublish -- --ipfs-bin `which ipfs`

SRS file download can now be done like this:

cargo run --release --bin paramfetch -- -j srs-inner-product.json

@cryptonemo cryptonemo force-pushed the feat-aggregation branch 3 times, most recently from 0a43459 to 6893b1d Compare March 10, 2021 16:54
@cryptonemo cryptonemo force-pushed the feat-aggregation branch 2 times, most recently from e0746bf to 4596099 Compare March 23, 2021 20:09
);

let num_inputs = commit_inputs.len();
let num_inputs_per_proof = num_inputs / aggregated_proofs_len;
Copy link

@nikkolasg nikkolasg Mar 29, 2021

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:

  1. 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
  2. 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".

@cryptonemo
Copy link
Collaborator Author

In memory caching of srs prover and verifier keys (per aggregated proof count) is now separate (instead of always keeping the pair together).

@cryptonemo
Copy link
Collaborator Author

Rebased against master

Note: sha2raw tests are not building

@cryptonemo cryptonemo marked this pull request as ready for review April 6, 2021 19:42
&commit_output.proof[..],
&verifying_key,
)
.expect("failed to construct multi proof from bytes")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not panic

@cryptonemo cryptonemo merged commit fb4efcf into master Jun 1, 2021
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.

4 participants