Add pyecc test for proof

This commit is contained in:
Dankrad Feist 2022-10-04 00:50:05 +01:00
parent 2e435a7e26
commit 5195d9be55
No known key found for this signature in database
GPG Key ID: 6815E6A20BEBBABA
1 changed files with 5 additions and 0 deletions

View File

@ -69,3 +69,8 @@ commitment_pyecc = kzg_proofs.commit_to_poly(polynomial, ts_pyecc)
commitment_ckzg = ckzg.blob_to_kzg_commitment([ckzg.bytes_to_bls_field(r.to_bytes(32, "little")) for r in polynomial_l_rbo], ts)
assert compress_G1(commitment_pyecc).to_bytes(48, "big") == ckzg.bytes_from_g1(commitment_ckzg)
proof_pyecc = kzg_proofs.compute_proof_single(polynomial, x, ts_pyecc)
proof_ckzg = ckzg.compute_kzg_proof(ckzg_poly, ckzg.bytes_to_bls_field(x.to_bytes(32, "little")), ts)
assert compress_G1(proof_pyecc).to_bytes(48, "big") == ckzg.bytes_from_g1(proof_ckzg)