Attestation superstruct changes for EIP 7549 (#5644)

* update

* experiment

* superstruct changes

* revert

* superstruct changes

* fix tests

* indexed attestation

* indexed attestation superstruct

* updated TODOs
This commit is contained in:
Eitan Seri-Levi
2024-04-30 19:49:08 +03:00
committed by GitHub
parent 4a48d7b546
commit 3b7132bc0d
56 changed files with 943 additions and 429 deletions

View File

@@ -27,6 +27,12 @@ pub fn get_attesting_indices_from_state<E: EthSpec>(
state: &BeaconState<E>,
att: &Attestation<E>,
) -> Result<Vec<u64>, BeaconStateError> {
let committee = state.get_beacon_committee(att.data.slot, att.data.index)?;
get_attesting_indices::<E>(committee.committee, &att.aggregation_bits)
let committee = state.get_beacon_committee(att.data().slot, att.data().index)?;
match att {
Attestation::Base(att) => {
get_attesting_indices::<E>(committee.committee, &att.aggregation_bits)
}
// TODO(electra) implement get_attesting_indices for electra
Attestation::Electra(_) => todo!(),
}
}