superstruct the AttesterSlashing (#5636)

* `superstruct` Attester Fork Variants

* Push a little further

* Deal with Encode / Decode of AttesterSlashing

* not so sure about this..

* Stop Encode/Decode Bounds from Propagating Out

* Tons of Changes..

* More Conversions to AttestationRef

* Add AsReference trait (#15)

* Add AsReference trait

* Fix some snafus

* Got it Compiling! :D

* Got Tests Building

* Get beacon chain tests compiling

---------

Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
ethDreamer
2024-05-02 18:00:21 -05:00
committed by GitHub
parent 3b7132bc0d
commit e6c7f145dd
53 changed files with 1405 additions and 437 deletions

View File

@@ -606,7 +606,7 @@ async fn epoch_boundary_state_attestation_processing() {
for (attestation, subnet_id) in late_attestations.into_iter().flatten() {
// load_epoch_boundary_state is idempotent!
let block_root = attestation.data.beacon_block_root;
let block_root = attestation.data().beacon_block_root;
let block = store
.get_blinded_block(&block_root)
.unwrap()
@@ -629,7 +629,7 @@ async fn epoch_boundary_state_attestation_processing() {
.verify_unaggregated_attestation_for_gossip(&attestation, Some(subnet_id));
let current_slot = harness.chain.slot().expect("should get slot");
let expected_attestation_slot = attestation.data.slot;
let expected_attestation_slot = attestation.data().slot;
// Extra -1 to handle gossip clock disparity.
let expected_earliest_permissible_slot = current_slot - E::slots_per_epoch() - 1;
@@ -1028,8 +1028,7 @@ async fn multiple_attestations_per_block() {
.as_ref()
.message()
.body()
.attestations()
.len() as u64,
.attestations_len() as u64,
if slot <= 1 { 0 } else { committees_per_slot }
);
}