Skip to main content
Version: 2.3

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

sudo apt-get install -y \
libgflags-dev \
libsnappy-dev \
zlib1g-dev \
libbz2-dev \
libzstd-dev \
liblz4-dev

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.

# 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

Once the installation has finished, you will be able to compile Desmos using the following command:

make install DB_BACKEND=rocksdb