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

memory and storage model #877

Open
AnandK-2024 opened this issue Oct 8, 2022 · 1 comment
Open

memory and storage model #877

AnandK-2024 opened this issue Oct 8, 2022 · 1 comment

Comments

@AnandK-2024
Copy link

In Ethereum YP section 9.1 Basic:

The memory model is a simple word-addressed byte array but storage model is word addressable word array


but when I started understanding about word addressed part , everywhere i found bytes addressed rather than word-addressed.
if the aspect of word-addressed is directly releted to gas calculation, then it should be mentioned there.

for more proof reach out

@kodyfanz
Copy link
Contributor

kodyfanz commented Feb 6, 2024

The sentence The memory model is a simple word-addressed byte array should be understood as the memory model being a simple array where each addressable unit is a word, not a byte, and each word can consist of multiple bytes. The EVM operates on a stack-based architecture with a word size of 256 bits, significantly affecting how data is stored and manipulated. This implies a large addressable space, theoretically allowing for addresses up to $2^{256}-1$. However, the actual memory that can be used is subject to practical limitations such as gas costs and system constraints. Same for storage.

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

No branches or pull requests

2 participants