binaryholdings / cosmprund

116 stars 72 forks source link

Cannot build cosmprund with rocksdb #18

Closed Staking7pc closed 1 year ago

Staking7pc commented 1 year ago

Hi I am trying to build cosmprund with rocksdb as database . I have built a binary for a chain and synching with rocksdb as database with rockssdb version v v6.29.5 as discussed here https://github.com/cosmos/cosmos-sdk/pull/15422 with @yihuang

When I try to build cosmprund with rocksdb I get the below errors. /root/go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/db.go:616:3: not enough arguments in call to (_Cfunc_rocksdb_approximate_sizes) have (*_Ctype_struct_rocksdb_t, _Ctype_int, **_Ctype_char, *_Ctype_ulong, **_Ctype_char, *_Ctype_ulong, *_Ctype_ulong) want (*_Ctype_struct_rocksdb_t, _Ctype_int, **_Ctype_char, *_Ctype_ulong, **_Ctype_char, *_Ctype_ulong, *_Ctype_ulong, **_Ctype_char) /root/go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/db.go:658:3: not enough arguments in call to (_Cfunc_rocksdb_approximate_sizes_cf) have (*_Ctype_struct_rocksdb_t, *_Ctype_struct_rocksdb_column_family_handle_t, _Ctype_int, **_Ctype_char, *_Ctype_ulong, **_Ctype_char, *_Ctype_ulong, *_Ctype_ulong) want (*_Ctype_struct_rocksdb_t, *_Ctype_struct_rocksdb_column_family_handle_t, _Ctype_int, **_Ctype_char, *_Ctype_ulong, **_Ctype_char, *_Ctype_ulong, *_Ctype_ulong, **_Ctype_char) /root/go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/filter_policy.go:49:67: cannot use _Ctype_int(bitsPerKey) (value of type _Ctype_int) as type _Ctype_double in argument to (_Cfunc_rocksdb_filterpolicy_create_bloom) /root/go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/filter_policy.go:55:72: cannot use _Ctype_int(bitsPerKey) (value of type _Ctype_int) as type _Ctype_double in argument to (_Cfunc_rocksdb_filterpolicy_create_bloom_full) make: *** [makefile:17: install] Error 2

How can I build cosmprund for rocksdb backend support ?

yihuang commented 1 year ago

I think you just need to bump github.com/tendermint/tm-db to 0.6.7, which will switch from tecbot/gorocksdb to cosmos/gorocksdb, which should build with rocksdb v6.29.5.

tac0turtle commented 1 year ago

the only issue is i think this repo is mainly for goleveldb, rocksdb doesnt expose a forcecompact api. I can look into it

Staking7pc commented 1 year ago

I was able to build with the version that @yihuang mentioned . The main objective was to try to see if the IO reduces but rocksdb doesn't seem to help. Closing the issue