forked from cerc-io/plugeth
crypto/kzg4844: upgrade c-kzg-4844 to v0.2.0 (#27257)
Upgrade c-kzg-4844 to v0.2.0
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user