Skip to content

Commit a0cb931

Browse files
authored
fix typo (#129)
1 parent 702117d commit a0cb931

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

core/types/data_blob.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func (blobs Blobs) ComputeCommitmentsAndProofs() (commitments []KZGCommitment, v
265265
proofs = make([]KZGProof, len(blobs))
266266
versionedHashes = make([]common.Hash, len(blobs))
267267

268-
cryptoCtx := kzg.CrpytoCtx()
268+
cryptoCtx := kzg.CryptoCtx()
269269
for i, blob := range blobs {
270270
commitment, err := cryptoCtx.BlobToKZGCommitment(gokzg4844.Blob(blob), 1)
271271
if err != nil {
@@ -362,7 +362,7 @@ func (b *BlobTxWrapData) validateBlobTransactionWrapper(inner TxData) error {
362362
if l1 > params.MaxBlobsPerBlock {
363363
return fmt.Errorf("number of blobs exceeds max: %v", l1)
364364
}
365-
cryptoCtx := kzg.CrpytoCtx()
365+
cryptoCtx := kzg.CryptoCtx()
366366
err := cryptoCtx.VerifyBlobKZGProofBatch(toBlobs(b.Blobs), toComms(b.BlobKzgs), toProofs(b.Proofs))
367367
if err != nil {
368368
return fmt.Errorf("error during proof verification: %v", err)

core/types/transaction_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ var (
8181
// Returns a wrapper consisting of a single blob of all zeros that passes validation along with its
8282
// versioned hash.
8383
func oneEmptyBlobWrapData() (wrap *BlobTxWrapData, versionedHashes VersionedHashesView) {
84-
cryptoCtx := kzg.CrpytoCtx()
84+
cryptoCtx := kzg.CryptoCtx()
8585
blob := Blob{}
8686
commitment, _ := cryptoCtx.BlobToKZGCommitment(gokzg4844.Blob(blob), 1)
8787
proof, _ := cryptoCtx.ComputeBlobKZGProof(gokzg4844.Blob(blob), commitment, 1)

crypto/kzg/kzg.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func InitializeCryptoCtx() {
6060
// to allow one to create and verify blob proofs.
6161
// This function is expensive to run if the crypto context isn't initialized, so it is recommended to
6262
// pre-initialize by calling InitializeCryptoCtx
63-
func CrpytoCtx() gokzg4844.Context {
63+
func CryptoCtx() gokzg4844.Context {
6464
InitializeCryptoCtx()
6565
return gCryptoCtx
6666
}
@@ -91,7 +91,7 @@ func PointEvaluationPrecompile(input []byte) ([]byte, error) {
9191
var quotientKZG gokzg4844.KZGProof
9292
copy(quotientKZG[:], input[144:PrecompileInputLength])
9393

94-
cryptoCtx := CrpytoCtx()
94+
cryptoCtx := CryptoCtx()
9595
err := cryptoCtx.VerifyKZGProof(dataKZG, x, y, quotientKZG)
9696
if err != nil {
9797
return nil, fmt.Errorf("verify_kzg_proof error: %v", err)

0 commit comments

Comments
 (0)