Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MLOAD/MSTORE Separation #53

Open
Tracked by #43
ControlCplusControlV opened this issue Dec 17, 2022 · 2 comments
Open
Tracked by #43

MLOAD/MSTORE Separation #53

ControlCplusControlV opened this issue Dec 17, 2022 · 2 comments

Comments

@ControlCplusControlV
Copy link
Owner

No description provided.

@ControlCplusControlV
Copy link
Owner Author

MLOAD/MSTORE Separation

Temporary variables that are stored in memory during compilation will start at an offset of 2^31. This is to avoid conflicts in memory addresses between mload/mstore and variables stored in memory during intermediate operations. Practically, this means that only memory space below 2^31 can be used for non-variable purposes (like a hash). However, variables stored in memory to avoid the EVM's stack too deep will be stored beyond 2^31.

The following opcodes will not be allowed to reach Memory locations beyond 2^31 or reference beyond that address. EXTCODECOPY, RETURNDATACOPY, CALLDATACOPY, SHA3, and CODECOPY.

@0xKitsune
Copy link
Collaborator

Lets run this one by the Miden team and see if they have any thoughts on this. With the recent changes to the VM there might be a preferred way to implement this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants