Skip to content

Conversation

@canepat
Copy link
Member

@canepat canepat commented Jun 26, 2025

Implementation of eth_simulateV1 as specified here, there are also some additional notes specifically for it.

Closes #9881

Additional Changes

  • allow nonce override in ethapi.ToMessage
  • avoid chain ID derivation from v in ethapi.NewRPCTransaction for call simulation (i.e. where v is zero)
  • add BlobGasUsed field in types.Receiptand extract core.MakeReceipt to avoid duplicating the receipt creation
  • extend jsonrpc.BlockOverrides to cover more fields and fix JSON tags to match Geth's ones
  • define more RPC error codes

RPC Tests

Known Issues

  • stateRoot mismatch in simulated blocks at latest state (4 tests are currently disabled for this reason)

@canepat canepat force-pushed the canepat/eth_simulateV1 branch from 826d5bc to 9d88f1c Compare August 29, 2025 08:43
@canepat canepat force-pushed the canepat/eth_simulateV1 branch 4 times, most recently from 8d4f7a6 to 065ab12 Compare September 19, 2025 09:16
@canepat canepat force-pushed the canepat/eth_simulateV1 branch 2 times, most recently from c85dcc7 to ff60892 Compare September 24, 2025 15:43
@canepat canepat marked this pull request as ready for review September 24, 2025 17:36
@canepat canepat force-pushed the canepat/eth_simulateV1 branch from ff60892 to c02892f Compare September 26, 2025 08:15
@canepat canepat merged commit 4b70ae6 into main Sep 26, 2025
18 checks passed
@canepat canepat deleted the canepat/eth_simulateV1 branch September 26, 2025 08:51
NazariiDenha pushed a commit that referenced this pull request Oct 24, 2025
Implementation of `eth_simulateV1` as specified
[here](https://ethereum.github.io/execution-apis/api-documentation/),
there are also some additional notes [specifically for
it](https://ethereum.github.io/execution-apis/ethsimulatev1-notes/).

Closes #9881

*Additional Changes*
- allow `nonce` override in `ethapi.ToMessage`
- avoid chain ID derivation from `v` in `ethapi.NewRPCTransaction` for
call simulation (i.e. where `v` is zero)
- add `BlobGasUsed` field in `types.Receipt`and extract
`core.MakeReceipt` to avoid duplicating the receipt creation
- extend `jsonrpc.BlockOverrides` to cover more fields and fix JSON tags
to match Geth's ones
- define more RPC error codes

*RPC Tests*
- erigontech/rpc-tests#459

*Known Issues*
- `stateRoot` mismatch in simulated blocks at latest state (4 tests are
currently disabled for this reason)
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.

implement eth_simulate api

3 participants