Skip to content

Commit

Permalink
docs: changing the StorageMap description
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik1999 committed May 30, 2024
1 parent 69a21c0 commit 6d605b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/architecture/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 6d605b1

Please sign in to comment.