Installing RocksDB
By default, Desmos uses LevelDB as its database backend engine. However, since version
v0.6.0
we've also added the possibility of optionally using Facebook's RocksDB,
which, although still being experimental, is know to be faster and could lead to lower syncing times.
If you want to try out RocksDB (which we suggest you to do) you can take a look at our
RocksDB installation guide before proceeding further.
The following guide allows you to install Facebook's RocksDB inside your local machine, so that you will be able to use as Desmos' backend engine for better performances.
1. Install the dependencies
The first thing to do is to install all the dependencies for RocksDB. Following you will find the installation guide for both Ubuntu and MacOS. If you have a different operative system you can refer to the official installation guide
- Linux
- macOS
sudo apt-get install -y \
libgflags-dev \
libsnappy-dev \
zlib1g-dev \
libbz2-dev \
libzstd-dev \
liblz4-dev
# Only needed if you are first time developing of your machine
xcode-select --install
# Install the dependencies
brew tap homebrew/versions; brew install gcc48 --use-llvm
2. Install RocksDB
After having installed the dependencies, you need to install RocksDB. Again, following you will find the Linux and MacOS instructions. If you are running another OS, please refer to the official documentation.
- Linux
- macOS
# Clone RocksDB
git clone https://github.com/facebook/rocksdb.git && cd rocksdb
# Build RocksDB
DEBUG_LEVEL=0 make shared_lib
# Install RocksDB so that Desmos can access it
sudo make install-shared
# Make sure the newly built library is linked correctly
sudo ldconfig
brew install rocksdb
Once the installation has finished, you will be able to compile Desmos using the following command:
make install DB_BACKEND=rocksdb