4

I am a beginner studying blockchain in Korea. Recently, I completed 100% synchronization of the goerli testnet using geth as my client. I want to visualize the chaindata/.sst files.

Also, I am curious about why Ethereum blockchain data is stored in NoSQL databases like LevelDB and RocksDB from a technical perspective.

Thank you in advance for providing a detailed response.

2 Answers 2

0

why Ethereum blockchain data is stored in NoSQL databases like LevelDB and RocksDB from a technical perspective.

The goal of the Ethereum is that a common server can handle the blockchain syncing. SQL would not be fast enough on a common server to sync the Ethereum chain data and would take an even more enormous amount of disk space.

LevelDB is very optimised for key-value lookups. However, even LevelDB is not fast enough and has issues with multi-level merkle trees. There are projects like Firewood by Avalanche and reth is exploring alternative databases.

0

Ethereum use case requires Authenticated Storage.

  • Users can verify the value returned by a node

  • Each read is returned with the value and a proof

The inner nodes of the tree are hashes of their children. Each key is part of a Merkle tree. The proof consists of the hashes of each node along the path from the root to the leaf containing the key.

The root is globally published, and thus any client receiving a value for a key can independently determine that the value it received is correct. Each write changes the hashes of all nodes along the path from the root to the leaf.

SQL database would be even more expensive to update the LSM-based key-value stores like leveldb that provide high write throughput.

Here is an interesting conference presentation with a slide deck that dives into how to improve the ethereum authenticated storage.

https://www.usenix.org/conference/hotstorage18/presentation/raju

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.