mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-27 01:33:33 +00:00
Single attestation "Full" implementation (#7444)
#6970 This allows for us to receive `SingleAttestation` over gossip and process it without converting. There is still a conversion to `Attestation` as a final step in the attestation verification process, but by then the `SingleAttestation` is fully verified. I've also fully removed the `submitPoolAttestationsV1` endpoint as its been deprecated I've also pre-emptively deprecated supporting `Attestation` in `submitPoolAttestationsV2` endpoint. See here for more info: https://github.com/ethereum/beacon-APIs/pull/531 I tried to the minimize the diff here by only making the "required" changes. There are some unnecessary complexities with the way we manage the different attestation verification wrapper types. We could probably consolidate this to one wrapper type and refactor this even further. We could leave that to a separate PR if we feel like cleaning things up in the future. Note that I've also updated the test harness to always submit `SingleAttestation` regardless of fork variant. I don't see a problem in that approach and it allows us to delete more code :)
This commit is contained in:
@@ -580,7 +580,7 @@ async fn attestations_with_increasing_slots() {
|
||||
let head = harness.chain.head_snapshot();
|
||||
let head_state_root = head.beacon_state_root();
|
||||
|
||||
attestations.extend(harness.get_unaggregated_attestations(
|
||||
attestations.extend(harness.get_single_attestations(
|
||||
&AttestationStrategy::AllValidators,
|
||||
&head.beacon_state,
|
||||
head_state_root,
|
||||
@@ -597,7 +597,7 @@ async fn attestations_with_increasing_slots() {
|
||||
.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;
|
||||
let expected_earliest_permissible_slot =
|
||||
current_slot - MinimalEthSpec::slots_per_epoch() - 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user