mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 20:02:43 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
use super::{process_registry_updates, process_slashings, EpochProcessingSummary, Error};
|
||||
use crate::common::update_progressive_balances_cache::{
|
||||
initialize_progressive_balances_cache, update_progressive_balances_on_epoch_transition,
|
||||
};
|
||||
use crate::epoch_cache::initialize_epoch_cache;
|
||||
use crate::per_epoch_processing::{
|
||||
effective_balance_updates::process_effective_balance_updates,
|
||||
@@ -34,6 +37,7 @@ pub fn process_epoch<T: EthSpec>(
|
||||
// Pre-compute participating indices and total balances.
|
||||
let mut participation_cache = ParticipationCache::new(state, spec)?;
|
||||
let sync_committee = state.current_sync_committee()?.clone();
|
||||
initialize_progressive_balances_cache::<T>(state, Some(&participation_cache), spec)?;
|
||||
|
||||
// Justification and finalization.
|
||||
let justification_and_finalization_state =
|
||||
@@ -60,7 +64,7 @@ pub fn process_epoch<T: EthSpec>(
|
||||
process_eth1_data_reset(state)?;
|
||||
|
||||
// Update effective balances with hysteresis (lag).
|
||||
process_effective_balance_updates(state, spec)?;
|
||||
process_effective_balance_updates(state, Some(&participation_cache), spec)?;
|
||||
|
||||
// Reset slashings
|
||||
process_slashings_reset(state)?;
|
||||
@@ -80,6 +84,8 @@ pub fn process_epoch<T: EthSpec>(
|
||||
state.advance_caches(spec)?;
|
||||
initialize_epoch_cache(state, state.next_epoch()?, spec)?;
|
||||
|
||||
update_progressive_balances_on_epoch_transition(state, spec)?;
|
||||
|
||||
Ok(EpochProcessingSummary::Altair {
|
||||
participation_cache,
|
||||
sync_committee,
|
||||
|
||||
Reference in New Issue
Block a user