miner: fix prealloc

This commit is contained in:
Felix Lange 2025-06-09 11:07:44 +02:00
parent 7b43739912
commit 3d6b399385

View file

@ -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 {