diff --git a/builder/builder.go b/builder/builder.go index e9a00e0c3..6e2462a23 100644 --- a/builder/builder.go +++ b/builder/builder.go @@ -610,9 +610,9 @@ func getCapellaPayload( } func getBlobsBundle(blobsBundle *engine.BlobsBundleV1) *builderApiDeneb.BlobsBundle { - var commitments []deneb.KzgCommitment - var proofs []deneb.KzgProof - var blobs []deneb.Blob + commitments := make([]deneb.KzgCommitment, len(blobsBundle.Commitments)) + proofs := make([]deneb.KzgProof, len(blobsBundle.Proofs)) + blobs := make([]deneb.Blob, len(blobsBundle.Blobs)) // we assume the lengths for blobs bundle is validated beforehand to be the same for i := range blobsBundle.Blobs { diff --git a/miner/environment_diff.go b/miner/environment_diff.go index a09445747..6f2b03e9f 100644 --- a/miner/environment_diff.go +++ b/miner/environment_diff.go @@ -87,6 +87,7 @@ func (envDiff *environmentDiff) commitBlobTx(tx *types.Transaction, chData chain return nil, txType, err } + envDiff.newTxs = append(envDiff.newTxs, tx.WithoutBlobTxSidecar()) envDiff.newSidecars = append(envDiff.newSidecars, sc) envDiff.newBlobs += len(sc.Blobs) *envDiff.header.BlobGasUsed += receipt.BlobGasUsed @@ -145,7 +146,6 @@ func (envDiff *environmentDiff) commitLegacyTx(tx *types.Transaction, chData cha } envDiff.newProfit = envDiff.newProfit.Add(envDiff.newProfit, gasPrice.Mul(gasPrice, big.NewInt(int64(receipt.GasUsed)))) - envDiff.newTxs = append(envDiff.newTxs, tx) envDiff.newReceipts = append(envDiff.newReceipts, receipt) return receipt, shiftTx, nil @@ -156,7 +156,12 @@ func (envDiff *environmentDiff) commitTx(tx *types.Transaction, chData chainData if tx.Type() == types.BlobTxType { return envDiff.commitBlobTx(tx, chData) } - return envDiff.commitLegacyTx(tx, chData) + receipt, skip, err := envDiff.commitLegacyTx(tx, chData) + if err != nil { + return nil, skip, err + } + envDiff.newTxs = append(envDiff.newTxs, tx) + return receipt, skip, nil } // Commit Bundle to env diff