Skip to content

eth_simulateV1 support #3622

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

Merged
merged 5 commits into from
Feb 19, 2025
Merged

eth_simulateV1 support #3622

merged 5 commits into from
Feb 19, 2025

Conversation

fselmo
Copy link
Collaborator

@fselmo fselmo commented Feb 18, 2025

What was wrong?

Though ethereum/execution-apis#484 has not yet been merged, many clients have already implemented eth_simulateV1. This PR adds support for eth_simulateV1 RPC endpoint requests with formatters and expected types.

Closes #3494

How was it fixed?

  • Add eth_simulateV1 support for eth and async_eth
  • Add related formatters and types
  • Add integration tests
  • [unrelated] Open up the typing for StateOverride type keys to better match TxParams: accepts str and Address in addition to ChecksumAddress. We already use formatters that turn these values into the checksum address.

Todo:

  • Clean up commit history
  • Add or update documentation related to these changes
  • Add entry to the release notes

Cute Animal Picture

Screenshot 2025-02-18 at 16 23 26

@fselmo fselmo changed the title Eth simulatev1 support eth_simulateV1 support Feb 18, 2025
- [unrelated] Open up the typing for ``StateOverride`` type to match
  ``to`` and ``from`` keys on ``TxParams``. Accept
  ``Union[str, Address, ChecksumAddress]`` for these similar types.

- Add sync and async ``eth_simulateV1`` RPC methods with integration
  tests against geth.

- Add related types and formatters for ``eth_simulateV1`` RPC method.
@fselmo fselmo force-pushed the eth_simulatev1-support branch from 800ab88 to e0f7e8b Compare February 18, 2025 23:06
@fselmo fselmo force-pushed the eth_simulatev1-support branch from 6abad0e to 2c48d3a Compare February 18, 2025 23:36
@fselmo fselmo requested review from kclowes, reedsa and pacrob February 18, 2025 23:37
@fselmo fselmo marked this pull request as ready for review February 18, 2025 23:38
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

This LGTM! The only thing I am wondering is if we should make it eth_simulate_v1? Feels the tiniest bit more pythonic imho, but I can definitely see either way so feel free to take it or leave it!

@fselmo
Copy link
Collaborator Author

fselmo commented Feb 19, 2025

This LGTM! The only thing I am wondering is if we should make it eth_simulate_v1? Feels the tiniest bit more pythonic imho, but I can definitely see either way so feel free to take it or leave it!

I did have it like that in the beginning and figured I'd copy the endpoint name but we do have get_block, etc... I think you're right. I'll put it back to eth_simulate_v1. I like that better.

@fselmo fselmo merged commit 59aefe0 into ethereum:main Feb 19, 2025
67 of 85 checks passed
fselmo added a commit that referenced this pull request Feb 19, 2025
@fselmo fselmo deleted the eth_simulatev1-support branch February 19, 2025 17:43
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.

Add support for eth_simulateV1
2 participants