Skip to content

feat: make shplemini proof constant - #8826

Merged
maramihali merged 35 commits into
masterfrom
mm/shplemini-constant-proofs
Sep 26, 2024
Merged

maramihali merged 35 commits into
masterfrom
mm/shplemini-constant-proofs

Conversation

@maramihali

@maramihali maramihali commented Sep 26, 2024 •

Copy link
Copy Markdown

Make Shplemini proofs constant using the same approach as in other places, add relevant github issues for handling the dummy rounds properly, make the shplemini recursion test do full verification and ensure recursive shplemini verifiers actually stay constant.

maramihali added 30 commits September 18, 2024 10:48
@maramihali maramihali self-assigned this Sep 26, 2024
@maramihali maramihali added the crypto cryptography label Sep 26, 2024
@maramihali
maramihali marked this pull request as ready for review September 26, 2024 15:21
@github-actions

github-actions Bot commented Sep 26, 2024 •

Copy link
Copy Markdown
Contributor

Changes to circuit sizes

Generated at commit: 2a553922e9a27da82903b72caeba6f6a9a5b7a36, compared to commit: 951ce6d974504f0453ad2816d10c358d8ef02ce5

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
parity_root 0 ➖ 0.00% +112 ❌ +0.00%
rollup_block_root 0 ➖ 0.00% +84 ❌ +0.00%
rollup_block_root_final 0 ➖ 0.00% +84 ❌ +0.00%
rollup_merge 0 ➖ 0.00% +56 ❌ +0.00%
rollup_root 0 ➖ 0.00% +56 ❌ +0.00%
rollup_block_merge 0 ➖ 0.00% +56 ❌ +0.00%
public_kernel_merge 0 ➖ 0.00% +28 ❌ +0.00%
public_kernel_tail 0 ➖ 0.00% +28 ❌ +0.00%
rollup_base 0 ➖ 0.00% +28 ❌ +0.00%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
parity_root 2,114 (0) 0.00% 5,486,736 (+112) +0.00%
rollup_block_root 1,966 (0) 0.00% 4,121,162 (+84) +0.00%
rollup_block_root_final 1,966 (0) 0.00% 4,121,162 (+84) +0.00%
rollup_merge 1,483 (0) 0.00% 2,751,436 (+56) +0.00%
rollup_root 18,774 (0) 0.00% 2,787,591 (+56) +0.00%
rollup_block_merge 18,790 (0) 0.00% 2,787,623 (+56) +0.00%
public_kernel_merge 53,488 (0) 0.00% 1,535,245 (+28) +0.00%
public_kernel_tail 259,172 (0) 0.00% 2,699,168 (+28) +0.00%
rollup_base 423,026 (0) 0.00% 3,734,646 (+28) +0.00%

// Get evaluations a_i, i = 0,...,m-1 from transcript
const std::vector<Fr> evaluations = get_gemini_evaluations(num_variables, transcript);
// Compute evaluation A₀(r)
// Compute evaluation of A₀(r)

ghost Sep 26, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

without of, cause r is the eval point

// Get uₗ₋₁
const Fr& u = evaluation_point[l - 1];
const Fr& eval_neg = evals[l - 1];
// Fr batched_eval_round_acc = batched_eval_accumulator;

ghost Sep 26, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove commented out line

Commitment::one(&builder),
stdlib_verifier_transcript);
auto vk = std::make_shared<VerifierCommitmentKey<NativeCurve>>();
EXPECT_EQ(vk->pairing_check(pairing_points[0].get_value(), pairing_points[1].get_value()), true);

ghost Sep 26, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

great that you extended this test to capture the constant size

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. I'd like to see a more detailed explanation of the insecurity in creating the dummy values.

@maramihali
maramihali enabled auto-merge (squash) September 26, 2024 16:33
@maramihali
maramihali merged commit c8cbc33 into master Sep 26, 2024
@maramihali
maramihali deleted the mm/shplemini-constant-proofs branch September 26, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crypto cryptography

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants