forked from tendermint/tm-db
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Rename to CometBFT (tendermint#26)
* docs: Update README Signed-off-by: Thane Thomson <connect@thanethomson.com> * docs: Update contributing guidelines Signed-off-by: Thane Thomson <connect@thanethomson.com> * docs: Replace how_to_release doc with RELEASES in repo root Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove dead links from code Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use standard Apache 2.0 license Signed-off-by: Thane Thomson <connect@thanethomson.com> * Apply suggestions from code review Co-authored-by: Sergio Mena <sergio@informal.systems> * docs: Add fork notice to readme Signed-off-by: Thane Thomson <connect@thanethomson.com> * docs: Reshuffle some links Signed-off-by: Thane Thomson <connect@thanethomson.com> Signed-off-by: Thane Thomson <connect@thanethomson.com> Co-authored-by: Sergio Mena <sergio@informal.systems>
- Loading branch information
1 parent
2f2cde9
commit 0dd0299
Showing
7 changed files
with
93 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
# Contributing | ||
|
||
Thank you for your interest in contributing to tm-db! | ||
This repository follows the [contribution guidelines] of tendermint and the corresponding [coding repo]. | ||
Please take a look if you are not already familiar with those. | ||
Thank you for your interest in contributing to CometBFT DB! This repository | ||
follows the [contribution guidelines] of CometBFT - please take a look if you | ||
are not already familiar with those. | ||
|
||
[contribution guidelines]: https://github.com/tendermint/tendermint/blob/master/CONTRIBUTING.md | ||
[coding repo]: https://github.com/tendermint/coding | ||
[contribution guidelines]: https://github.com/cometbft/cometbft/blob/main/CONTRIBUTING.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,88 @@ | ||
# Tendermint DB | ||
# CometBFT DB | ||
|
||
[![version](https://img.shields.io/github/tag/tendermint/tm-db.svg)](https://github.com/tendermint/tm-db/releases/latest) | ||
[![license](https://img.shields.io/github/license/tendermint/tm-db.svg)](https://github.com/tendermint/tm-db/blob/master/LICENSE) | ||
[![API Reference](https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667)](https://pkg.go.dev/github.com/tendermint/tm-db) | ||
[![codecov](https://codecov.io/gh/tendermint/tm-db/branch/master/graph/badge.svg)](https://codecov.io/gh/tendermint/tm-db) | ||
![Lint](https://github.com/tendermint/tm-db/workflows/Lint/badge.svg?branch=master) | ||
![Test](https://github.com/tendermint/tm-db/workflows/Test/badge.svg?branch=master) | ||
[![Discord chat](https://img.shields.io/discord/669268347736686612.svg)](https://discord.gg/AzefAFd) | ||
[![version](https://img.shields.io/github/tag/cometbft/cometbft-db.svg)](https://github.com/cometbft/cometbft-db/releases/latest) | ||
[![license](https://img.shields.io/github/license/cometbft/cometbft-db.svg)](https://github.com/cometbft/cometbft-db/blob/main/LICENSE) | ||
[![API Reference](https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667)](https://pkg.go.dev/github.com/cometbft/cometbft-db) | ||
[![codecov](https://codecov.io/gh/cometbft/cometbft-db/branch/main/graph/badge.svg)](https://codecov.io/gh/cometbft/cometbft-db) | ||
![Lint](https://github.com/cometbft/cometbft-db/workflows/Lint/badge.svg?branch=main) | ||
![Test](https://github.com/cometbft/cometbft-db/workflows/Test/badge.svg?branch=main) | ||
|
||
Common database interface for various database backends. Primarily meant for applications built on [Tendermint](https://github.com/tendermint/tendermint), such as the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk), but can be used independently of these as well. | ||
A fork of [tm-db]. | ||
|
||
Common database interface for various database backends. Primarily meant for | ||
applications built on [CometBFT], such as the [Cosmos SDK]. | ||
|
||
**NB:** As per [cometbft/cometbft\#48], the CometBFT team plans on eventually | ||
totally deprecating and removing this library from CometBFT. As such, we do not | ||
recommend depending on this library for new projects. | ||
|
||
### Minimum Go Version | ||
|
||
Go 1.18+ | ||
|
||
## Supported Database Backends | ||
|
||
- **[GoLevelDB](https://github.com/syndtr/goleveldb) [stable]**: A pure Go implementation of [LevelDB](https://github.com/google/leveldb) (see below). Currently the default on-disk database used in the Cosmos SDK. | ||
|
||
- **MemDB [stable]:** An in-memory database using [Google's B-tree package](https://github.com/google/btree). Has very high performance both for reads, writes, and range scans, but is not durable and will lose all data on process exit. Does not support transactions. Suitable for e.g. caches, working sets, and tests. Used for [IAVL](https://github.com/tendermint/iavl) working sets when the pruning strategy allows it. | ||
|
||
- **[LevelDB](https://github.com/google/leveldb) [experimental]:** A [Go wrapper](https://github.com/jmhodges/levigo) around [LevelDB](https://github.com/google/leveldb). Uses LSM-trees for on-disk storage, which have good performance for write-heavy workloads, particularly on spinning disks, but requires periodic compaction to maintain decent read performance and reclaim disk space. Does not support transactions. | ||
- **[GoLevelDB](https://github.com/syndtr/goleveldb) [stable]**: A pure Go | ||
implementation of [LevelDB](https://github.com/google/leveldb) (see below). | ||
Currently the default on-disk database used in the Cosmos SDK. | ||
|
||
- **MemDB [stable]:** An in-memory database using [Google's B-tree | ||
package](https://github.com/google/btree). Has very high performance both for | ||
reads, writes, and range scans, but is not durable and will lose all data on | ||
process exit. Does not support transactions. Suitable for e.g. caches, working | ||
sets, and tests. Used for [IAVL](https://github.com/tendermint/iavl) working | ||
sets when the pruning strategy allows it. | ||
|
||
- **[LevelDB](https://github.com/google/leveldb) [experimental]:** A [Go | ||
wrapper](https://github.com/jmhodges/levigo) around | ||
[LevelDB](https://github.com/google/leveldb). Uses LSM-trees for on-disk | ||
storage, which have good performance for write-heavy workloads, particularly | ||
on spinning disks, but requires periodic compaction to maintain decent read | ||
performance and reclaim disk space. Does not support transactions. | ||
|
||
- **[BoltDB](https://github.com/etcd-io/bbolt) [experimental]:** A | ||
[fork](https://github.com/etcd-io/bbolt) of | ||
[BoltDB](https://github.com/boltdb/bolt). Uses B+trees for on-disk storage, | ||
which have good performance for read-heavy workloads and range scans. Supports | ||
serializable ACID transactions. | ||
|
||
- **[RocksDB](https://github.com/tecbot/gorocksdb) [experimental]:** A [Go | ||
wrapper](https://github.com/tecbot/gorocksdb) around | ||
[RocksDB](https://rocksdb.org). Similarly to LevelDB (above) it uses LSM-trees | ||
for on-disk storage, but is optimized for fast storage media such as SSDs and | ||
memory. Supports atomic transactions, but not full ACID transactions. | ||
|
||
- **[BadgerDB](https://github.com/dgraph-io/badger) [experimental]:** A | ||
key-value database written as a pure-Go alternative to e.g. LevelDB and | ||
RocksDB, with LSM-tree storage. Makes use of multiple goroutines for | ||
performance, and includes advanced features such as serializable ACID | ||
transactions, write batches, compression, and more. | ||
|
||
- **[BoltDB](https://github.com/etcd-io/bbolt) [experimental]:** A [fork](https://github.com/etcd-io/bbolt) of [BoltDB](https://github.com/boltdb/bolt). Uses B+trees for on-disk storage, which have good performance for read-heavy workloads and range scans. Supports serializable ACID transactions. | ||
## Meta-databases | ||
|
||
- **[RocksDB](https://github.com/tecbot/gorocksdb) [experimental]:** A [Go wrapper](https://github.com/tecbot/gorocksdb) around [RocksDB](https://rocksdb.org). Similarly to LevelDB (above) it uses LSM-trees for on-disk storage, but is optimized for fast storage media such as SSDs and memory. Supports atomic transactions, but not full ACID transactions. | ||
- **PrefixDB [stable]:** A database which wraps another database and uses a | ||
static prefix for all keys. This allows multiple logical databases to be | ||
stored in a common underlying databases by using different namespaces. Used by | ||
the Cosmos SDK to give different modules their own namespaced database in a | ||
single application database. | ||
|
||
- **[BadgerDB](https://github.com/dgraph-io/badger) [experimental]:** A key-value database written as a pure-Go alternative to e.g. LevelDB and RocksDB, with LSM-tree storage. Makes use of multiple goroutines for performance, and includes advanced features such as serializable ACID transactions, write batches, compression, and more. | ||
- **RemoteDB [experimental]:** A database that connects to distributed | ||
CometBFT db instances via [gRPC](https://grpc.io/). This can help with | ||
detaching difficult deployments such as LevelDB, and can also ease dependency | ||
management for CometBFT developers. | ||
|
||
## Meta-databases | ||
## Tests | ||
|
||
- **PrefixDB [stable]:** A database which wraps another database and uses a static prefix for all keys. This allows multiple logical databases to be stored in a common underlying databases by using different namespaces. Used by the Cosmos SDK to give different modules their own namespaced database in a single application database. | ||
To test common databases, run `make test`. If all databases are available on the | ||
local machine, use `make test-all` to test them all. | ||
|
||
- **RemoteDB [experimental]:** A database that connects to distributed Tendermint db instances via [gRPC](https://grpc.io/). This can help with detaching difficult deployments such as LevelDB, and can also ease dependency management for Tendermint developers. | ||
To test all databases within a Docker container, run: | ||
|
||
## Tests | ||
```bash | ||
make docker-test | ||
``` | ||
|
||
To test common databases, run `make test`. If all databases are available on the local machine, use `make test-all` to test them all. | ||
[tm-db]: https://github.com/tendermint/tm-db | ||
[CometBFT]: https://github.com/cometbft/cometbft-db | ||
[Cosmos SDK]: https://github.com/cosmos/cosmos-sdk | ||
[cometbft/cometbft\#48]: https://github.com/cometbft/cometbft/issues/48 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Releases | ||
|
||
This document provides a step-by-step guide for creating a release of CometBFT | ||
DB. | ||
|
||
1. Create a local branch `release/vX.X.X`, where `vX.X.X` corresponds to the | ||
version of the release you want to cut. | ||
2. Update and build the changelog on your local release branch. | ||
3. Submit a pull request from your release branch, targeting the `main` branch. | ||
4. Once approved and merged, tag the commit associated with the merged release | ||
branch. | ||
5. Create a [GitHub release] from the new tag, and include a link from the | ||
description to the heading associated with the new version in the changelog. | ||
|
||
[GitHub release]: https://docs.github.com/en/github/administering-a-repository/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters