diff --git a/docs/kvstore.md b/docs/kvstore.md deleted file mode 100644 index d2de87c..0000000 --- a/docs/kvstore.md +++ /dev/null @@ -1,39 +0,0 @@ -# MapStore - - - -- [Implementations](#implementations) - * [SimpleMap](#simplemap) - * [BadgerV4](#badgerv4) - - - -The `MapStore` is a simple interface used by the SM(S)T to store, delete and -retrieve key-value pairs. Due to its simplicity and more complex key-value -databases that implement it can be used in its place as the node store for a -trie. - -See: [the interface](../kvstore/interfaces.go) for a more detailed description -of the simple interface required by the SM(S)T. - -## Implementations - -### SimpleMap - -The `simplemap` is a simple kv-store shipped with the SM(S)T. But as a -submodule the library (the SMT) can be used without it. As long as the node -store provided to the SMT adheres to the `MapStore` interface **anything** can -be used. - -This is recommemded for simple, testing purposes or non-production usage. - -See [simplemap.go](../kvstore/simplemap/simplemap.go) for more details. - -### BadgerV4 - -As documented in the [badger](./badger-store.md) documentation the interface -implements the `MapStore` interface as well as many other methods, and offers -persistence. - -See: [badger](../kvstore/badger/) for more details on the implementation of -this submodule. diff --git a/docs/mapstore.md b/docs/mapstore.md new file mode 100644 index 0000000..a47c670 --- /dev/null +++ b/docs/mapstore.md @@ -0,0 +1,41 @@ +# MapStore + + + +- [Implementations](#implementations) + * [SimpleMap](#simplemap) + * [BadgerV4](#badgerv4) + + + +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 diff --git a/docs/smt.md b/docs/smt.md index 5cf1938..31a0509 100644 --- a/docs/smt.md +++ b/docs/smt.md @@ -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