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

ECDSA recover seems to be bugged in MEVM #131

Open
lazycoder1 opened this issue Sep 10, 2024 · 1 comment
Open

ECDSA recover seems to be bugged in MEVM #131

lazycoder1 opened this issue Sep 10, 2024 · 1 comment

Comments

@lazycoder1
Copy link

Describe the bug
We have deployed EIP 4337 contracts from https://github.com/eth-infinitism/account-abstraction
along with the Entry Point - contracts/core/EntryPoint.sol , we have also deployed SimpleAccount from the same repo - contracts/samples/SimpleAccount.sol

The signature validation https://github.com/eth-infinitism/account-abstraction/blob/f1c5c11b273b7ddae26bb20809419b33ccb8f043/contracts/samples/SimpleAccount.sol#L105 EDCSA.recover fails when executing transactions.

To Reproduce
Steps to reproduce the behavior:
To reproduce the error and test if it's breaking at that particular point, We deployed a slightly modified SimpleWallet that allows any external party to verify the wallet function individually.

We have written a test script ( in bun ).

  1. The script calls the validateSignature function independently - https://github.com/lazycoder1/entry-point-testing/blob/main/index.ts#L64
  2. The script also calls the entrypoint with the same input params where it breaks at the validateSignature call. - https://github.com/lazycoder1/entry-point-testing/blob/main/index.ts#L67

Steps to reproduce

  1. git clone repo - https://github.com/lazycoder1/entry-point-testing/tree/main git clone https://github.com/lazycoder1/entry-point-testing.git
  2. install dependencies bun i or pnpm i
  3. Add your PVT_KEY key in .env PVT_KEY=0xabdc... . private key which has some move test tokens in it.
  4. Run the script bun run index.ts

Expected behaviour
Ideally, both cases need to pass the signature test, but one fails ECDSA.recover and the other passes ECDSA.recover call.

Additional context
Do reach out to me in telegram @lazyc0der1 or lazycoder#9108 in discord. We can get a call to additional details too !

@lazycoder1
Copy link
Author

Moved the ticket from movementlabsxyz/movement#305 to this repo

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

No branches or pull requests

1 participant