-
Notifications
You must be signed in to change notification settings - Fork 52
SNARK-friendly STM: Remove basic verifier #2845
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
base: main
Are you sure you want to change the base?
Conversation
Test Results 4 files ±0 169 suites - 3 23m 45s ⏱️ +18s Results for commit b9dcde2. ± Comparison against base commit b3772ac. This pull request removes 3 tests.♻️ This comment has been updated with latest results. |
bad4030 to
fef6ca4
Compare
fef6ca4 to
ab19294
Compare
| // BasicVerifier::preliminary_verify( | ||
| // &avk.get_total_stake(), | ||
| // &self.signatures, | ||
| // parameters, | ||
| // &msgp, | ||
| // ) | ||
| // .with_context(|| "Preliminary verification of aggregate signatures failed.")?; |
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.
You forgot to remove this one.
| // #[cfg(feature = "future_proof_system")] | ||
| // use anyhow::anyhow; | ||
|
|
||
| #[cfg(feature = "future_proof_system")] | ||
| use crate::AggregationError; | ||
| // #[cfg(feature = "future_proof_system")] | ||
| // use crate::AggregationError; |
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.
These ones also can be removed
| let mut removal_idx_by_vk: HashMap<&SingleSignatureWithRegisteredParty, Vec<Index>> = | ||
| HashMap::new(); | ||
|
|
||
| let avk = self.compute_aggregate_verification_key(); |
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.
The computation could be done externally so that we keep the function pure and easy to test.
Maybe you can create a function that does the deduplication and which is pure and call this function in the select_valid_signatures_for_k_indices.
Also is it possible to move the unit tests for deduplication in this module?
ab19294 to
b9dcde2
Compare
| @@ -1,5 +1,6 @@ | |||
| use anyhow::Context; | |||
| use anyhow::{Context, anyhow}; | |||
Check failure
Code scanning / cargo-doc
cannot determine resolution for the import Error
| @@ -1,5 +1,6 @@ | |||
| use anyhow::Context; | |||
| use anyhow::{Context, anyhow}; | |||
Check failure
Code scanning / cargo-doc
unresolved imports anyhow::Context, anyhow::anyhow, anyhow::anyhow Error
| @@ -1,5 +1,6 @@ | |||
| use anyhow::Context; | |||
| use anyhow::{Context, anyhow}; | |||
Check failure
Code scanning / cargo-doc
cannot determine resolution for the import Error
| @@ -1,5 +1,6 @@ | |||
| use anyhow::Context; | |||
| use anyhow::{Context, anyhow}; | |||
Check failure
Code scanning / cargo-doc
unresolved imports anyhow::Context, anyhow::anyhow, anyhow::anyhow Error
| ClosedKeyRegistration, Index, Parameters, Signer, SingleSignature, Stake, StmResult, | ||
| VerificationKey, proof_system::ConcatenationProof, | ||
| AggregationError, ClosedKeyRegistration, Index, Parameters, Signer, SingleSignature, | ||
| SingleSignatureWithRegisteredParty, Stake, StmResult, VerificationKey, |
Check failure
Code scanning / cargo-doc
the name AggregationError is defined multiple times Error
| ClosedKeyRegistration, Index, Parameters, Signer, SingleSignature, Stake, StmResult, | ||
| VerificationKey, proof_system::ConcatenationProof, | ||
| AggregationError, ClosedKeyRegistration, Index, Parameters, Signer, SingleSignature, | ||
| SingleSignatureWithRegisteredParty, Stake, StmResult, VerificationKey, |
Check warning
Code scanning / cargo-doc
unused import: AggregationError Warning
Content
This PR removes the intermediate
basic_verifierlayer. The actual functions handle its functionality.Pre-submit checklist
Comments
The
basic_verifierfunctionality can be accessed from the branch: curiecrypt/basic-verifier if it is needed in the future.Issue(s)
Relates to #2794