Merge remote-tracking branch 'sigp/epoch-single-pass' into tree-states

This commit is contained in:
dapplion
2024-02-23 11:36:02 +08:00
parent 20f53e7769
commit a5d3408c59
21 changed files with 127 additions and 112 deletions

View File

@@ -110,7 +110,7 @@ impl<E: EthSpec> EpochTransition<E> for JustificationAndFinalization {
| BeaconState::Merge(_)
| BeaconState::Capella(_)
| BeaconState::Deneb(_) => {
initialize_progressive_balances_cache(state, None, spec)?;
initialize_progressive_balances_cache(state, spec)?;
let justification_and_finalization_state =
altair::process_justification_and_finalization(state)?;
justification_and_finalization_state.apply_changes_to_state(state);

View File

@@ -104,7 +104,7 @@ impl<E: EthSpec> Operation<E> for Attestation<E> {
| BeaconState::Merge(_)
| BeaconState::Capella(_)
| BeaconState::Deneb(_) => {
initialize_progressive_balances_cache(state, None, spec)?;
initialize_progressive_balances_cache(state, spec)?;
altair_deneb::process_attestation(
state,
self,
@@ -134,7 +134,7 @@ impl<E: EthSpec> Operation<E> for AttesterSlashing<E> {
_: &Operations<E, Self>,
) -> Result<(), BlockProcessingError> {
let mut ctxt = ConsensusContext::new(state.slot());
initialize_progressive_balances_cache(state, None, spec)?;
initialize_progressive_balances_cache(state, spec)?;
process_attester_slashings(
state,
&[self.clone()],
@@ -185,7 +185,7 @@ impl<E: EthSpec> Operation<E> for ProposerSlashing {
_: &Operations<E, Self>,
) -> Result<(), BlockProcessingError> {
let mut ctxt = ConsensusContext::new(state.slot());
initialize_progressive_balances_cache(state, None, spec)?;
initialize_progressive_balances_cache(state, spec)?;
process_proposer_slashings(
state,
&[self.clone()],