Merge branch 'expose-blst-internals' into into-anchor

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	account_manager/src/validator/create.rs
#	account_manager/src/validator/recover.rs
#	beacon_node/http_api/src/block_id.rs
#	beacon_node/http_api/src/lib.rs
#	consensus/types/src/payload.rs
#	validator_client/doppelganger_service/src/lib.rs
#	validator_client/http_metrics/Cargo.toml
#	validator_client/validator_services/src/preparation_service.rs
This commit is contained in:
Daniel Knopik
2025-01-21 17:03:38 +01:00
245 changed files with 5423 additions and 2361 deletions

View File

@@ -447,8 +447,30 @@ impl<S: ValidatorStore + 'static, T: SlotClock + 'static> AttestationService<S,
&[validator_metrics::ATTESTATIONS_HTTP_POST],
);
if fork_name.electra_enabled() {
let single_attestations = attestations
.iter()
.zip(validator_indices)
.filter_map(|(a, i)| {
match a.to_single_attestation_with_attester_index(*i as usize) {
Ok(a) => Some(a),
Err(e) => {
// This shouldn't happen unless BN and VC are out of sync with
// respect to the Electra fork.
error!(
log,
"Unable to convert to SingleAttestation";
"error" => ?e,
"committee_index" => attestation_data.index,
"slot" => slot.as_u64(),
"type" => "unaggregated",
);
None
}
}
})
.collect::<Vec<_>>();
beacon_node
.post_beacon_pool_attestations_v2(attestations, fork_name)
.post_beacon_pool_attestations_v2(&single_attestations, fork_name)
.await
} else {
beacon_node

View File

@@ -247,7 +247,7 @@ impl<S: ValidatorStore + 'static, T: SlotClock + 'static> PreparationService<S,
let current_epoch = self.slot_clock.now().map_or(S::E::genesis_epoch(), |slot| {
slot.epoch(S::E::slots_per_epoch())
});
spec.bellatrix_fork_epoch.map_or(false, |fork_epoch| {
spec.bellatrix_fork_epoch.is_some_and(|fork_epoch| {
current_epoch + PROPOSER_PREPARATION_LOOKAHEAD_EPOCHS >= fork_epoch
})
}

View File

@@ -91,7 +91,7 @@ impl SyncDutiesMap {
self.committees
.read()
.get(&committee_period)
.map_or(false, |committee_duties| {
.is_some_and(|committee_duties| {
let validator_duties = committee_duties.validators.read();
validator_indices
.iter()