Converts LevelDB database files into RocksDB. Adapted from level-to-rocks to work with Carbon, and uses cometbft-db plus grocksdb for compatibility with rocksdb 7.10.2.
- Go >= 1.18.x
- Existing LevelDB database in Carbon
- RocksDB >= 7.10.2
$ make build
-
make sure carbon is initialised with goleveldb as the backend, and has
.db
files in.carbon/data
-
run the binary, specifying custom in/out directories using the flags if needed, and rocksdb
.db
files will be created in the output directory$ ./db-convert -dbDir="database file dir" -outDir="output file dir"
-
copy and replace the goleveldb
.db
files with the generated ones, then change thedb_backend
option in.carbon/config/config.toml
to rocksdb -
restart carbon (ensure that it is built with rocksdb flags), and verify that the chain is continuing from the previous block height