Skip to content

Commit

Permalink
Fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwhww committed Sep 25, 2023
1 parent a2d500f commit 3f354fd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/generators/kzg_4844/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ def case03_verify_kzg_proof():
commitment = spec.blob_to_kzg_commitment(blob)
proof = spec.G1_POINT_AT_INFINITY
assert not spec.verify_kzg_proof(commitment, z, y, proof)
prefix = 'verify_kzg_proof_case_incorrect_proof_point_at_infinity'
identifier = f'{encode_hex(hash(blob))}_{encode_hex(z)}'
yield f'verify_kzg_proof_case_incorrect_proof_point_at_infinity_{(hash(bytes(identifier, "utf-8"))[:8]).hex()}', {
yield f'{prefix}_{(hash(bytes(identifier, "utf-8"))[:8]).hex()}', {
'input': {
'commitment': encode_hex(commitment),
'z': encode_hex(z),
Expand All @@ -240,8 +241,9 @@ def case03_verify_kzg_proof():
commitment = spec.blob_to_kzg_commitment(blob)
proof = spec.G1_POINT_AT_INFINITY
assert spec.verify_kzg_proof(commitment, z, y, proof)
prefix = 'verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly'
identifier = f'{encode_hex(hash(blob))}_{encode_hex(z)}'
yield f'verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_{(hash(bytes(identifier, "utf-8"))[:8]).hex()}', {
yield f'{prefix}_{(hash(bytes(identifier, "utf-8"))[:8]).hex()}', {
'input': {
'commitment': encode_hex(commitment),
'z': encode_hex(z),
Expand All @@ -259,8 +261,9 @@ def case03_verify_kzg_proof():
proof = spec.G1_POINT_AT_INFINITY
assert spec.verify_kzg_proof(commitment, z, y, proof)
assert y == field_element_bytes(2)
prefix = 'verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly'
identifier = f'{encode_hex(hash(blob))}_{encode_hex(z)}'
yield f'verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_{(hash(bytes(identifier, "utf-8"))[:8]).hex()}', {
yield f'{prefix}_{(hash(bytes(identifier, "utf-8"))[:8]).hex()}', {
'input': {
'commitment': encode_hex(commitment),
'z': encode_hex(z),
Expand Down Expand Up @@ -455,7 +458,6 @@ def case05_verify_blob_kzg_proof():
}



# Edge case: Invalid blob
for blob in INVALID_BLOBS:
proof = G1
Expand Down

0 comments on commit 3f354fd

Please sign in to comment.