Crate zksync_kzg

Source
Expand description

Implementation based on https://github.com/ethereum/consensus-specs/blob/86fb82b221474cc89387fa6436806507b3849d88/specs/deneb/polynomial-commitments.md

Structs§

KzgInfo
All the info needed for both the network transaction and by our L1 contracts. As part of the network transaction we need to encode the sidecar which contains the: blob, kzg commitment, and the blob proof. The transaction payload will utilize the versioned hash. The info needed for commitBatches is the kzg commitment, opening point, opening value, and opening proof.
KzgSettings
TrustedSetup

Constants§

ZK_SYNC_BYTES_PER_BLOB

Functions§

compute_commitment
Computes a KZG commitment to a EIP4844 blob.
compute_proof
Computes a KZG opening proof for the given blob and evaluation point.
compute_proof_poly
Computes a KZG opening proof for the given polynomial with a deterministic challenge point.
multiscalar_mul
Performs a naive MSM and compute a polynomial commitment.
pubdata_to_blob_commitments
verify_kzg_proof
Verifies a KZG commitment and proof for a given evaluation point and evaluation result.
verify_proof_poly
Verifies a KZG commitment and opening proof for a given polynomial with a deterministic challenge point.