Skip to content

Commit 77000f3

Browse files
crypto: speed up trusted setup
1 parent 3676b56 commit 77000f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crypto/kzg4844/kzg4844_ckzg_cgo.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ func ckzgInit() {
5959
for i, g2 := range params.SetupG2 {
6060
copy(g2s[i*(len(g2)-2)/2:], hexutil.MustDecode(g2))
6161
}
62-
if err = ckzg4844.LoadTrustedSetup(g1s, g1Lag, g2s, 0); err != nil {
62+
// The last parameter determines the multiplication table, see https://notes.ethereum.org/@jtraglia/windowed_multiplications
63+
// I think 6 is an decent compromise between size and speed
64+
if err = ckzg4844.LoadTrustedSetup(g1s, g1Lag, g2s, 6); err != nil {
6365
panic(err)
6466
}
6567
}

0 commit comments

Comments
 (0)