Closed
Description
Description
It would be great to have even more choice for slasher database backends beyond LMDB and MDBX. This could also be a good way for us to try out a couple of new DBs to see if they'd be suitable for the beacon node itself (which currently only supports LevelDB).
The candidates I'd like to try are:
I think redb
would be the easiest, as it's most similar to the existing backends. Then sqlite
, because it can be embedded in process and we already use it in the VC via rusqlite
. Most difficult would be postgres, because we'd either need to assume that a postgres server is running (yuck) or run one ourselves in a Docker container or something (also kind of yuck).
Steps to resolve
- Add a new variant for the database to the
DatabaseBackend
enum. - Add a new file in e.g.
slasher/src/database/redb_impl.rs
, with types named similarly to the other existing backends, seelmdb_impl.rs
- Add variants to the enums in
interface.rs
for the new backend. - Get the slasher tests to pass with the
DEFAULT_BACKEND
set to the new backend, andcargo test --release -p slasher
. We can worry about the feature flag stuff later.
Activity