5656 - [ New ` get_activation_exit_churn_limit ` ] ( #new-get_activation_exit_churn_limit )
5757 - [ New ` get_consolidation_churn_limit ` ] ( #new-get_consolidation_churn_limit )
5858 - [ New ` get_pending_balance_to_withdraw ` ] ( #new-get_pending_balance_to_withdraw )
59- - [ Modified ` get_indexed_attestation ` ] ( #modified-get_indexed_attestation )
6059 - [ Modified ` get_attesting_indices ` ] ( #modified-get_attesting_indices )
6160 - [ Modified ` get_next_sync_committee_indices ` ] ( #modified-get_next_sync_committee_indices )
6261 - [ Beacon state mutators] ( #beacon-state-mutators )
@@ -573,25 +572,6 @@ def get_pending_balance_to_withdraw(state: BeaconState, validator_index: Validat
573572 )
574573```
575574
576- #### Modified ` get_indexed_attestation `
577-
578- * Note* : The function is modified to use the new ` get_attesting_indices ` .
579-
580- ``` python
581- def get_indexed_attestation (state : BeaconState, attestation : Attestation) -> IndexedAttestation:
582- """
583- Return the indexed attestation corresponding to ``attestation``.
584- """
585- # [Modified in Electra:EIP7549]
586- attesting_indices = get_attesting_indices(state, attestation)
587-
588- return IndexedAttestation(
589- attesting_indices = sorted (attesting_indices),
590- data = attestation.data,
591- signature = attestation.signature,
592- )
593- ```
594-
595575#### Modified ` get_attesting_indices `
596576
597577* Note* : The function ` get_attesting_indices ` is modified to support EIP7549.
@@ -1304,7 +1284,7 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None:
13041284 # Participation flag indices
13051285 participation_flag_indices = get_attestation_participation_flag_indices(state, data, state.slot - data.slot)
13061286
1307- # Verify signature [Modified in Electra:EIP7549]
1287+ # Verify signature
13081288 assert is_valid_indexed_attestation(state, get_indexed_attestation(state, attestation))
13091289
13101290 # Update epoch participation flags
@@ -1314,7 +1294,6 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None:
13141294 epoch_participation = state.previous_epoch_participation
13151295
13161296 proposer_reward_numerator = 0
1317- # [Modified in Electra:EIP7549]
13181297 for index in get_attesting_indices(state, attestation):
13191298 for flag_index, weight in enumerate (PARTICIPATION_FLAG_WEIGHTS ):
13201299 if flag_index in participation_flag_indices and not has_flag(epoch_participation[index], flag_index):
0 commit comments