diff --git a/eth/catalyst/queue.go b/eth/catalyst/queue.go index 882d9d6535..d42904843b 100644 --- a/eth/catalyst/queue.go +++ b/eth/catalyst/queue.go @@ -23,7 +23,6 @@ import ( "github.com/ethereum/go-ethereum/beacon/engine" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/miner" ) @@ -93,23 +92,6 @@ func (q *payloadQueue) get(id engine.PayloadID, full bool) *engine.ExecutionPayl return nil } -// getWithoutStatus retrieves a previously stored payload item or nil if it does not exist. -func (q *payloadQueue) getWithoutStatus(id engine.PayloadID) *miner.Payload { - q.lock.RLock() - defer q.lock.RUnlock() - - for _, item := range q.payloads { - if item == nil { - log.Info("getting payload not found", "id", id) - return nil // no more items - } - if item.id == id { - return item.payload - } - } - return nil -} - // waitFull waits until the first full payload has been built for the specified payload id // The method returns immediately if the payload is unknown. func (q *payloadQueue) waitFull(id engine.PayloadID) error { diff --git a/miner/payload_building.go b/miner/payload_building.go index 3aa5164d86..2dc1a7e5b2 100644 --- a/miner/payload_building.go +++ b/miner/payload_building.go @@ -21,7 +21,6 @@ import ( "crypto/sha256" "encoding/binary" "errors" - "fmt" "math/big" "strings" "sync" @@ -452,54 +451,6 @@ func (w *worker) buildPayload(args *BuildPayloadArgs) (*Payload, error) { return payload, nil } -// retryPayloadUpdate retries the payload update process after a fix operation. -// -// This function reconstructs the block using the provided BuildPayloadArgs and -// attempts to update the payload in the system. It performs validation of the -// block parameters and updates the payload if the block is successfully built. -func (w *worker) retryPayloadUpdate(args *BuildPayloadArgs, payload *Payload) error { - fullParams := &generateParams{ - timestamp: args.Timestamp, - forceTime: true, - parentHash: args.Parent, - coinbase: args.FeeRecipient, - random: args.Random, - withdrawals: args.Withdrawals, - beaconRoot: args.BeaconRoot, - noTxs: false, - txs: args.Transactions, - gasLimit: args.GasLimit, - } - - // Since we skip building the empty block when using the tx pool, we need to explicitly - // validate the BuildPayloadArgs here. - _, err := w.validateParams(fullParams) - if err != nil { - log.Error("Failed to validate payload parameters", "id", payload.id, "err", err) - return fmt.Errorf("failed to validate payload parameters: %w", err) - } - - // set shared interrupt - fullParams.interrupt = payload.interrupt - - r := w.getSealingBlock(fullParams) - if r.err != nil { - log.Error("Failed to build full payload after fix", "id", payload.id, "err", r.err) - return fmt.Errorf("failed to build full payload after fix: %w", r.err) - } - - payload.update(r, 0, func() { - w.cacheMiningBlock(r.block, r.env) - }) - - if r.err == nil { - fullParams.isUpdate = true - } - - log.Info("Successfully updated payload after fix", "id", payload.id) - return nil -} - func (w *worker) cacheMiningBlock(block *types.Block, env *environment) { var ( start = time.Now()