more updates

This commit is contained in:
Jared Wasinger 2025-06-09 15:33:35 +02:00 committed by Felix Lange
parent 84fdfe112f
commit e38f7767c9

View file

@ -23,8 +23,6 @@ import (
"sync/atomic"
"time"
"github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
"github.com/ethereum/go-ethereum/consensus/misc/eip4844"
@ -97,13 +95,6 @@ type generateParams struct {
noTxs bool // Flag whether an empty block without any transaction is expected
}
func (env *environment) encodedSizeWithTx(tx *types.Transaction) uint64 {
body := types.Body{Transactions: append(env.txs, tx), Withdrawals: make([]*types.Withdrawal, 0)}
env.header.RequestsHash = &common.Hash{}
block := types.NewBlock(env.header, &body, env.receipts, trie.NewStackTrie(nil))
return block.Size()
}
// generateWork generates a sealing block based on the given parameters.
func (miner *Miner) generateWork(params *generateParams, witness bool) *newPayloadResult {
work, err := miner.prepareWork(params, witness)
@ -407,10 +398,6 @@ func (miner *Miner) commitTransactions(env *environment, plainTxs, blobTxs *tran
break
}
if miner.chainConfig.IsOsaka(env.header.Number, env.header.Time) && env.encodedSizeWithTx(tx) > params.BlockRLPSizeCap {
break
}
// Make sure all transactions after osaka have cell proofs
if miner.chainConfig.IsOsaka(env.header.Number, env.header.Time) {
if sidecar := tx.BlobTxSidecar(); sidecar != nil {