* initial redb impl
* redb impl
* remove phantom data
* fixed table definition
* fighting the borrow checker
* a rough draft that doesnt cause lifetime issues
* refactoring
* refactor
* refactor
* passing unit tests
* refactor
* refactor
* refactor
* commit
* move everything to one database
* remove panics, ready for a review
* merge
* a working redb impl
* passing a ref of txn to cursor
* this tries to create a second write transaction when initializing cursor. breaks everything
* Use 2 lifetimes and subtyping
Also fixes a bug in last_key caused by rev and next_back cancelling out
* Move table into cursor
* Merge remote-tracking branch 'origin/unstable' into redb-slasher-backend-impl
* changes based on feedback
* update lmdb
* fix lifetime issues
* moving everything from Cursor to Transaction
* update
* upgrade to redb 2.0
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into redb-slasher-backend-impl
* bring back cursor
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into redb-slasher-backend-impl
* fix delete while
* linting
* linting
* switch to lmdb
* update redb to v2.1
* build fixes, remove unwrap or default
* another build error
* hopefully this is the last build error
* fmt
* cargo.toml
* fix mdbx
* Merge branch 'unstable' of https://github.com/sigp/lighthouse into redb-slasher-backend-impl
* Remove a collect
* Merge remote-tracking branch 'origin/unstable' into redb-slasher-backend-impl
* Merge branch 'redb-slasher-backend-impl' of https://github.com/eserilev/lighthouse into redb-slasher-backend-impl
* re-enable test
* fix failing slasher test
* Merge remote-tracking branch 'origin/unstable' into redb-slasher-backend-impl
* Rename DB file to `slasher.redb`
## Proposed Changes
Enable multiple database backends for the slasher, either MDBX (default) or LMDB. The backend can be selected using `--slasher-backend={lmdb,mdbx}`.
## Additional Info
In order to abstract over the two library's different handling of database lifetimes I've used `Box::leak` to give the `Environment` type a `'static` lifetime. This was the only way I could think of using 100% safe code to construct a self-referential struct `SlasherDB`, where the `OpenDatabases` refers to the `Environment`. I think this is OK, as the `Environment` is expected to live for the life of the program, and both database engines leave the database in a consistent state after each write. The memory claimed for memory-mapping will be freed by the OS and appropriately flushed regardless of whether the `Environment` is actually dropped.
We are depending on two `sigp` forks of `libmdbx-rs` and `lmdb-rs`, to give us greater control over MDBX OS support and LMDB's version.