diff --git a/miner/bidder.go b/miner/bidder.go index 8004880e38..83a1afbc5e 100644 --- a/miner/bidder.go +++ b/miner/bidder.go @@ -254,11 +254,12 @@ func (b *Bidder) bid(work *environment) { } bid := types.RawBid{ - BlockNumber: parent.Number.Uint64() + 1, - ParentHash: parent.Hash(), - GasUsed: work.header.GasUsed, - GasFee: work.state.GetBalance(consensus.SystemAddress).ToBig(), - Txs: txs, + BlockNumber: parent.Number.Uint64() + 1, + ParentHash: parent.Hash(), + GasUsed: work.header.GasUsed, + GasFee: work.state.GetBalance(consensus.SystemAddress).ToBig(), + Txs: txs, + UnRevertible: work.UnRevertible, // TODO: decide builderFee according to realtime traffic and validator commission } diff --git a/miner/worker.go b/miner/worker.go index 7aba5693af..413b9a531d 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -97,7 +97,8 @@ type environment struct { sidecars types.BlobSidecars blobs int - profit *big.Int // block gas fee + BNBSentToSystem + profit *big.Int // block gas fee + BNBSentToSystem + UnRevertible []common.Hash } // copy creates a deep copy of environment. diff --git a/miner/worker_builder.go b/miner/worker_builder.go index 342014e25b..469d267a2e 100644 --- a/miner/worker_builder.go +++ b/miner/worker_builder.go @@ -375,6 +375,12 @@ func (w *worker) mergeBundles( mergedBundle.BundleGasFees.Add(mergedBundle.BundleGasFees, simulatedBundle.BundleGasFees) mergedBundle.BundleGasUsed += simulatedBundle.BundleGasUsed + + for _, tx := range includedTxs { + if !containsHash(bundle.OriginalBundle.RevertingTxHashes, tx.Hash()) { + env.UnRevertible = append(env.UnRevertible, tx.Hash()) + } + } } if len(includedTxs) == 0 {