Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Dec 5, 2023
1 parent 6d03b77 commit 945ec47
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pkg/encoding/kzgEncoder/multiframe_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package kzgEncoder
package kzgEncoder_test

import (
"testing"

rs "github.com/Layr-Labs/eigenda/pkg/encoding/encoder"
kzgRs "github.com/Layr-Labs/eigenda/pkg/encoding/kzgEncoder"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand All @@ -12,13 +13,13 @@ func TestUniversalVerify(t *testing.T) {
teardownSuite := setupSuite(t)
defer teardownSuite(t)

group, _ := NewKzgEncoderGroup(kzgConfig)
group, _ := kzgRs.NewKzgEncoderGroup(kzgConfig)
params := rs.GetEncodingParams(numSys, numPar, uint64(len(GETTYSBURG_ADDRESS_BYTES)))
enc, err := group.NewKzgEncoder(params)
require.Nil(t, err)

numBlob := 5
samples := make([]Sample, 0)
samples := make([]kzgRs.Sample, 0)
for z := 0; z < numBlob; z++ {
inputFr := rs.ToFrArray(GETTYSBURG_ADDRESS_BYTES)

Expand All @@ -35,16 +36,16 @@ func TestUniversalVerify(t *testing.T) {

assert.Equal(t, j, q, "leading coset inconsistency")

sample = Sample{
Commitment: commit,
sample := kzgRs.Sample{
Commitment: *commit,
Proof: f.Proof,
Row: z,
Coeffs: f.Coeffs,
X: i,
X: uint(i),
}
samples = append(samples, sample)
}
}

assert.True(t, group.UniversalVerify(params, samples, numBlob), "universal batch verification failed\n")
assert.True(t, group.UniversalVerify(params, samples, numBlob) == nil, "universal batch verification failed\n")
}

0 comments on commit 945ec47

Please sign in to comment.