This article is based on Dankrad’s summary on KZG Polynomial Commitments (https://dankradfeist.de/ethereum/2020/06/16/kate-polynomial-commitments.html)

What is it good for?


Compared to Merkle tree proofs, the proof size is constant. In the end of this article, we will be able to replace Merkle proofs with KZG polynomial commitments, and our proof will always be constant (48 bytes), regardless of the array size or the polynomial order.

Polynomial commitments via Merkle trees


Recap on polynomials

The relationship between data and polynomials:

It is enough to have only coefficients to construct a polynomial. We can treat our data points as coefficients, allowing us to construct a polynomial for our data.

If our data is 6, 0, 0, 0, 0, -55 → then the polynomial will be $6x^5 + 0x^4 + 0x^3 + 0x^2 + 0x^1 -55x^0$, or for the shorter version: $6x^5 - 55$. There is exactly one and only one polynomial for a specific coefficient set. In other words, there is one-to-one mapping between polynomials and coefficients.

Have some math culture! Mmmhh, delicious:

the formal definition is $p(X) =\sum_{i=0}^{n}c_ix^i$ where $c_i$’s are the coefficients. For the ones who don’t like math, this mambo-jambo basically means:

in the end, we will have a polynomial with a degree of $n$ (means, the highest power of $x$ will be $n$)