From 3d6b3993858ceae1793f01a8d51b83bfdef090c2 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 9 Jun 2025 11:07:44 +0200 Subject: [PATCH] miner: fix prealloc --- miner/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miner/worker.go b/miner/worker.go index 7c73554a3f..198745ad27 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -396,7 +396,7 @@ func (miner *Miner) commitTransactions(env *environment, plainTxs, blobTxs *tran if sidecar := tx.BlobTxSidecar(); sidecar != nil { if sidecar.Version == 0 { log.Info("Including blob tx with v0 sidecar, recomputing proofs", "hash", ltx.Hash) - sidecar.Proofs = make([]kzg4844.Proof, 0) + sidecar.Proofs = make([]kzg4844.Proof, 0, len(sidecar.Blobs)*kzg4844.CellProofsPerBlob) for _, blob := range sidecar.Blobs { cellProofs, err := kzg4844.ComputeCellProofs(&blob) if err != nil {