Skip to content

Warning

This project is in early development and is not production-ready. Use at your own risk.

CSMT haskell library and http service

CI Build and deploy documentation

What is CSMT?

This package provides (or will):

  • A Haskell library implementing a Compact Sparse Merkle Tree (CSMT) data structure with support for persistent storage backends. It offers efficient insertion, deletion, and proof generation functionalities, making it suitable for applications requiring verifiable data structures.
  • A CLI tool for interacting with the CSMT, allowing users to perform operations such as adding and removing elements, generating proofs, and verifying membership within the tree.
  • An HTTP service that exposes the CSMT functionalities via a RESTful API, enabling remote interaction with the tree for various applications.
  • A storage for the preimage of the hashes in sync with the CSMT tree.

Performance

Preliminary benchmarks indicate that the CSMT library sustains a throughput of 900 insertions per second on a standard development machine over a 3.5M cardano UTxOs dataset.

There is room for optimization via parallel insertions, but these results are promising for an initial implementation.

Status

  • Library
    • Insertion
    • Deletion
    • Proof generation
    • Proof verification
    • Persistent storage backend support
    • Comprehensive tests
    • Insertion benchmarks
    • Deletion benchmarks
    • Proof generation benchmarks
    • Proof verification benchmarks
    • Production grade tests
    • Raw key support (vs hashed keys)
    • Partial key support
  • CLI tool
    • Add elements
    • Remove elements
    • Query elements
    • Generate proofs
    • Verify membership
  • HTTP service
    • RESTful API for CSMT operations
    • Documentation of API endpoints