mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Superstruct AggregateAndProof (#5715)
* Upgrade `superstruct` to `0.8.0` * superstruct `AggregateAndProof`
This commit is contained in:
@@ -3368,9 +3368,9 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
"Failure verifying aggregate and proofs";
|
||||
"error" => format!("{:?}", e),
|
||||
"request_index" => index,
|
||||
"aggregator_index" => aggregate.message.aggregator_index,
|
||||
"attestation_index" => aggregate.message.aggregate.data().index,
|
||||
"attestation_slot" => aggregate.message.aggregate.data().slot,
|
||||
"aggregator_index" => aggregate.message().aggregator_index(),
|
||||
"attestation_index" => aggregate.message().aggregate().data().index,
|
||||
"attestation_slot" => aggregate.message().aggregate().data().slot,
|
||||
);
|
||||
failures.push(api_types::Failure::new(index, format!("Verification: {:?}", e)));
|
||||
}
|
||||
@@ -3389,7 +3389,7 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
"Failure applying verified aggregate attestation to fork choice";
|
||||
"error" => format!("{:?}", e),
|
||||
"request_index" => index,
|
||||
"aggregator_index" => verified_aggregate.aggregate().message.aggregator_index,
|
||||
"aggregator_index" => verified_aggregate.aggregate().message().aggregator_index(),
|
||||
"attestation_index" => verified_aggregate.attestation().data().index,
|
||||
"attestation_slot" => verified_aggregate.attestation().data().slot,
|
||||
);
|
||||
|
||||
@@ -87,7 +87,7 @@ fn verify_and_publish_attestation<T: BeaconChainTypes>(
|
||||
.send(NetworkMessage::Publish {
|
||||
messages: vec![PubsubMessage::Attestation(Box::new((
|
||||
attestation.subnet_id(),
|
||||
attestation.attestation().clone(),
|
||||
attestation.attestation().clone_as_attestation(),
|
||||
)))],
|
||||
})
|
||||
.map_err(|_| Error::Publication)?;
|
||||
|
||||
@@ -3327,8 +3327,14 @@ impl ApiTester {
|
||||
|
||||
pub async fn test_get_validator_aggregate_and_proofs_invalid(mut self) -> Self {
|
||||
let mut aggregate = self.get_aggregate().await;
|
||||
|
||||
aggregate.message.aggregate.data_mut().slot += 1;
|
||||
match &mut aggregate {
|
||||
SignedAggregateAndProof::Base(ref mut aggregate) => {
|
||||
aggregate.message.aggregate.data.slot += 1;
|
||||
}
|
||||
SignedAggregateAndProof::Electra(ref mut aggregate) => {
|
||||
aggregate.message.aggregate.data.slot += 1;
|
||||
}
|
||||
}
|
||||
|
||||
self.client
|
||||
.post_validator_aggregate_and_proof::<E>(&[aggregate])
|
||||
|
||||
Reference in New Issue
Block a user