Skip to content

Commit 9ca84e6

Browse files
authored
crypto/kzg4844: upgrade c-kzg-4844 to v0.2.0 (#27257)
Upgrade c-kzg-4844 to v0.2.0
1 parent 1982437 commit 9ca84e6

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

crypto/kzg4844/kzg4844.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func UseCKZG(use bool) error {
5555

5656
// Initializing the library can take 2-4 seconds - and can potentially crash
5757
// on CKZG and non-ADX CPUs - so might as well so it now and don't wait until
58-
// a crpyto operation is actually needed live.
58+
// a crypto operation is actually needed live.
5959
if use {
6060
ckzgIniter.Do(ckzgInit)
6161
} else {

crypto/kzg4844/kzg4844_ckzg_cgo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ func ckzgInit() {
4747
if err = gokzg4844.CheckTrustedSetupIsWellFormed(params); err != nil {
4848
panic(err)
4949
}
50-
g1s := make([]byte, len(params.SetupG1)*(len(params.SetupG1[0])-2)/2)
51-
for i, g1 := range params.SetupG1 {
50+
g1s := make([]byte, len(params.SetupG1Lagrange)*(len(params.SetupG1Lagrange[0])-2)/2)
51+
for i, g1 := range params.SetupG1Lagrange {
5252
copy(g1s[i*(len(g1)-2)/2:], hexutil.MustDecode(g1))
5353
}
5454
g2s := make([]byte, len(params.SetupG2)*(len(params.SetupG2[0])-2)/2)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/docker/docker v1.6.2
2121
github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7
2222
github.com/edsrzf/mmap-go v1.0.0
23-
github.com/ethereum/c-kzg-4844 v0.1.0
23+
github.com/ethereum/c-kzg-4844 v0.2.0
2424
github.com/fatih/color v1.7.0
2525
github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c
2626
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
130130
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
131131
github.com/ethereum/c-kzg-4844 v0.1.0 h1:BR9kUo6zAaFphuoNj39NquE3Sl0sD/oT0+idKZ4mkiI=
132132
github.com/ethereum/c-kzg-4844 v0.1.0/go.mod h1:WI2Nd82DMZAAZI1wV2neKGost9EKjvbpQR9OqE5Qqa8=
133+
github.com/ethereum/c-kzg-4844 v0.2.0 h1:+cUvymlnoDDQgMInp25Bo3OmLajmmY8mLJ/tLjqd77Q=
134+
github.com/ethereum/c-kzg-4844 v0.2.0/go.mod h1:WI2Nd82DMZAAZI1wV2neKGost9EKjvbpQR9OqE5Qqa8=
133135
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
134136
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
135137
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=

0 commit comments

Comments
 (0)