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

Huge arg MODEXP calls in the Blockchain Reference Tests #1578

Open
letypequividelespoubelles opened this issue Nov 28, 2024 · 0 comments
Open
Labels
bug Something isn't working reference test

Comments

@letypequividelespoubelles
Copy link
Collaborator

letypequividelespoubelles commented Nov 28, 2024

in some ref tests, we get this failure:

"Final Scenario hasn't been set":
            [
                "idPrecomps_d4g0v0_London[London]",
                "modexp_d28g0v0_London[London]",
                "modexp_d29g0v0_London[London]",
                ...

This happens at commit time. The issue is that we shouldn't reach commit time for those tests, as we're calling MODEXP with more than 512 bytes arg, so the transaction should be popped. But as we don't have the pop mechanism for reference tests, we try to trace those transactions, and it fails.

Details

The transaction data of the failing test vectors in resources/ethereum-tests/GeneralStateTests/stPreCompiledContracts/modexp.json is

2:  "0x0000000000000000000000000000000000000000000000000000000000000000|0000000000000000000000000000000000000000000000000000000000000020|ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff|fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd",
28: "0x0000000000000000000000000000000000000000000000000000040000000000|0000000000000000000000000000000000000000000000000000000000000000|",
29: "0x0000000000000000000000000000000000000000000000000000000000000000|0000000000000000000000000000000000000000000000000000040000000000|",
30: "0x0000000000000000000000000000000000000000000000000000000000000000|8000000000000000000000000000000000000000000000000000000000000000|0000000000000000000000000000000000000000000000000000000000000000",
36: "0x00000000000000000000000000000000000000000000000000000000000000ff|2a1e530000000000000000000000000000000000000000000000000000000000|0000000000000000000000000000000000000000000000000000000000000000",
37: "0x0000000000000000000000000000000000000000000000000000000000000001|2000000000000000000000000000000000000000000000000000000000000020|0000000000000000000000000000000000000000000000000000000000000001|0000000000000000000000000000000000000000000000000000000000000000010001"

This yields the following malformed data (for Linea)

2:  mbs = 0xffffff..ffff > 512
28: bbs = 0x040000000000 > 512
29: ebs = 0x040000000000 > 512
30: ebs = 0x800000..0000 > 512
36: ebs = 0x2a1e53..0000 > 512
37: ebs = 0x200000..0020 > 512

More tests to exclude on this basis

The same issue also appears in

        "idPrecomps_d4g0v0_London[London]",
        "modexp_modsize0_returndatasize_d4g0v0_London[London]",
        "randomStatetest650_d0g0v0_London[London]"
@OlivierBBB OlivierBBB changed the title hugae arg modexp (>512 bytes) Huge arg MODEXP calls in the Blockchain Reference Tests Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reference test
Projects
None yet
Development

No branches or pull requests

1 participant