lighthouse/beacon_node
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
..
beacon_chain Serve Bellatrix preset in BN API (#3425) 2022-08-10 07:52:59 +00:00
builder_client Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
client Tidy eth1/deposit contract logging (#3397) 2022-08-01 07:20:43 +00:00
eth1 Tidy eth1/deposit contract logging (#3397) 2022-08-01 07:20:43 +00:00
execution_layer Remove some "wontfix" TODOs for the merge (#3449) 2022-08-10 13:06:46 +00:00
genesis Unify execution layer endpoints (#3214) 2022-06-29 09:07:09 +00:00
http_api Fix lints for Rust 1.63 (#3459) 2022-08-12 00:56:39 +00:00
http_metrics Support IPv6 in BN and VC HTTP APIs (#3104) 2022-03-24 00:04:49 +00:00
lighthouse_network Return ResourceUnavailable if we are unable to reconstruct execution payloads (#3365) 2022-07-27 03:20:00 +00:00
network Handle processing results of non faulty batches (#3439) 2022-08-12 00:56:38 +00:00
operation_pool Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
src Modularise slasher backend (#3443) 2022-08-15 01:30:56 +00:00
store Fix lints for Rust 1.63 (#3459) 2022-08-12 00:56:39 +00:00
tests Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
timer Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
Cargo.toml Modularise slasher backend (#3443) 2022-08-15 01:30:56 +00:00