mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Optimise slasher DB layout and switch to MDBX (#2776)
## Issue Addressed Closes #2286 Closes #2538 Closes #2342 ## Proposed Changes Part II of major slasher optimisations after #2767 These changes will be backwards-incompatible due to the move to MDBX (and the schema change) 😱 * [x] Shrink attester keys from 16 bytes to 7 bytes. * [x] Shrink attester records from 64 bytes to 6 bytes. * [x] Separate `DiskConfig` from regular `Config`. * [x] Add configuration for the LRU cache size. * [x] Add a "migration" that deletes any legacy LMDB database.
This commit is contained in:
@@ -128,7 +128,7 @@ impl<T: BeaconChainTypes> SlasherService<T> {
|
||||
log,
|
||||
"Error during scheduled slasher processing";
|
||||
"epoch" => current_epoch,
|
||||
"error" => format!("{:?}", e)
|
||||
"error" => ?e,
|
||||
);
|
||||
None
|
||||
}
|
||||
@@ -136,13 +136,13 @@ impl<T: BeaconChainTypes> SlasherService<T> {
|
||||
drop(batch_timer);
|
||||
|
||||
// Prune the database, even in the case where batch processing failed.
|
||||
// If the LMDB database is full then pruning could help to free it up.
|
||||
// If the database is full then pruning could help to free it up.
|
||||
if let Err(e) = slasher.prune_database(current_epoch) {
|
||||
error!(
|
||||
log,
|
||||
"Error during slasher database pruning";
|
||||
"epoch" => current_epoch,
|
||||
"error" => format!("{:?}", e),
|
||||
"error" => ?e,
|
||||
);
|
||||
continue;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user