mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6312 from ethereum/wip/docs-populus-storage-costs
[DOCS] Add details to storage costs
This commit is contained in:
commit
e3fe365488
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user