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: eth: parse revert data #10295

Merged
merged 7 commits into from
Feb 17, 2023
Merged

feat: eth: parse revert data #10295

merged 7 commits into from
Feb 17, 2023

Conversation

Stebalien
Copy link
Member

Proposed Changes

Parse the revert data and include it in the error message of EthCall to improve degradability. We don't really want to do this in the FVM because it's Ethereum (solidity) specific, but this makes sense to do in the Ethereum API. It might also make sense to do in the EVM itself, but it's too late to consider that right now.

This change only applies to EthCall. The next step is to improve the error message output from EthEstimateGas.

Additional Info

See https://docs.soliditylang.org/en/latest/control-structures.html#panic-via-assert-and-error-via-require

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • Tests exist for new functionality or change in behavior
  • CI is green

@Stebalien Stebalien requested a review from a team as a code owner February 16, 2023 20:54
@Stebalien Stebalien requested a review from raulk February 16, 2023 20:56
node/impl/full/eth.go Outdated Show resolved Hide resolved
We don't really want to do this in the FVM because it's Ethereum
specific, but this makes sense to do in the Ethereum API.

See:

See https://docs.soliditylang.org/en/latest/control-structures.html#panic-via-assert-and-error-via-require
itests/fevm_test.go Outdated Show resolved Hide resolved
@Stebalien Stebalien enabled auto-merge (squash) February 17, 2023 00:59
@Stebalien Stebalien merged commit 00b6d06 into release/v1.20.0 Feb 17, 2023
@Stebalien Stebalien deleted the steb/parse-eth-revert branch February 17, 2023 01:18
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.

3 participants