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

@@ -22,7 +22,7 @@ pub fn verify_attestation_for_block_inclusion<'ctxt, E: EthSpec>(
verify_signatures: VerifySignatures,
spec: &ChainSpec,
) -> Result<&'ctxt IndexedAttestation<E>> {
let data = &attestation.data;
let data = attestation.data();
verify!(
data.slot.safe_add(spec.min_attestation_inclusion_delay)? <= state.slot(),
@@ -66,7 +66,7 @@ pub fn verify_attestation_for_state<'ctxt, E: EthSpec>(
verify_signatures: VerifySignatures,
spec: &ChainSpec,
) -> Result<&'ctxt IndexedAttestation<E>> {
let data = &attestation.data;
let data = attestation.data();
verify!(
data.index < state.get_committee_count_at_slot(data.slot)?,
@@ -90,7 +90,7 @@ fn verify_casper_ffg_vote<E: EthSpec>(
attestation: &Attestation<E>,
state: &BeaconState<E>,
) -> Result<()> {
let data = &attestation.data;
let data = attestation.data();
verify!(
data.target.epoch == data.slot.epoch(E::slots_per_epoch()),
Invalid::TargetEpochSlotMismatch {