From d83896cbad7537ac84a6277e74c885c78d78d6f2 Mon Sep 17 00:00:00 2001 From: lisenokdonbassenok Date: Mon, 26 Jan 2026 11:04:20 +0200 Subject: [PATCH] perf: reuse hash buffer in witness storage leaf hash --- execution/commitment/hex_patricia_hashed.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/execution/commitment/hex_patricia_hashed.go b/execution/commitment/hex_patricia_hashed.go index 18df834cb63..72eafe67e76 100644 --- a/execution/commitment/hex_patricia_hashed.go +++ b/execution/commitment/hex_patricia_hashed.go @@ -911,7 +911,7 @@ func (hph *HexPatriciaHashed) witnessComputeCellHashWithStorage(cell *cell, dept if hph.trace { fmt.Printf("leafHashWithKeyVal(singleton) for [%x]=>[%x]\n", cell.hashedExtension[:64-hashedKeyOffset+1], cell.Storage[:cell.StorageLen]) } - aux := make([]byte, 0, 33) + aux := hph.hashAuxBuffer[:0] if aux, err = hph.leafHashWithKeyVal(aux, cell.hashedExtension[:64-hashedKeyOffset+1], cell.Storage[:cell.StorageLen], true); err != nil { return nil, storageRootHashIsSet, nil, err }