diff --git a/turbo/execution/eth1/ethereum_execution.go b/turbo/execution/eth1/ethereum_execution.go index fd4317610b4..a8159784669 100644 --- a/turbo/execution/eth1/ethereum_execution.go +++ b/turbo/execution/eth1/ethereum_execution.go @@ -135,7 +135,7 @@ func (e *EthereumExecutionModule) getHeader(ctx context.Context, tx kv.Tx, block return e.blockReader.Header(ctx, tx, blockHash, blockNumber) } -func (e *EthereumExecutionModule) getTD(ctx context.Context, tx kv.Tx, blockHash libcommon.Hash, blockNumber uint64) (*big.Int, error) { +func (e *EthereumExecutionModule) getTD(_ context.Context, tx kv.Tx, blockHash libcommon.Hash, blockNumber uint64) (*big.Int, error) { return rawdb.ReadTd(tx, blockHash, blockNumber) } @@ -338,7 +338,12 @@ func (e *EthereumExecutionModule) purgeBadChain(ctx context.Context, tx kv.RwTx, } func (e *EthereumExecutionModule) Start(ctx context.Context) { - e.semaphore.Acquire(ctx, 1) + if err := e.semaphore.Acquire(ctx, 1); err != nil { + if !errors.Is(err, context.Canceled) { + e.logger.Error("Could not start execution service", "err", err) + } + return + } defer e.semaphore.Release(1) if err := stages.ProcessFrozenBlocks(ctx, e.db, e.blockReader, e.executionPipeline, nil); err != nil { diff --git a/turbo/execution/eth1/inserters.go b/turbo/execution/eth1/inserters.go index c2900a9e475..b0310de4314 100644 --- a/turbo/execution/eth1/inserters.go +++ b/turbo/execution/eth1/inserters.go @@ -31,7 +31,7 @@ import ( "github.com/erigontech/erigon/turbo/execution/eth1/eth1_utils" ) -func (s *EthereumExecutionModule) validatePayloadBlobs(expectedBlobHashes []libcommon.Hash, transactions []types.Transaction, blobGasUsed uint64) error { +func (e *EthereumExecutionModule) validatePayloadBlobs(expectedBlobHashes []libcommon.Hash, transactions []types.Transaction, blobGasUsed uint64) error { if expectedBlobHashes == nil { return &rpc.InvalidParamsError{Message: "nil blob hashes array"} } @@ -39,11 +39,11 @@ func (s *EthereumExecutionModule) validatePayloadBlobs(expectedBlobHashes []libc for _, txn := range transactions { actualBlobHashes = append(actualBlobHashes, txn.GetBlobHashes()...) } - if len(actualBlobHashes) > int(s.config.GetMaxBlobsPerBlock()) || blobGasUsed > s.config.GetMaxBlobGasPerBlock() { + if len(actualBlobHashes) > int(e.config.GetMaxBlobsPerBlock()) || blobGasUsed > e.config.GetMaxBlobGasPerBlock() { return nil } if !reflect.DeepEqual(actualBlobHashes, expectedBlobHashes) { - s.logger.Warn("[NewPayload] mismatch in blob hashes", + e.logger.Warn("[NewPayload] mismatch in blob hashes", "expectedBlobHashes", expectedBlobHashes, "actualBlobHashes", actualBlobHashes) return nil }