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

MTCannon: fix AssertEVMReverts. #12198

Closed
joohhnnn opened this issue Sep 29, 2024 · 0 comments
Closed

MTCannon: fix AssertEVMReverts. #12198

joohhnnn opened this issue Sep 29, 2024 · 0 comments
Assignees
Labels
A-cannon Area: cannon MT cannon - testnet relevant issues needed to complete the work for our testnet

Comments

@joohhnnn
Copy link
Contributor

joohhnnn commented Sep 29, 2024

The current implementation of AssertEVMReverts constructs only memProof without building threadWitness, leading to incomplete data for the entire step. For instance, the TestEVMFault test using AssertEVMReverts aims to test for an invalid instruction error in the EVM (MIPS), but the actual error triggered in the EVM is a check that there is enough calldata or invalid thread witness due to incorrect construction of data. This error went undetected because AssertEVMReverts does not verify the actual revert reason.
image
image

To address this issue, I propose a two-step fix:

  1. Modify AssertEVMReverts to correctly construct data related to threadWitness.
  2. Add a parameter(expectedReason) to AssertEVMReverts to enable verification of the specific EVM revert information and update the tests that use AssertEVMReverts.

This fix will be implemented across two separate PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cannon Area: cannon MT cannon - testnet relevant issues needed to complete the work for our testnet
Development

No branches or pull requests

2 participants