diff --git a/encoding/kzg/verifier/length_test.go b/encoding/kzg/verifier/length_test.go index e9d70c2a06..fb6f00df7b 100644 --- a/encoding/kzg/verifier/length_test.go +++ b/encoding/kzg/verifier/length_test.go @@ -26,13 +26,13 @@ func TestLengthProof(t *testing.T) { inputFr, err := rs.ToFrArray(inputBytes) require.Nil(t, err) - _, legnthCommitment, legnthProof, _, _, err := enc.Encode(inputFr) + _, lengthCommitment, lengthProof, _, _, err := enc.Encode(inputFr) require.Nil(t, err) length := len(inputFr) - assert.NoError(t, v.VerifyCommit(legnthCommitment, legnthProof, uint64(length)), "low degree verification failed\n") + assert.NoError(t, v.VerifyCommit(lengthCommitment, lengthProof, uint64(length)), "low degree verification failed\n") length = len(inputFr) - 10 - assert.Error(t, v.VerifyCommit(legnthCommitment, legnthProof, uint64(length)), "low degree verification failed\n") + assert.Error(t, v.VerifyCommit(lengthCommitment, lengthProof, uint64(length)), "low degree verification failed\n") } } diff --git a/encoding/kzg/verifier/verifier.go b/encoding/kzg/verifier/verifier.go index 1a3de68eda..a5090de325 100644 --- a/encoding/kzg/verifier/verifier.go +++ b/encoding/kzg/verifier/verifier.go @@ -181,14 +181,14 @@ func (v *Verifier) VerifyBlobLength(commitments encoding.BlobCommitments) error // VerifyCommit verifies the low degree proof; since it doesn't depend on the encoding parameters // we leave it as a method of the KzgEncoderGroup -func (v *Verifier) VerifyCommit(lengthCommit *bn254.G2Affine, legnthProof *bn254.G2Affine, length uint64) error { +func (v *Verifier) VerifyCommit(lengthCommit *bn254.G2Affine, lengthProof *bn254.G2Affine, length uint64) error { g1Challenge, err := kzg.ReadG1Point(v.SRSOrder-length, v.KzgConfig) if err != nil { return err } - err = VerifyLengthProof(lengthCommit, legnthProof, &g1Challenge) + err = VerifyLengthProof(lengthCommit, lengthProof, &g1Challenge) if err != nil { return fmt.Errorf("%v . %v ", "low degree proof fails", err) } else { diff --git a/encoding/test/main.go b/encoding/test/main.go index 8e7cd71003..c2b1639355 100644 --- a/encoding/test/main.go +++ b/encoding/test/main.go @@ -86,9 +86,9 @@ func TestKzgRs() { printFr(inputFr) //inputSize := uint64(len(inputFr)) - commit, legnthCommit, legnthProof, frames, fIndices, err := enc.Encode(inputFr) - _ = legnthProof - _ = legnthCommit + commit, lengthCommit, lengthProof, frames, fIndices, err := enc.Encode(inputFr) + _ = lengthProof + _ = lengthCommit if err != nil { log.Fatal(err) }