From c1c7fa0f946e9097962630c789c36bcc76eb8c93 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Mon, 10 Jan 2022 14:47:57 +0100 Subject: [PATCH] fix: don't create settings each time a key is calculated --- trie/utils/verkle.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/trie/utils/verkle.go b/trie/utils/verkle.go index 8a25fcf675d4..ba2d0cda213e 100644 --- a/trie/utils/verkle.go +++ b/trie/utils/verkle.go @@ -18,7 +18,6 @@ package utils import ( "github.com/crate-crypto/go-ipa/bandersnatch/fr" - "github.com/crate-crypto/go-ipa/ipa" "github.com/gballet/go-verkle" "github.com/holiman/uint256" @@ -55,7 +54,7 @@ func GetTreeKey(address []byte, treeIndex *uint256.Int, subIndex byte) []byte { verkle.CopyFr(&poly[i], &verkle.FrZero) } - ret := ipa.NewIPASettings().Commit(poly[:]) + ret := verkle.GetConfig().CommitToPoly(poly[:], 0) retb := ret.Bytes() return retb[:]