Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix state override accessing state #8168

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

LukaszRozmej
Copy link
Member

@LukaszRozmej LukaszRozmej commented Feb 5, 2025

Fixes #8130 and #7945

Changes

  • Doesn't bother trying to revert state root on json rpc, resets environment before accessing it

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

eth_call/eth_estimateGas/eth_simulate/debug_traceXXX/trace_ fuzzing with state overrides

@LukaszRozmej LukaszRozmej requested review from alexb5dh, asdacap and kamilchodola and removed request for alexb5dh February 5, 2025 11:52
@@ -125,6 +122,7 @@ public GethLikeTxTrace Trace(Hash256 blockHash, int txIndex, GethTraceOptions op
if (tx.Hash is null) throw new InvalidOperationException("Cannot trace transactions without tx hash set.");

block = block.WithReplacedBodyCloned(BlockBody.WithOneTransactionOnly(tx));
using IOverridableTxProcessingScope? scope = _env.BuildAndOverride(block.Header, options.StateOverrides);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think scope needs to be nullable here and in other places.

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.

Gnosis mainnet : eth_call payload crashes with an error : System.InvalidOperationException
4 participants