Merge pull request #6312 from ethereum/wip/docs-populus-storage-costs

[DOCS] Add details to storage costs
This commit is contained in:
chriseth 2019-03-25 11:49:07 +01:00 committed by GitHub
commit e3fe365488
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -387,8 +387,10 @@ paragraphs.
Each account has a data area called **storage**, which is persistent between function calls
and transactions.
Storage is a key-value store that maps 256-bit words to 256-bit words.
It is not possible to enumerate storage from within a contract and it is
comparatively costly to read, and even more to modify storage.
It is not possible to enumerate storage from within a contract, it is
comparatively costly to read, and even more to initialise and modify storage. Because of this cost,
you should minimize what you store in persistent storage to what the contract needs to run.
Store data like derived calculations, caching, and aggregates outside of the contract.
A contract can neither read nor write to any storage apart from its own.
The second data area is called **memory**, of which a contract obtains