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

Add KZGProof at G1_POINT_AT_INFINITY test cases #3507

Merged
merged 4 commits into from
Sep 19, 2023
Merged

Add KZGProof at G1_POINT_AT_INFINITY test cases #3507

merged 4 commits into from
Sep 19, 2023

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Sep 19, 2023

No description provided.

Copy link
Member

@jtraglia jtraglia left a comment

Choose a reason for hiding this comment

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

Good idea for this test case! Just some small nits.

commitment = spec.blob_to_kzg_commitment(blob)
proof = spec.G1_POINT_AT_INFINITY
assert not spec.verify_blob_kzg_proof(blob, commitment, proof)
yield 'verify_blob_kzg_proof_case_incorrect_proof_point_at_infinity', {
Copy link
Member

Choose a reason for hiding this comment

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

Minor nit. I think we should group this with the other "incorrect" tests. So move this test case below the verify_blob_kzg_proof_case_incorrect_proof test case.

tests/generators/kzg_4844/main.py Outdated Show resolved Hide resolved
tests/generators/kzg_4844/main.py Outdated Show resolved Hide resolved
tests/generators/kzg_4844/main.py Outdated Show resolved Hide resolved
Comment on lines 530 to 532
assert not spec.verify_blob_kzg_proof_batch([blob], [commitment], [proof])

yield 'verify_blob_kzg_proof_batch_case_incorrect_proof_point_at_infinity', {
Copy link
Member

Choose a reason for hiding this comment

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

Like the other one, I think this should be in the "incorrect" group of tests. So below the verify_blob_kzg_proof_batch_case_incorrect_proof_add_one test.

@jtraglia
Copy link
Member

Also, I can confirm that these tests pass in c-kzg-4844.

Copy link
Member

@jtraglia jtraglia left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks 🙏

@hwwhww hwwhww changed the title Add KZGProof at G1_POINT_AT_INFINITY test case Add KZGProof at G1_POINT_AT_INFINITY test cases Sep 19, 2023
@hwwhww hwwhww merged commit 69d34dc into dev Sep 19, 2023
@hwwhww hwwhww deleted the kzg-tests branch September 19, 2023 16:57
@mratsim
Copy link
Contributor

mratsim commented Sep 19, 2023

Cc @etan-status who mentioned an issue related to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants