Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pokt-network/smt
A Go library that implements a Sparse Merkle Trie for a key-value map.
https://github.com/pokt-network/smt
key-value-store sparse-merkle-sum-trie sparse-merkle-tree sparse-merkle-trie sum-tree trie
Last synced: 4 days ago
JSON representation
A Go library that implements a Sparse Merkle Trie for a key-value map.
- Host: GitHub
- URL: https://github.com/pokt-network/smt
- Owner: pokt-network
- License: other
- Created: 2023-02-25T20:20:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-22T17:52:31.000Z (3 months ago)
- Last Synced: 2024-08-23T13:07:05.834Z (3 months ago)
- Topics: key-value-store, sparse-merkle-sum-trie, sparse-merkle-tree, sparse-merkle-trie, sum-tree, trie
- Language: Go
- Homepage: https://pkg.go.dev/github.com/pokt-network/smt
- Size: 4.15 MB
- Stars: 16
- Watchers: 12
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audits/240612_Thesis_Defense-Pokt_Network_Sparse_Merkel_Tree_Security_Audit_Report.pdf
Awesome Lists containing this project
- awesome-ccamel - pokt-network/smt - A Go library that implements a Sparse Merkle Trie for a key-value map. (Go)
README
# smt
[![Tag](https://img.shields.io/github/v/tag/pokt-network/smt.svg?sort=semver)](https://img.shields.io/github/v/tag/pokt-network/smt.svg?sort=semver)
[![GoDoc](https://godoc.org/github.com/pokt-network/smt?status.svg)](https://godoc.org/github.com/pokt-network/smt)
![Go Version](https://img.shields.io/github/go-mod/go-version/pokt-network/smt)
[![Go Report Card](https://goreportcard.com/badge/github.com/pokt-network/smt)](https://goreportcard.com/report/github.com/pokt-network/smt)
[![Tests](https://github.com/pokt-network/smt/actions/workflows/test.yml/badge.svg)](https://github.com/pokt-network/smt/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/pokt-network/smt/branch/main/graph/badge.svg)](https://codecov.io/gh/pokt-network/smt)- [Overview](#overview)
- [Documentation](#documentation)
- [Tests](#tests)
- [Benchmarks](#benchmarks)
- [Release Tags](#release-tags)
- [Tagging a new release](#tagging-a-new-release)
- [Push and Release](#push-and-release)**NOTE: Requires Go 1.20.12+**
## Overview
This is a Go library that implements a Sparse Merkle Trie for a key-value map.
The trie implements the same optimisations specified in the [Libra whitepaper],
to reduce the number of hash operations required per trie operation to $O(k)$
where $k$ is the number of non-empty elements in the trie. And is implemented
in a similar way to the [JMT whitepaper], with additional features and proof
mechanics.## Documentation
Documentation for the different aspects of this library, the trie, proofs and
all its different components can be found in the [docs](./docs/) directory.## Tests
To run all tests (excluding benchmarks) run the following command:
```sh
make test_all
```To test the `badger` submodule that provides a more fully featured key-value
store, run the following command:```sh
make test_badger
```## Benchmarks
To run the full suite of benchmarks simply run the following command:
```sh
make benchmark_all
```To view pre-ran results of the entire benchmarking suite see
[benchmarks](./docs/benchmarks.md)[jmt whitepaper]: https://developers.diem.com/papers/jellyfish-merkle-tree/2021-01-14.pdf
[libra whitepaper]: https://diem-developers-components.netlify.app/papers/the-diem-blockchain/2020-05-26.pdf## Release Tags
You can tag and publish a new release by following the instructions bellow.
### Tagging a new release
For a bug fix:
```bash
make tag_bug_fix
```For a minor release run:
```bash
make tag_minor_release
```### Push and Release
Then, push the tag to the repository:
```bash
git push origin v
```Create a release on GitHub with the tag and the release notes [here](https://github.com/pokt-network/smt/releases/new).