Skip to content

Commit

Permalink
Changing defaults in data storage formats (#1596)
Browse files Browse the repository at this point in the history
* changing defaults in data storage formats 

Signed-off-by: Matt Nelson <85905982+non-fungible-nelson@users.noreply.github.com>

* Update docs/public-networks/concepts/data-storage-formats.md

Signed-off-by: Alexandra Tran Carrillo <12214231+alexandratran@users.noreply.github.com>

---------

Signed-off-by: Matt Nelson <85905982+non-fungible-nelson@users.noreply.github.com>
Signed-off-by: Alexandra Tran Carrillo <12214231+alexandratran@users.noreply.github.com>
Co-authored-by: Alexandra Tran Carrillo <12214231+alexandratran@users.noreply.github.com>
  • Loading branch information
non-fungible-nelson and alexandratran authored May 17, 2024
1 parent e88370c commit 1c0c593
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/public-networks/concepts/data-storage-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Besu offers two formats for storing the world state, [Bonsai Tries](#bonsai-trie

## Bonsai Tries

Bonsai Tries is a data storage layout policy designed to reduce storage requirements and increase read performance.
Bonsai Tries is a data storage layout policy designed to reduce storage requirements and increase read performance. This is the default for Besu.

Bonsai stores leaf values in a trie log, separate from the branches of the trie. Bonsai stores nodes by the location of the node instead of the hash of the node. Bonsai can access the leaf from the underlying storage directly using the account key. This greatly reduces the disk space needed for storage and allows for less resource-demanding and faster read performance. Bonsai inherently prunes orphaned nodes and old branches.

Expand All @@ -31,7 +31,7 @@ Bonsai is designed for retrieving recent data only.

## Forest of Tries

Forest of Tries, also called forest mode, is the default storage format.
Forest of Tries, also called forest mode, is another method of representing the world state, and is more suitable for [archive nodes](../get-started/connect/sync-node.md#run-an-archive-node).

In forest mode, each node in the trie is saved in a key-value store by hash. For each block, the world state is updated with new nodes, leaf nodes, and a new state root. Old leaf nodes remain in the underlying data store. Data is accessed and stored by hash, which increases the size of the database and increases the resources and time needed to access account data.

Expand Down

0 comments on commit 1c0c593

Please sign in to comment.