The following questions are still open here:
Assume we have two different polynomial commitments schemes over the same field. Let's denote $C$ and $C'$ as polynomial commitments of polynomial $f$. It is easy to show that $C$ and $C'$ commit to the same polynomial, as follows:
If $\pi$ and $\pi'$ are verified with the same opening $v=f(H(C, C'))$, then this proves that $C$ and $C'$ commit to the same polynomial.
Now, let's use this to demonstrate how we can prove that two commitment values calculated with two different polynomial commitment schemes correspond to the same data set.
Let $data_0, data_1, \dots, data_k$ be the dataset the Zone want to commit. Using Lagrange interpolation, the Zone can express this data as a polynomial $f$ with the acceptance of $f(w^i)=data_i$ where $w$ is a root of unity in the finite field.
Let $C$ be the commitment value calculated using the FRI scheme in the Zone and Let $C'$ be the commitment value calculated using the KZG scheme for the relevant data in the Base Layer. Here, it is known that the two commitments represent the same polynomial. If it can be shown that proof values of a random point $\pi, \pi'$ yield the same opening, this proves that different commitment values are calculated for the same polynomial and this imply the same data. Therefore, the random point $u=H(C,C')$ is calculated using the idea of Fiat-Shamir transform.
The proof calculation and verification functions at a random point can be implemented as follows:
def generate_random_proof(
Com1: commitment,
Com2: commitment,
polynomial: Polynomial,
global_parameters: Sequence[G1],
) -> Proof:
# compute a witness polynomial in that satisfies `witness(x) = (f(x)-v)/(x-u)`
u = int(hash(Com1,Com2))
v = polynomial.eval(u)
f_x_v = polynomial - Polynomial([v], BLS_MODULUS)
x_u = Polynomial([-u, 1], BLS_MODULUS)
witness, _ = f_x_v / x_u
return g1_linear_combination(witness, global_parameters)
def verify_random_proof(
u: BLSFieldElement
v: BLSFieldElement,
commitment: Commitment,
proof: Proof,
) -> bool:
commitment_check_G1 = bls.bytes48_to_G1(commitment) - bls.multiply(bls.G1(), v)
proof_check_g2 = bls.add(
GLOBAL_PARAMETERS_G2[1],
bls.neg(bls.multiply(bls.G2(), u))
)
return bls.pairing_check([
[commitment_check_G1, bls.neg(bls.G2())],
[bls.bytes48_to_G1(proof), proof_check_g2],
])
The Base Layer will only need the blob data from the Zone and the commitment value calculated according to the commitment scheme used by the Zone.
The following questions are still open here:
1-If polynomial commitment schemes are defined in different fields, can a solution be found? I have some thoughts on this.
2-If the zone doesn't use a polynomial commitment scheme for commitment, can a solution be found? I couldn't find an equality proof for this. We need to think about this part. But in any case, the zone side also needs to use some polynomial commitment scheme. We can't support all formats. Just like Ethereum doesn't comply with all encoding formats. Somehow, rollups make some updates to comply with EIP4844.