Compiling Tendermint with cleveldb

I’m having trouble compiling and using Tendermint with cleveldb.

Followed the instructions for compiling with cleveldb - completed without obvious errors.

I then amended the db_backend field in my apps config. On starting a fresh chain I get this error:

unknown db_backend cleveldb, expected one of memdb,goleveldb

In the initDBs() function here I can see that the config has the correct value - i.e. config.DBBackend == "cleveldb".

The app works fine with “golevelb” selected in the config.toml, even though the Tendermint binary was compiled with the cleveldb option - so I’m guessing it has not compiled properly.

If I have compiled TM with cleveldb support, should the app be able to start with the goleveldb option?
Is there a way to check that I have compiled TM with cleveldb properly?

I’m relatively new to Golang and I’m confused that there are no cleveldb related build tags throughout the TM codebase. Can someone explain the purpose of the ‘cleveldb’ build tags in the Make recipe?

Would appreciate some help - thanks in advance.

1 Like

There is actually a build tag for that as far as I know.

Let me see if I can dig it up for you.

https://docs.tendermint.com/master/introduction/install.html#compile-with-cleveldb-support

Were you reading that? Is that helpful and what you were looking for?

The purpose of those tags is to allow go to know that it needs to break out cgo, and compile some c as well as some go.

I’m also fairly sure that we may be standardizing around badger DB, I think that there’s an issue on this.

It would basically allow us to drop the TMDB library.

Thanks for the response Jacob - yes, that is the doc guide I was following.

I’ll check the issue you shared and report back.