Skip to content

Commit

Permalink
chore: address final comments
Browse files Browse the repository at this point in the history
  • Loading branch information
h5law committed Jan 3, 2024
1 parent 538dcb5 commit 58cc541
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 40 deletions.
39 changes: 0 additions & 39 deletions docs/kvstore.md

This file was deleted.

41 changes: 41 additions & 0 deletions docs/mapstore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# MapStore

<!-- toc -->

- [Implementations](#implementations)
* [SimpleMap](#simplemap)
* [BadgerV4](#badgerv4)

<!-- tocstop -->

The `MapStore` is a simple interface used by the SM(S)T to store, delete and
retrieve key-value pairs. It is intentionally simple and minimalistic so as to
enable different key-value engines to implement and back the trie database.

See: [the interface](../kvstore/interfaces.go) for a more detailed description
of the simple interface required by the SM(S)T.

## Implementations

### SimpleMap

`simplemap` is a simple kv-store shipped with the SM(S)T. The SMT library that
can be used without it as long as the selected node store adheres to the
`Mapstore` interface.

This library is recommended for development, testing and exploration purposes.

This library **SHOULD NOT** be used in production.

See [simplemap.go](../kvstore/simplemap/simplemap.go) for more details.

### BadgerV4

This library provides a wrapper around [dgraph-io/badger][badgerv4] to adhere
to the `MapStore` interface. See the [full documentation](./badger-store.md)
for additional functionality and implementation details.

See: [badger](../kvstore/badger/) for more details on the implementation of
this submodule.

[badgerv4]: https://github.com/dgraph-io/badger
2 changes: 1 addition & 1 deletion docs/smt.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ the [`kvstore`](../kvstore/) directory.
This library defines the `SimpleMap` interface which is implemented as an
extremely simple in-memory key-value store.

Although it is is a submodule, it is ideal for simple, testing or non-production
Although it is a submodule, it is ideal for simple, testing or non-production
use cases. It is used in the tests throughout the library.

See [simplemap.go](../kvstore/simplemap/simplemap.go) for the implementation
Expand Down

0 comments on commit 58cc541

Please sign in to comment.