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: Enhance Error Resolution EVM #1758

Merged
merged 4 commits into from
Mar 6, 2024
Merged

Conversation

mustermeiszer
Copy link
Collaborator

Description

Currently, the EVM does never error out if the execution of the EVM failed for some reason. In most case it will be an active Revert faced from some checks on the EVM side.

But Substrate does not see that. It will only see an okay, resulting in wrong assumptions.

NOTE:
This change does mean that the EVM side DOES change but the Substrate side is still transactional. In most cases the EVM side will only contain fee-payment and new Pending appends.

Changes and Descriptions

  • Check last Pending to fetch status code of transaction

Checklist:

  • I have added Rust doc comments to structs, enums, traits and functions
  • I have made corresponding changes to the documentation
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works

@mustermeiszer mustermeiszer requested review from cdamian and wischli March 4, 2024 12:43
@mustermeiszer mustermeiszer added the D2-notify Pull request can be merged and notification about changes should be documented. label Mar 4, 2024
cdamian
cdamian previously approved these changes Mar 4, 2024
Copy link
Contributor

@cdamian cdamian left a comment

Choose a reason for hiding this comment

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

Nice to finally have a way of seeing EVM execution errors.

wischli
wischli previously approved these changes Mar 4, 2024
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

LGTM! Minor nit on the possibility of deconstructing the Pending tuple. Certainly not a blocker. Thanks for dealing with this so quickly 🚀

pallets/ethereum-transaction/src/lib.rs Outdated Show resolved Hide resolved
@mustermeiszer mustermeiszer dismissed stale reviews from wischli and cdamian via 48931d5 March 4, 2024 14:21
@mustermeiszer mustermeiszer enabled auto-merge (squash) March 4, 2024 14:21
cdamian
cdamian previously approved these changes Mar 4, 2024
wischli
wischli previously approved these changes Mar 4, 2024
Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

Thanks for satisfying the pedantic of the team 🥇

@mustermeiszer
Copy link
Collaborator Author

@cdamian any idea how you would fix the test without not calling send on the routers? Do you think we need a dummy contract or can we get around that?

@cdamian
Copy link
Contributor

cdamian commented Mar 5, 2024

@cdamian any idea how you would fix the test without not calling send on the routers? Do you think we need a dummy contract or can we get around that?

@mustermeiszer we might need a dummy contract, but lemme grab this branch and take a closer look.

@mustermeiszer
Copy link
Collaborator Author

Maybe we can mock the ethereum calling logic

@cdamian
Copy link
Contributor

cdamian commented Mar 5, 2024

#1760 has a fix for the current test failures.

@cdamian cdamian dismissed stale reviews from wischli and themself via 10344dc March 5, 2024 14:32
Copy link
Contributor

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

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

Cool change!

@mustermeiszer mustermeiszer merged commit ad978e1 into main Mar 6, 2024
9 checks passed
@cdamian cdamian deleted the feat/error-resolution-evm branch March 6, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D2-notify Pull request can be merged and notification about changes should be documented.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants