lighthouse-pulse/lighthouse/tests
Michael Sproul 92d597ad23 Modularise slasher backend (#3443)
## 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.
2022-08-15 01:30:56 +00:00
..
account_manager.rs Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
beacon_node.rs Modularise slasher backend (#3443) 2022-08-15 01:30:56 +00:00
boot_node.rs Engine API v1.0.0.alpha.6 + interop tests (#3024) 2022-02-17 21:47:06 +00:00
exec.rs Enforce Optimistic Sync Conditions & CLI Tests (v2) (#3050) 2022-03-01 22:56:47 +00:00
main.rs Add regression tests for boot_node (#2749) 2021-11-08 01:37:58 +00:00
validator_client.rs Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00