Skip to content

Commit

Permalink
EIP4844: Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
asn-d6 committed Jan 25, 2023
1 parent a09b8b0 commit d6bb1b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions specs/eip4844/polynomial-commitments.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def bytes_to_bls_field(b: Bytes32) -> BLSFieldElement:
#### `validate_kzg_g1`

```python
def validate_kzg_g1(b: Bytes48) -> bool:
def validate_kzg_g1(b: Bytes48) -> None:
"""
Perform BLS validation required by the types `KZGProof` and `KZGCommitment`.
"""
Expand Down Expand Up @@ -495,14 +495,14 @@ def compute_aggregate_kzg_proof(blobs: Sequence[Blob]) -> KZGProof:

```python
def verify_aggregate_kzg_proof(blobs: Sequence[Blob],
expected_kzg_commitments_bytes: Sequence[Bytes48],
kzg_aggregated_proof_bytes: Bytes48) -> bool:
expected_commitments_bytes: Sequence[Bytes48],
aggregated_proof_bytes: Bytes48) -> bool:
"""
Given a list of blobs and an aggregated KZG proof, verify that they correspond to the provided commitments.
Public method.
"""
expected_commitments = [bytes_to_kzg_commitment(c) for c in expected_kzg_commitments_bytes]
expected_commitments = [bytes_to_kzg_commitment(c) for c in expected_commitments_bytes]

aggregated_poly, aggregated_poly_commitment, evaluation_challenge = compute_aggregated_poly_and_commitment(
blobs,
Expand All @@ -513,6 +513,6 @@ def verify_aggregate_kzg_proof(blobs: Sequence[Blob],
y = evaluate_polynomial_in_evaluation_form(aggregated_poly, evaluation_challenge)

# Verify aggregated proof
kzg_aggregated_proof = bytes_to_kzg_proof(kzg_aggregated_proof_bytes)
return verify_kzg_proof_impl(aggregated_poly_commitment, evaluation_challenge, y, kzg_aggregated_proof)
aggregated_proof = bytes_to_kzg_proof(aggregated_proof_bytes)
return verify_kzg_proof_impl(aggregated_poly_commitment, evaluation_challenge, y, aggregated_proof)
```

0 comments on commit d6bb1b9

Please sign in to comment.