From 6d605b1929610c6de4f54535b30db3a7b2c7723e Mon Sep 17 00:00:00 2001 From: Dominik Schmid Date: Thu, 30 May 2024 14:23:15 +0200 Subject: [PATCH] docs: changing the StorageMap description --- docs/architecture/accounts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/architecture/accounts.md b/docs/architecture/accounts.md index fecfb78d2..fdf170787 100644 --- a/docs/architecture/accounts.md +++ b/docs/architecture/accounts.md @@ -35,11 +35,11 @@ Storage for user-defined data that is composed of two components. 1. Storage slots: Users have access to `254` slots. Per slot, users can store a `word` (~32 bytes). Currently, we reserve slot `0` for the account owner's key and slot `255` for information about the storage layout. -2. Storage maps: Users requiring additional storage can use the second component a `StorageMap`. A storage map is a key-value store where both keys and values are `word`s (~32 bytes). Thus, a single storage map can store huge amounts of data. Under the hood, storage maps are implemented as Sparse Merkle trees, and the root of the roots of these trees are stored in storage slots. So, a single account can contain up to 254 `StorageMaps`. +2. Storage maps: Users requiring additional storage can use a `StorageMap`. A storage map is a key-value store where both keys and values are `word`s (~32 bytes). A single storage map can store huge amounts of data, each storage map can store `2^256` `word`s. Under the hood, storage maps are implemented as sparse Merkle trees of depth 64, and the roots of these trees are stored in storage slots. So, a single account can contain up to 254 `StorageMaps`. Note: it is better to use private accounts to store huge amounts of data. ### Nonce -A counter which increments whenever the account state changes. +A counter which increments whenever the account state changes. Nonce values must be strictly monotonically increasing and increment by any value smaller than `2^32` for every account update.