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

Practical Memory Limit is 32bits ? #265

Closed
DavePearce opened this issue Sep 8, 2022 · 2 comments
Closed

Practical Memory Limit is 32bits ? #265

DavePearce opened this issue Sep 8, 2022 · 2 comments
Labels
observation A useful observation (perhaps for further discussion)

Comments

@DavePearce
Copy link
Collaborator

DavePearce commented Sep 8, 2022

The main points:

  • (Actual) The translation of sequences in Dafny is limited to 32bits (e.g. 2^32) because (presumably) it uses an array under the hood (and Java's arrays are similarly limited). See #2859

  • (Enforced) Currently, memory is limited to 256bits through Dafny verification. However, from a verification perspective, such a limit is not even required (see Remove Redundant Memory Checks #250). But, in practice, some of the GeneralStateTests push up to that limit (e.g. vmLogTests/log0).

This means the "verified" EVM can crash at runtime when memory is expanded beyond 32bits.

@DavePearce DavePearce added the observation A useful observation (perhaps for further discussion) label Sep 8, 2022
@DavePearce
Copy link
Collaborator Author

There are some possible options here. We could support an effective array upto 64bits, for example. Or, just impose a limit on usable memory, beyond which its just always zero.

@DavePearce
Copy link
Collaborator Author

DavePearce commented Sep 11, 2022

Should we file a Dafny bug for this? I couldn't find anything there after a quick look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
observation A useful observation (perhaps for further discussion)
Projects
None yet
Development

No branches or pull requests

1 participant