mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Persist light client bootstrap (#5915)
* 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 * fetch bootstrap without always querying for state * storing bootstrap parts in db * mroe code cleanup * test * prune sync committee branches from dropped chains * 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 * resovle merge conflict * add electra bootstrap logic, add logic to cache current sync committee * add latest sync committe branch cache * 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 * merge conflict * add better error messaging * resolve merge conflicts * remove lc update from basicsim * rename sync comittte variable and fix persist condition * refactor get_light_client_update logic * add better comments, return helpful error messages over http and rpc * pruning canonical non checkpoint slots * fix test * rerun test * update pruning logic, add tests * fix tests * fix imports * fmt * refactor db code * Refactor db method * Refactor db method * add additional comments * Merge branch 'unstable' of https://github.com/sigp/lighthouse into persist-light-client-bootstrap * fix merge * linting * merge conflict * prevent overflow * enable lc server for http api tests * fix tests * remove prints * remove warning * revert change
This commit is contained in:
@@ -241,6 +241,7 @@ pub enum StoreOp<'a, E: EthSpec> {
|
||||
DeleteDataColumns(Hash256, Vec<ColumnIndex>),
|
||||
DeleteState(Hash256, Option<Slot>),
|
||||
DeleteExecutionPayload(Hash256),
|
||||
DeleteSyncCommitteeBranch(Hash256),
|
||||
KeyValueOp(KeyValueStoreOp),
|
||||
}
|
||||
|
||||
@@ -303,6 +304,12 @@ pub enum DBColumn {
|
||||
/// For persisting eagerly computed light client data
|
||||
#[strum(serialize = "lcu")]
|
||||
LightClientUpdate,
|
||||
/// For helping persist eagerly computed light client bootstrap data
|
||||
#[strum(serialize = "scb")]
|
||||
SyncCommitteeBranch,
|
||||
/// For helping persist eagerly computed light client bootstrap data
|
||||
#[strum(serialize = "scm")]
|
||||
SyncCommittee,
|
||||
}
|
||||
|
||||
/// A block from the database, which might have an execution payload or not.
|
||||
@@ -346,6 +353,8 @@ impl DBColumn {
|
||||
| Self::BeaconHistoricalRoots
|
||||
| Self::BeaconHistoricalSummaries
|
||||
| Self::BeaconRandaoMixes
|
||||
| Self::SyncCommittee
|
||||
| Self::SyncCommitteeBranch
|
||||
| Self::LightClientUpdate => 8,
|
||||
Self::BeaconDataColumn => DATA_COLUMN_DB_KEY_SIZE,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user