State Database
Last updated
Last updated
The State Database (State DB) is responsible for storing and managing blockchain state, including account balances, smart contract storage, and other critical on-chain data. It ensures efficient access and updates to state data while maintaining security and integrity through cryptographic structures.
Ethereum and other EVM-based chains struggle with state access, in fact it's the biggest limiting factor hindering Ethereum's TPS:
Slow Reads/Writes: Every transaction requires multiple state lookups and modifications, known as 'read amplification' ( to be exact, where n is the number of items in global state).
Expensive Merklization: Recalculating Merkle trees adds significant computational overhead.
High Update Latency: Deep trie structures slow down transaction execution.
Solana sidesteps this by avoiding merklization altogether, prioritizing raw performance over cryptographic proof availability with its usage of Concurrent Merkle Trees. This approach sacrifices trust-minimized state verification, making light clients and rollups harder to support. You can read more about Solana's state growth problem on Anatoly Yakovenko's blog.
Rollups rely on cryptographic proofs to inherit L1 security. Merkle trees allow rollups to efficiently verify state updates and generate fraud or validity proofs. Without merklization, proving state correctness to L1s becomes infeasible.
Additionally, merklization enables light clients, which verify state transitions without storing full data. Ethereum’s Merkle Patricia Tree (MPT) supports this, while Solana does not. However, Bullet bridges this gap—delivering Solana-level performance while ensuring verifiability for rollups!
Bullet currently uses JMT, developed by Diem (Meta). JMT improves on Ethereum’s MPT with a sparse Merkle tree, making updates more efficient. However, it still has its limitations at the scales and latencies we are building for.
In the coming months we're moving to NOMT, a cutting-edge state DB designed by Preston Evans of Sovereign Labs, and built in collaboration with Polkadot’s Robert Habermeier. This is ideal for high-throughput rollups as it excels in:
Reducing Merklization Overhead: Unlike traditional Merkle trees that require multiple hash recalculations per state update, NOMT significantly reduces redundant hashing by restructuring how state updates propagate through the tree. This allows faster inclusion proofs without compromising cryptographic integrity.
Optimizing State Access: Ethereum's MPT suffers from inefficient key-value storage, leading to deep trie traversals. NOMT restructures state storage to minimize depth, reducing lookup latency and improving worst-case access performance. This allows rollups like Bullet to handle state updates in near-constant time, independent of the state’s size.
Efficient Caching & SSD Layouts: NOMT integrates a more cache-efficient design, reducing redundant disk reads by aligning state updates with SSD-friendly access patterns. Instead of frequent small writes that degrade performance, NOMT batches updates into sequential disk writes and makes heavy use of pipelining to maximise SSD throughput. This is a major improvement over traditional state DBs that suffer from excessive random access penalties.
Scaling for High TPS: NOMT can comfortably sustain 40,000 TPS with 128M accounts, even under worst-case random access patterns. This is a massive leap over JMT, where performance degrades as state size increases.
Unlike Ethereum rollups, which are constrained by slow state access, Bullet will not be state DB bottlenecked.