Skip to content

Conversation

@pirapira
Copy link
Member

@pirapira pirapira commented Sep 9, 2016

This commit adds notes to MLOAD, MSTORE and MSTORE8 specification saying the modulo is not considered when computing the new memory size.

Before this change, since the beginning of the table contains All arithmetic is modulo $2^{256}$ unless otherwise noted., the memory size computation was affected by the modulo computation too. For instance, MLOAD with the biggest uint256 didn't change the memory size most of the time.

By the way I checked that cpp-ethereum, go-ethereum and pyethereum all throw out-of-gas for such an instruction.

This commit adds notes to MLOAD, MSTORE and MSTORE8 specification
saying the modulo is not considered when computing the new memory
size.

Before this change, since the beginning of the table contains
`All arithmetic is modulo $2^{256}$ unless otherwise noted.`,
the memory size computation was affected by the modulo computation too.
For instance, MLOAD with the biggest uint256 didn't change the memory size
most of the time.
@gavofyork gavofyork merged commit 4ba4c6d into ethereum:master Sep 22, 2016
@pirapira pirapira deleted the no_modulo_mem_size branch December 27, 2016 17:36
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

Successfully merging this pull request may close these issues.

2 participants