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

V3 benchmarks #291

Merged
merged 6 commits into from
May 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'v3' into v3-benchmarks
alxkzmn committed May 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 97c941f30ae05a59b3be1227f8e20238a3681c8f
46 changes: 41 additions & 5 deletions prover/src/circuits/tests.rs
Original file line number Diff line number Diff line change
@@ -84,21 +84,57 @@ fn test_summa_hyperplonk() {
};
assert_eq!(result, Ok(()));

let wrong_instances = instances[0]
let invalid_grand_total_instances = instances[0]
.iter()
.map(|instance| *instance + Fp::ONE)
.enumerate()
.map(|(i, element)| {
if i == 0 {
*element
} else {
Fp::random(seeded_std_rng())
}
})
.collect::<Vec<_>>();
let wrong_result = {

let invalid_result = {
let mut transcript = Keccak256Transcript::from_proof((), proof.as_slice());
ProvingBackend::verify(
&verifier_parameters,
&[invalid_grand_total_instances],
&mut transcript,
seeded_std_rng(),
)
};
assert_eq!(
invalid_result,
Err(InvalidSumcheck(
"Consistency failure at round 1".to_string()
))
);

let invalid_range_check_instances = instances[0]
.iter()
.enumerate()
.map(|(i, element)| {
if i == 0 {
Fp::random(seeded_std_rng())
} else {
*element
}
})
.collect::<Vec<_>>();

let invalid_result = {
let mut transcript = Keccak256Transcript::from_proof((), proof.as_slice());
ProvingBackend::verify(
&verifier_parameters,
&[wrong_instances],
&[invalid_range_check_instances],
&mut transcript,
seeded_std_rng(),
)
};
assert_eq!(
wrong_result,
invalid_result,
Err(InvalidSumcheck(
"Consistency failure at round 1".to_string()
))
You are viewing a condensed version of this merge commit. You can view the full changes here.