Future Plans: This page is planned and under active development. Examples are placeholders and will be replaced with accurate, tested content.
KZG Commitments
KZG (Kate-Zaverucha-Goldberg) is a polynomial commitment scheme using pairings over the BLS12-381 elliptic curve, enabling succinct proofs of polynomial evaluations.
Mainnet-critical algorithm (post-Dencun) - Core primitive for EIP-4844 blob transactions, enabling proto-danksharding and L2 data availability scaling.
Overview
KZG commitments allow rollups to post large data blobs (~126 KB) as tiny commitments (48 bytes) on-chain. Validators can verify data availability without storing full blobs, enabling Proto-Danksharding and reducing L2 costs by 100-200x.
Why KZG for Ethereum?
Data Availability Crisis: L2s need cheap data posting
Solution: Blob transactions with KZG commitments
Impact: Rollup costs reduced from ~1−5to 0.01-0.10 per transaction
Key Properties:
- Succinct: 48-byte commitment for ~126 KB blob (4096 field elements)
- Binding: Cannot change blob after commitment
- Verifiable: Prove
p(z) = y at any point
- Batch-friendly: Verify multiple proofs efficiently
Mathematical Foundation
Polynomial Commitments
Represent blob as polynomial:
Commitment: C = [p(τ)]₁ (G1 point on BLS12-381)
Evaluation Proof for p(z) = y:
Verification (pairing check):
Trusted Setup
Ethereum KZG Ceremony: Multi-party computation generating trusted setup parameters
τ (tau): Secret value from MPC ceremony
- 140,000+ participants (Ethereum KZG ceremony 2023)
- Safe if ANY participant destroyed their secret
- Powers of τ precomputed in G1 and G2
Security Assumption: Soundness relies on at least one honest participant who destroyed their secret contribution. If all participants colluded, they could create false proofs. However, with 140,000+ participants, this scenario is cryptographically impractical.
Setup Size: ~1 MB (4096 G1 points + 65 G2 points)
Implementation Details
Native C Only: KZG operations via c-kzg-4844 library (trusted setup required)
WASM Not Supported: WASM target returns error.NotSupported due to C library dependencies. KZG is only available in native environments.
Import:
Quick Start
Benefits: Tree-shakeable, testable, custom c-kzg implementations
Documentation
Core Operations
Integration
EIP-4844 Blob Transactions
Size: 131,072 bytes (~126 KB)
Structure: 4,096 field elements × 32 bytes
Constraint: Each element < BLS12-381 scalar field modulus
Note: While often described as “128 KB”, the actual size is 131,072 bytes (128 × 1024), approximately 126 KB in decimal.
Transaction Type
Type 3 (Blob Transaction):
Blob Lifecycle
- Submission: Rollup creates blob transaction with KZG commitments
- Inclusion: Block proposer includes in block
- Verification: Nodes verify KZG proofs ensure commitment correctness
- Availability: Blobs available for 18 days (commitments enable verification without full blob download)
- Pruning: After 18 days, blobs deleted (commitments remain on-chain permanently)
Mainnet Deployment: Dencun hard fork (March 2024)
Point Evaluation Precompile
Address: 0x0a (precompile 0x0a)
Function: Verify KZG proof for blob evaluation
Gas Cost: 50,000 gas (fixed)
Use Case: On-chain verification of blob data samples
Implementation
C-KZG-4844: Official Ethereum implementation
- Location:
lib/c-kzg-4844/
- Language: C (portable)
- Audits: Sigma Prime (2023), zkSecurity (2025)
Zig Wrapper: src/crypto/c_kzg.zig
- Safe FFI bindings
- Error handling
- Memory management
Platform Support:
- Native: Full support via c-kzg-4844 C library
- WASM: NOT SUPPORTED - Returns
error.NotSupported due to C library dependencies
Trusted Setup: Must call loadTrustedSetup() before any KZG operations. Setup loads Ethereum KZG Ceremony parameters (~1 MB).
Gas Economics
Blob Gas: Separate gas market from execution gas
Target: 3 blobs per block (~393 KB)
Max: 6 blobs per block (~786 KB)
Pricing: EIP-1559 style (exponential)
Cost Comparison:
- Calldata: ~16 gas/byte × 131KB =
2.1M gas ($100-500)
- Blob:
50K gas per blob ($1-5)
Savings: 100-200x reduction for L2 transaction data costs
Security
Trusted Setup Security:
- Assumption: Safe if ≥1 participant destroyed their secret contribution
- Participants: 140,000+ in Ethereum KZG Ceremony (2023)
- Verification: Publicly verifiable transcript ensures ceremony correctness
- Risk: If all participants colluded, they could create false proofs. With 140,000+ participants, this is cryptographically impractical.
Commitment Binding:
- Computationally infeasible to find collision
- Based on discrete log hardness in G1 (BLS12-381)
Proof Soundness:
- Cannot forge proof for wrong evaluation value
- Pairing check guarantees correctness via bilinear map properties
Use Cases
Optimistic Rollups:
- Post transaction data as blobs
- Fraud proofs reference blob data
ZK Rollups:
- Post full transaction data
- Validity proofs verify state transition
Data Availability Sampling:
- Light clients sample random points
- Verify via KZG proofs
- Ensure data availability without full download
Native (c-kzg-4844):
- Blob to commitment: ~50 ms
- Compute proof: ~50 ms
- Verify proof: ~2 ms
- Verify blob proof batch: ~2 ms per blob
Limits:
- Max 6 blobs per block
- Verification time: ~12 ms per block (6 blobs)
References