document db_backend param better

This commit is contained in:
Anton Kaliaev
2019-05-06 23:47:54 +04:00
parent 00c00074de
commit 956d0552a4
4 changed files with 41 additions and 10 deletions

View File

@@ -153,7 +153,18 @@ type BaseConfig struct {
// and verifying their commits
FastSync bool `mapstructure:"fast_sync"`
// Database backend: leveldb | memdb | cleveldb
// Database backend: goleveldb | cleveldb | boltdb
// * goleveldb (github.com/syndtr/goleveldb - most popular implementation)
// - pure go
// - stable
// * cleveldb (uses levigo wrapper)
// - fast
// - requires gcc
// - use cleveldb build tag (go build -tags cleveldb)
// * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt)
// - EXPERIMENTAL
// - may be faster is some use-cases (random reads - indexer)
// - use boltdb build tag (go build -tags boltdb)
DBBackend string `mapstructure:"db_backend"`
// Database directory

View File

@@ -81,7 +81,18 @@ moniker = "{{ .BaseConfig.Moniker }}"
# and verifying their commits
fast_sync = {{ .BaseConfig.FastSync }}
# Database backend: leveldb | memdb | cleveldb
# Database backend: goleveldb | cleveldb | boltdb
# * goleveldb (github.com/syndtr/goleveldb - most popular implementation)
# - pure go
# - stable
# * cleveldb (uses levigo wrapper)
# - fast
# - requires gcc
# - use cleveldb build tag (go build -tags cleveldb)
# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt)
# - EXPERIMENTAL
# - may be faster is some use-cases (random reads - indexer)
# - use boltdb build tag (go build -tags boltdb)
db_backend = "{{ .BaseConfig.DBBackend }}"
# Database directory

View File

@@ -79,9 +79,7 @@ make install
Install [LevelDB](https://github.com/google/leveldb) (minimum version is 1.7).
### Ubuntu
Install LevelDB with snappy (optionally):
Install LevelDB with snappy (optionally). Below are commands for Ubuntu:
```
sudo apt-get update
@@ -100,23 +98,23 @@ wget https://github.com/google/leveldb/archive/v1.20.tar.gz && \
rm -f v1.20.tar.gz
```
Set database backend to cleveldb:
Set a database backend to `cleveldb`:
```
# config/config.toml
db_backend = "cleveldb"
```
To install Tendermint, run
To install Tendermint, run:
```
CGO_LDFLAGS="-lsnappy" make install_c
```
or run
or run:
```
CGO_LDFLAGS="-lsnappy" make build_c
```
to put the binary in `./build`.
which puts the binary in `./build`.

View File

@@ -30,7 +30,18 @@ moniker = "anonymous"
# and verifying their commits
fast_sync = true
# Database backend: leveldb | memdb | cleveldb
# Database backend: goleveldb | cleveldb | boltdb
# * goleveldb (github.com/syndtr/goleveldb - most popular implementation)
# - pure go
# - stable
# * cleveldb (uses levigo wrapper)
# - fast
# - requires gcc
# - use cleveldb build tag (go build -tags cleveldb)
# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt)
# - EXPERIMENTAL
# - may be faster is some use-cases (random reads - indexer)
# - use boltdb build tag (go build -tags boltdb)
db_backend = "leveldb"
# Database directory