Skip to content

proxy: add evm based functionality #3454

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 3 commits into from
Jul 8, 2025
Merged

proxy: add evm based functionality #3454

merged 3 commits into from
Jul 8, 2025

Conversation

chirag-parmar
Copy link
Contributor

@chirag-parmar chirag-parmar commented Jul 7, 2025

related: #3100

adds evm bases RPC calls - eth_call, eth_estimateGas and eth_createAccessList

meta issue: #3101

@chirag-parmar chirag-parmar changed the title eth-call proxy: add evm based functionality Jul 7, 2025
@chirag-parmar chirag-parmar marked this pull request as draft July 7, 2025 12:00
@chirag-parmar chirag-parmar marked this pull request as ready for review July 8, 2025 05:18

let callResult = (await vp.evm.call(header, tx, optimisticStateFetch)).valueOr:
raise newException(ValueError, error)

Copy link
Contributor

Choose a reason for hiding this comment

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

You may want to add something like this to better handle the revert scenario:
https://github.com/status-im/nimbus-eth1/pull/3391/files#diff-eba712bc02a7203c0d7e0f5a52d9a85763dd9c523bcf1a24a8b8068ba7fb8068

    if callResult.error.len() > 0:
      raise (ref ApplicationError)(
        code: 3,
        msg: callResult.error,
        data: Opt.some(JsonString("\"" & callResult.output.to0xHex() & "\"")),
      )

This was added into the Nimbus Portal eth_call RPC a while back.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted. #3101 added error handling to the meta issue

@chirag-parmar chirag-parmar enabled auto-merge (squash) July 8, 2025 08:50
@chirag-parmar chirag-parmar disabled auto-merge July 8, 2025 08:50
@chirag-parmar chirag-parmar merged commit cc4ee6f into master Jul 8, 2025
12 checks passed
@chirag-parmar chirag-parmar deleted the vp-call branch July 8, 2025 08:50
@bhartnett
Copy link
Contributor

@chirag-parmar The performance of these RPC endpoints that use the Async EVM without caching will be rather slow so I would prioritize getting that caching change in.

Have you tested/tried running eth_call to see how it performs with the changes in this PR?

@chirag-parmar
Copy link
Contributor Author

I ran a couple of manual tests but mostly for in memory blocks. But I agree, caching is high priority. Currently working on that

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