@@ -76,10 +76,9 @@ func ComputeProof(poly []bls.Fr, x uint64, crsG1 []bls.G1Point) *bls.G1Point {
7676 return bls .LinCombG1 (crsG1 [:len (quotientPolynomial )], quotientPolynomial )
7777}
7878
79+ // Test the go-kzg library for correctness
80+ // Do the trusted setup, generate a polynomial, commit to it, make proof, verify proof.
7981func TestGoKzg (t * testing.T ) {
80- /// Test the go-kzg library for correctness
81- /// Do the trusted setup, generate a polynomial, commit to it, make proof, verify proof.
82-
8382 // Generate roots of unity
8483 fs := gokzg .NewFFTSettings (uint8 (math .Log2 (params .FieldElementsPerBlob )))
8584
@@ -131,9 +130,8 @@ func TestGoKzg(t *testing.T) {
131130 }
132131}
133132
133+ // Test the geth KZG module (use our trusted setup instead of creating a new one)
134134func TestKzg (t * testing.T ) {
135- /// Test the geth KZG module (use our trusted setup instead of creating a new one)
136-
137135 // First let's do some go-kzg preparations to be able to convert polynomial between coefficient and evaluation form
138136 fs := gokzg .NewFFTSettings (uint8 (math .Log2 (params .FieldElementsPerBlob )))
139137
@@ -175,6 +173,7 @@ type JSONTestdataBlobs struct {
175173 KzgBlob2 string
176174}
177175
176+ // Test the optimized VerifyBlobs function
178177func TestVerifyBlobs (t * testing.T ) {
179178 data , err := ioutil .ReadFile ("kzg_testdata/kzg_blobs.json" )
180179 if err != nil {
@@ -242,6 +241,7 @@ func TestVerifyBlobs(t *testing.T) {
242241 }
243242}
244243
244+ // Helper: Create test vector for the BlobVerification precompile
245245func TestBlobVerificationTestVector (t * testing.T ) {
246246 data := []byte (strings .Repeat ("HELPMELOVEME " , 10083 ))[:params .FieldElementsPerBlob * 32 ]
247247
@@ -261,6 +261,7 @@ func TestBlobVerificationTestVector(t *testing.T) {
261261 fmt .Printf ("%d\n " , len (testVector ))
262262}
263263
264+ // Helper: Create test vector for the PointEvaluation precompile
264265func TestPointEvaluationTestVector (t * testing.T ) {
265266 fs := gokzg .NewFFTSettings (uint8 (math .Log2 (params .FieldElementsPerBlob )))
266267
0 commit comments