mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 23:04:53 +00:00
Persist light client updates (#5545)
* persist light client updates * update beacon chain to serve light client updates * resolve todos * cache best update * extend cache parts * is better light client update * resolve merge conflict * initial api changes * add lc update db column * fmt * added tests * add sim * Merge branch 'unstable' of https://github.com/sigp/lighthouse into persist-light-client-updates * fix some weird issues with the simulator * tests * Merge branch 'unstable' of https://github.com/sigp/lighthouse into persist-light-client-updates * test changes * merge conflict * testing * started work on ef tests and some code clean up * update tests * linting * noop pre altair, were still failing on electra though * allow for zeroed light client header * Merge branch 'unstable' of https://github.com/sigp/lighthouse into persist-light-client-updates * merge unstable * remove unwraps * remove unwraps * Update light_client_update.rs * merge unstable * move functionality to helper methods * refactor is best update fn * refactor is best update fn * improve organization of light client server cache logic * fork diget calc, and only spawn as many blcoks as we need for the lc update test * fetch lc update from the cache if it exists * fmt * Fix beacon_chain tests * Add debug code to update ranking_order ef test * Fix compare code * merge conflicts * fix test * Merge branch 'persist-light-client-updates' of https://github.com/eserilev/lighthouse into persist-light-client-updates * Use blinded blocks for light client proofs * fix ef test * merge conflicts * fix lc update check * Lint * resolve merge conflict * Merge branch 'persist-light-client-updates' of https://github.com/eserilev/lighthouse into persist-light-client-updates * revert basic sim * small fix * revert sim * Review PR * resolve merge conflicts * Merge branch 'unstable' into persist-light-client-updates
This commit is contained in:
@@ -182,7 +182,6 @@ impl<E: EthSpec> KeyValueStore<E> for LevelDB<E> {
|
||||
|
||||
fn iter_column_from<K: Key>(&self, column: DBColumn, from: &[u8]) -> ColumnIter<K> {
|
||||
let start_key = BytesKey::from_vec(get_key_for_col(column.into(), from));
|
||||
|
||||
let iter = self.db.iter(self.read_options());
|
||||
iter.seek(&start_key);
|
||||
|
||||
|
||||
@@ -300,6 +300,9 @@ pub enum DBColumn {
|
||||
BeaconHistoricalSummaries,
|
||||
#[strum(serialize = "olc")]
|
||||
OverflowLRUCache,
|
||||
/// For persisting eagerly computed light client data
|
||||
#[strum(serialize = "lcu")]
|
||||
LightClientUpdate,
|
||||
}
|
||||
|
||||
/// A block from the database, which might have an execution payload or not.
|
||||
@@ -342,7 +345,8 @@ impl DBColumn {
|
||||
| Self::BeaconStateRoots
|
||||
| Self::BeaconHistoricalRoots
|
||||
| Self::BeaconHistoricalSummaries
|
||||
| Self::BeaconRandaoMixes => 8,
|
||||
| Self::BeaconRandaoMixes
|
||||
| Self::LightClientUpdate => 8,
|
||||
Self::BeaconDataColumn => DATA_COLUMN_DB_KEY_SIZE,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user