-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
ecpairing precompile decoding is incorrect #5337
Comments
We were using the definitions from evm.codes and looks like it was incorrect there, see smlxl/evm.codes#236 This is a simple fix, just renaming the parameters correctly, if anybody wants to take this on 🙂 |
It's a bit more complicated than renaming. The number of variables itself is dynamic. Note that precompile contracts do not follow ABI encoding rules, and for this one and As it is right now, when you have a Groth16 pairing check it looks like this:
But this is missing most of the data. The actual calldata is:
I don't care much about the variable names, but I do care about being able to see all the calldata. |
Sorry to necro this, but I still get i'm running |
Not related at all, that error is an |
Ah I see, thanks for your help and quick response! |
Component
Forge, Other (please describe)
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (c78a811 2023-07-08T00:13:27.174343000Z)
What command(s) is the bug in?
forge test
Operating System
macOS (Apple Silicon)
Describe the bug
foundry/evm/src/trace/decoder.rs
Line 130 in c78a811
I'm not sure where
x1, y1, x3, x2, y3, y2
comes from, but it's there.The ecpairing interface doesn't follow the ABI standard strictly and is
((x, y), ((x0, x1), (y0, y1)))*
. See eip-197.The text was updated successfully, but these errors were encountered: