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

Fixed V3a Backend #297

Merged
merged 5 commits into from
Jul 26, 2024
Merged

Fixed V3a Backend #297

merged 5 commits into from
Jul 26, 2024

Conversation

sifnoc
Copy link
Member

@sifnoc sifnoc commented Jul 11, 2024

Major Changes in V3 backend.

  • Replaced the SRS file from hermez-raw-# to hyperponk-srs-#, which is generated for the HyperPlonk Backend.
  • Verifier parameters are now required in the process of verifying the proof instead of the 'verifying_key'.
  • The Round interface in the Backend has been changed.
  • The Summa Contract has been removed due to the absence of a Solidity verifier for proofs generated by the HyperPlonk backend.
  • The GH Action Workflow no longer requires an AWS instance for testing.

@sifnoc sifnoc force-pushed the v3a-fix-backend branch from 0a1deb2 to 2d878e4 Compare July 20, 2024 13:22
@sifnoc sifnoc marked this pull request as ready for review July 22, 2024 08:15
@sifnoc sifnoc requested a review from alxkzmn July 22, 2024 08:16
@sifnoc sifnoc mentioned this pull request Jul 23, 2024
Copy link
Contributor

@alxkzmn alxkzmn left a comment

Choose a reason for hiding this comment

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

LGTM!


### 4. Verify Proof of Inclusion
Note that the `verifier_params.json` file can be used in any other round unless the same circuit configurations, such as `N_CURRENCIES` and `K`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mean that it can be re-used if N_CURRENCIES and K didn't change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, exactly!

@@ -112,6 +112,13 @@ pub mod summa_hyperplonk {
grand_total,
}
}

pub fn init_empty() -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this method used anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing that out! I almost forgot to update its usage:

// Users can generate verifier parameters using only the configurations for "N_CURRENCIES" and "N_USERS", along with the SRS.
let dummy_circuit = SummaHyperplonk::<N_USERS, N_CURRENCIES>::init_empty();
let (circuit_info, _) = circuit_fn(num_vars as usize, dummy_circuit);
let param = ProvingBackend::setup_custom("../backend/ptau/hyperplonk-srs-17").unwrap();
let (_, verifier_params) = ProvingBackend::preprocess(&param, &circuit_info).unwrap();

This is how it can be used.

@sifnoc sifnoc merged commit cf179ed into v3a Jul 26, 2024
6 checks passed
@sifnoc sifnoc deleted the v3a-fix-backend branch July 26, 2024 08:58
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.

2 participants