mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
crypto/kzg4844: upgrade c-kzg-4844 to v0.2.0 (#27257)
This commit is contained in:
parent
bedd571091
commit
ed03a99770
4 changed files with 7 additions and 7 deletions
|
|
@ -55,7 +55,7 @@ func UseCKZG(use bool) error {
|
|||
|
||||
// Initializing the library can take 2-4 seconds - and can potentially crash
|
||||
// on CKZG and non-ADX CPUs - so might as well so it now and don't wait until
|
||||
// a crpyto operation is actually needed live.
|
||||
// a crypto operation is actually needed live.
|
||||
if use {
|
||||
ckzgIniter.Do(ckzgInit)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ import (
|
|||
"errors"
|
||||
"sync"
|
||||
|
||||
"github.com/XinFinOrg/XDPoSChain/common/hexutil"
|
||||
gokzg4844 "github.com/crate-crypto/go-kzg-4844"
|
||||
ckzg4844 "github.com/ethereum/c-kzg-4844/bindings/go"
|
||||
"github.com/XinFinOrg/XDPoSChain/common/hexutil"
|
||||
)
|
||||
|
||||
// ckzgAvailable signals whether the library was compiled into Geth.
|
||||
|
|
@ -47,8 +47,8 @@ func ckzgInit() {
|
|||
if err = gokzg4844.CheckTrustedSetupIsWellFormed(params); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
g1s := make([]byte, len(params.SetupG1)*(len(params.SetupG1[0])-2)/2)
|
||||
for i, g1 := range params.SetupG1 {
|
||||
g1s := make([]byte, len(params.SetupG1Lagrange)*(len(params.SetupG1Lagrange[0])-2)/2)
|
||||
for i, g1 := range params.SetupG1Lagrange {
|
||||
copy(g1s[i*(len(g1)-2)/2:], hexutil.MustDecode(g1))
|
||||
}
|
||||
g2s := make([]byte, len(params.SetupG2)*(len(params.SetupG2[0])-2)/2)
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -49,7 +49,7 @@ require (
|
|||
github.com/crate-crypto/go-kzg-4844 v0.2.0
|
||||
github.com/deckarep/golang-set v1.8.0
|
||||
github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498
|
||||
github.com/ethereum/c-kzg-4844 v0.1.0
|
||||
github.com/ethereum/c-kzg-4844 v0.2.0
|
||||
github.com/google/gofuzz v1.2.0
|
||||
github.com/kylelemons/godebug v1.1.0
|
||||
github.com/mattn/go-isatty v0.0.17
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -43,8 +43,8 @@ github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498 h1:Y9vTBSsV4hSwPSj4bac
|
|||
github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA=
|
||||
github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=
|
||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/ethereum/c-kzg-4844 v0.1.0 h1:BR9kUo6zAaFphuoNj39NquE3Sl0sD/oT0+idKZ4mkiI=
|
||||
github.com/ethereum/c-kzg-4844 v0.1.0/go.mod h1:WI2Nd82DMZAAZI1wV2neKGost9EKjvbpQR9OqE5Qqa8=
|
||||
github.com/ethereum/c-kzg-4844 v0.2.0 h1:+cUvymlnoDDQgMInp25Bo3OmLajmmY8mLJ/tLjqd77Q=
|
||||
github.com/ethereum/c-kzg-4844 v0.2.0/go.mod h1:WI2Nd82DMZAAZI1wV2neKGost9EKjvbpQR9OqE5Qqa8=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
|
|
|
|||
Loading…
Reference in a new issue