Skip to content

Commit

Permalink
fix the misspelling words in the code. (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoyeal authored May 20, 2024
1 parent 5ff66ae commit 4d89f37
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions encoding/kzg/verifier/length_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
4 changes: 2 additions & 2 deletions encoding/kzg/verifier/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions encoding/test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 4d89f37

Please sign in to comment.