From 61be78b42af875b43e58eaea502835715600ed64 Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Mon, 18 Mar 2019 14:20:47 +0100 Subject: [PATCH] Adding populus gotcha covering storage costs --- docs/introduction-to-smart-contracts.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst index bfce0d5a3..8675474a7 100644 --- a/docs/introduction-to-smart-contracts.rst +++ b/docs/introduction-to-smart-contracts.rst @@ -388,7 +388,9 @@ Each account has a data area called **storage**, which is persistent between fun 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. +comparatively costly to read, and even more to modify storage. Because of this cost, +you should minimise 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