crypto/kzg4844: upgrade c-kzg-4844 to v0.2.0 (#27257)

Upgrade c-kzg-4844 to v0.2.0
This commit is contained in:
Justin Traglia
2023-05-12 20:16:14 +03:00
committed by GitHub
parent 1982437259
commit 9ca84e6b0b
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -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 {
+2 -2
View File
@@ -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)