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

feat: add block and state overrides to TraceCall #4833

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

sunwavesun
Copy link

@sunwavesun sunwavesun commented Jan 17, 2025

Description

This PR introduces two new optional fields, BlockOverrides and StateOverrides, to the TraceCall method. These fields are designed to enhance the functionality of debug_traceCall.

Changes

BlockOverrides

  • Modifies the context in which the transactions of a given block are executed.
  • When overriding multiple blocks:
    • Block numbers must increment.
    • Skipping block numbers is allowed, and skipped blocks are included in the response.
    • Time across multiple blocks must be increasing. If time is not explicitly specified, it increments by one for each block.

StateOverrides

  • Provides an optional address-to-state mapping.
  • Each entry specifies some state to be ephemerally overridden before executing each block.

Notes

  • No breaking changes; these fields are optional and do not interfere with existing behavior.
  • For more details, refer to the geth documentations.

@sophoah
Copy link
Contributor

sophoah commented Jan 17, 2025

Hey @sunwavesun, can you develop the unit test ?

@sophoah sophoah requested review from Frozen and sophoah January 17, 2025 07:21
@sophoah
Copy link
Contributor

sophoah commented Feb 4, 2025

@sunwavesun could you rebase this PR with the latest dev and write the unit test ?

@sunwavesun
Copy link
Author

@sophoah yes, currently doing so. Will push the update tomorrow.

@sunwavesun sunwavesun self-assigned this Feb 4, 2025
tests: overrides unit tests
@sunwavesun sunwavesun changed the title Add BlockOverrides and StateOverrides fields to eth_call feat: add BlockOverrides and StateOverrides fields to TraceCall Feb 4, 2025
@sunwavesun sunwavesun changed the title feat: add BlockOverrides and StateOverrides fields to TraceCall feat: add block and state overrides to TraceCall Feb 4, 2025
@sunwavesun
Copy link
Author

@sophoah @Frozen unit tests are implemented and working as expected.

@sophoah
Copy link
Contributor

sophoah commented Feb 17, 2025

@mur-me

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