Skip to content

Conversation

@dhil
Copy link
Contributor

@dhil dhil commented Oct 22, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 22, 2025 15:26
@dhil dhil marked this pull request as draft October 22, 2025 15:26
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 refactors the state override mechanism for eth_call to apply overrides directly to original account states during State object construction, rather than applying them after construction. This ensures that tracers (PreState and StateDiff) capture the correct pre-execution state including overrides.

Key Changes:

  • Moved state override application logic from eth_call.cpp into the State constructor
  • Added a new templated State constructor that accepts state overrides as a parameter
  • Modified state overrides to work directly with OriginalAccountState instead of using state mutation methods

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
category/rpc/eth_call.cpp Simplified to use new State constructor with state overrides parameter
category/execution/ethereum/state3/state.hpp Added templated constructor that applies state overrides to original account states
category/rpc/eth_call_test.cpp Added test validating PreState and StateDiff tracers with state overrides

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dhil dhil requested a review from Baltoli October 22, 2025 16:11
@dhil dhil force-pushed the dhil/prestate-overrides branch 5 times, most recently from 5b55631 to 76cc85b Compare October 28, 2025 18:03
@dhil dhil marked this pull request as ready for review October 28, 2025 18:03
@dhil dhil force-pushed the dhil/prestate-overrides branch from 76cc85b to 359df1d Compare October 29, 2025 08:44
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