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-Setup: Implement linking between phases, test integration with the rest of the codebase #2982

Merged
merged 12 commits into from
Sep 8, 2023

Conversation

cronokirby
Copy link
Contributor

Closes #2871.

This completes the internal setup ceremony code (sans some extra benchmarks we might want, and parallelizing the contribution and or verification).

This also changes our tool to generate proving and verifying keys to use the setup ceremony code to run a "ceremony" locally, involving 2 contributors, thus exercising this code path to generate the keys we use for proving and verifying, which should hopefully prevent any snafus from integrating the future output we expect to have.

The next step is testing this bit of code and actually fleshing out the
API.
The test just needs to pass, otherwise should be what we need.
We lift the abstraction layer one level up, only requiring circuits to
generate a version of themselves with dummy witnesses, and not the
entire parameters.
Also adjusts the size to the rounded up power of 2, reflecting what
actually happens.
These are still "backdoored", but now use the same code path as the
eventual decentralized setup.
This was an artifact from an earlier organizational idea.
@cronokirby cronokirby temporarily deployed to smoke-test September 8, 2023 05:46 — with GitHub Actions Inactive
@cronokirby cronokirby temporarily deployed to smoke-test September 8, 2023 15:43 — with GitHub Actions Inactive
@conorsch
Copy link
Contributor

conorsch commented Sep 8, 2023

We want this in for 60: @redshiftzero is reviewing, aiming to merge by EOD.

// I honestly don't know why this would fail.
// But if it does, it's not at runtime in a node.
cs.to_matrices()
.expect("can convert R1CS constraints into matrices")
Copy link
Member

Choose a reason for hiding this comment

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

I think this can only fail if you call to_matrices prior to constraint generation, but since you're calling it after constraint generation and then calling ConstraintSystemRef::finalize this should never happen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good api design

@redshiftzero redshiftzero merged commit 5bda246 into main Sep 8, 2023
8 checks passed
@redshiftzero redshiftzero deleted the 2871-phase-linking branch September 8, 2023 20:12
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.

Setup Ceremony: Implement phase connections and integrate with the rest of the codebase
3 participants