Skip to content

Commit f24c6f0

Browse files
authored
Add max value size info
Adds a note on suggested rule of thumb for max storage value size.
1 parent 5416c44 commit f24c6f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

content/md/en/docs/build/runtime-storage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ You can use the FRAME storage data structures to read or write any value that ca
9898
The storage module provides the following types of storage structures:
9999

100100
- [StorageValue](https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageValue.html) to store any single value, such as a `u64`.
101+
- Note: As a rule of thumb you will want to avoid storing values over 16KiB under one key (see [here]([https://github.com/paritytech/substrate/pull/3126#issue-468524837](https://github.com/paritytech/substrate/issues/2966#issuecomment-510087309)) for the original analysis of effect on storage size on timings in RocksDb).
101102
- [StorageMap](https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageMap.html) to store a single key to value mapping, such as a specific account key to a specific balance value.
102103
- [StorageDoubleMap](https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageDoubleMap.html) to store values in a storage map with two keys as an optimization to efficiently remove all entries that have a common first key.
103104
- [StorageNMap](https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageNMap.html) to store values in a map with any arbitrary number of keys.

0 commit comments

Comments
 (0)