GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - thrumdev/nomt: Super-fast Merklized Embedded Key-Value Store for blockchain nodes

BranchesTags
Open more actions menu

Latest commit

 

History

1,008 Commits
1,008 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
benchtop
benchtop
 
 
core
core
 
 
docs
docs
 
 
examples
examples
 
 
fuzz
fuzz
 
 
nomt-test-utils
nomt-test-utils
 
 
nomt
nomt
 
 
torture
torture
 
 
trickfs
trickfs
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE-APACHE
LICENSE-APACHE
 
 
LICENSE-MIT
LICENSE-MIT
 
 
README.md
README.md
 
 

Repository files navigation

NOMT: Nearly Optimal Merkle Trie

An implementation of a novel binary Merkle Trie and DB, written in Rust.

NOMT is an embedded key-value store that maintains a Merklized representation of key-value pairs with a simple key-value API, powering high throughput authenticated commits with billions of key-value pairs on relatively inexpensive hardware. It is largely designed for use in a blockchain setting as a drop-in replacement for RocksDB, MDBX, LevelDB, or ParityDB.

NOMT is optimized for fast random lookups of values, fast merkle tree updates, and fast writeout. It supports the generation of Merkle multiproofs for large batches of changes.

NOMT is designed to take advantage of hardware improvements in Solid State Drives (SSDs) using NVMe and Linux's io-uring API for asynchronous I/O. NOMT adequately supports generic Unix as well as macOS for daily development and testing, but primarily targets Linux for performance. The impressive trend in performance and capacity in modern SSDs enables us to build a DB that scales along with the hardware.

NOMT exposes a many-readers-one-writer API organized around batch transactions referred to as Sessions. Predictable performance in a metered execution environment is a key goal of NOMT, and therefore only one Session may be live at a time.

Project Structure

NOMT: Project Root.
├──benchtop: A benchmarking tool for NOMT.
|--core: Core logic, primarily for verifying and updating the NOMT.
|--docs: Documentation
|--fuzz: Fuzzing suite.
├──examples: Various examples of using NOMT.
│   ├── commit_batch: Demonstration of a simple commit.
│   ├── read_value: Reading a value from the NOMT.
│   ├── witness_verification: Demonstration of how to verify a witness in a light-client setting.
|--nomt: Implementation of the NOMT database.
|──torture: Extensive testing suite for NOMT.
|--trickfs: A FUSE filesystem aiding deeper testing. Experimental.
│   ├──trickmnt: A tool that allows mounting trickfs.

Architecture

Internally, NOMT consists of two parallel stores, Beatree and Bitbox. Beatree stores raw key-value pairs and is based around a B-Tree variant optimized for stable, fast random access patterns and high-entropy keys. Bitbox stores a custom sparse binary merkle tree in an on-disk hashtable in a format amenable to SSDs.

For more information on NOMT, the thesis behind it, and performance targets, see this November 2024 presentation by @rphmeier or view the slides here.

We have built a benchmarking tool, benchtop, which is located in the benchtop directory as a separate subcrate.

Contributing

See CONTRIBUTING.md.

If you would like to discuss the development of NOMT or follow along with contributor discussions, join the official Telegram Channel.

Acknowledgements

The development of this project is supported financially by Sovereign Labs, creators of the Sovereign SDK. The idea for this project originated in this post by Preston Evans.

About

Super-fast Merklized Embedded Key-Value Store for blockchain nodes

Resources

Readme

Contributing

Contributing
Activity
Custom properties

Stars

328 stars

Watchers

2 watching

Forks

36 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.