Skip to content

Conversation

@RogerPodacter
Copy link
Member

@RogerPodacter RogerPodacter commented Nov 4, 2025

Note

Plumbs a configured vm.Config (e.g., NoMaxCodeSize) into the miner and uses it for EVM execution during payload building for consistency with validation.

  • Backend (eth/backend.go)
    • Builds a vm.Config (preimage/witness/tracer, NoMaxCodeSize) and passes it into miner.New.
  • Miner (miner/miner.go, miner/worker.go)
    • Adds evmConfig to Miner; updates constructor to accept it.
    • Uses evmConfig when creating the EVM and applying transactions, aligning payload building with block validation (incl. beacon root processing).

Written by Cursor Bugbot for commit a4f5363. This will update automatically on new commits. Configure here.

@RogerPodacter RogerPodacter requested a review from Copilot November 4, 2025 21:11
@RogerPodacter RogerPodacter merged commit 180eef5 into ethscriptions Nov 4, 2025
5 of 6 checks passed
@RogerPodacter RogerPodacter deleted the large_contracts branch November 4, 2025 21:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the miner to use a configurable EVM configuration instead of a hardcoded empty vm.Config{}, ensuring consistency between block building and block validation. This addresses potential gas accounting discrepancies that could arise from using different EVM configurations during these two operations.

  • Added evmConfig field to the Miner struct to store the EVM execution configuration
  • Updated miner.New() constructor to accept and initialize the evmConfig parameter
  • Replaced hardcoded vm.Config{} instances in prepareWork and applyTransaction with the configured miner.evmConfig

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
miner/miner.go Added evmConfig field to Miner struct and updated New() constructor to accept and store the EVM configuration
miner/worker.go Replaced empty vm.Config{} with miner.evmConfig in prepareWork and applyTransaction methods
eth/backend.go Updated miner.New() call to pass the vmConfig used for blockchain initialization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants