Menu

From RocksDB Pain to GraniteDB Gain: Building a Blockchain-First Storage Engine in Rust
πŸ“°

From RocksDB Pain to GraniteDB Gain: Building a Blockchain-First Storage Engine in Rust

DEV CommunityΒ·Altug TatlisuΒ·6 months ago
#8TPNZDm5
#rust#blockchain#database#enter#granitedb
Reading 0:00
15s threshold

Building Ferrous Network exposed the limits of general-purpose databases. Here's why I'm writing GraniteDB from scratch.

Hey folks, Altug here β€” founder of Ferrous Network , a Rust-based Bitcoin-like L1 blockchain that's live on testnet. Today I want to share a very specific dev story: how wrestling with RocksDB in production led me to start GraniteDB , a correctness-first storage engine designed specifically for blockchain state.

The Pain Point That Started It All

When building Ferrous, I needed persistent storage for:

UTXO set

Block index

Chain state

Mempool

RocksDB was the obvious choice. Battle-tested, performs great under pressure, used everywhere from Bitcoin to Kafka. Setup was straightforward:

cargo add rocksdb

Enter fullscreen mode

Exit fullscreen mode

But then reality hit. The load times drove me insane.

On first startup (especially IBD - Initial Block Download), I'd sit there watching compilation bars, Clang deps resolving, and RocksDB initializing... for minutes .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.