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

Update EIP-4844: Specify precompile input's z and y to be encoded as big endian #7020

Merged
merged 4 commits into from
Jun 7, 2023
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions EIPS/eip-4844.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def point_evaluation_precompile(input: Bytes) -> Bytes:
Verify p(z) = y given commitment that corresponds to the polynomial p(x) and a KZG proof.
Also verify that the provided commitment matches the provided versioned_hash.
"""
# The data is encoded as follows: versioned_hash | z | y | commitment | proof |
# The data is encoded as follows: versioned_hash | z | y | commitment | proof | with z and y being padded 32 byte big endian values
assert len(input) == 192
versioned_hash = input[:32]
z = input[32:64]
Expand All @@ -195,7 +195,7 @@ def point_evaluation_precompile(input: Bytes) -> Bytes:
# Verify commitment matches versioned_hash
assert kzg_to_versioned_hash(commitment) == versioned_hash

# Verify KZG proof
# Verify KZG proof with z and y in big endian format
assert verify_kzg_proof(commitment, z, y, proof)

# Return FIELD_ELEMENTS_PER_BLOB and BLS_MODULUS as padded 32 byte big endian values
Expand Down