Merge remote-tracking branch 'origin/unstable' into capella

This commit is contained in:
Michael Sproul
2023-01-21 10:37:26 +11:00
30 changed files with 266 additions and 58 deletions

View File

@@ -335,6 +335,11 @@ impl<T: SlotClock + 'static, E: EthSpec> BlockService<T, E> {
let proposer_index = self.validator_store.validator_index(&validator_pubkey);
let validator_pubkey_ref = &validator_pubkey;
info!(
log,
"Requesting unsigned block";
"slot" => slot.as_u64(),
);
// Request block from first responsive beacon node.
let block = self
.beacon_nodes
@@ -385,6 +390,11 @@ impl<T: SlotClock + 'static, E: EthSpec> BlockService<T, E> {
}
};
info!(
log,
"Received unsigned block";
"slot" => slot.as_u64(),
);
if proposer_index != Some(block.proposer_index()) {
return Err(BlockError::Recoverable(
"Proposer index does not match block proposer. Beacon chain re-orged"
@@ -403,6 +413,11 @@ impl<T: SlotClock + 'static, E: EthSpec> BlockService<T, E> {
.await
.map_err(|e| BlockError::Recoverable(format!("Unable to sign block: {:?}", e)))?;
info!(
log,
"Publishing signed block";
"slot" => slot.as_u64(),
);
// Publish block with first available beacon node.
self.beacon_nodes
.first_success(

View File

@@ -31,6 +31,7 @@ use crate::beacon_node_fallback::{
};
use crate::doppelganger_service::DoppelgangerService;
use crate::graffiti_file::GraffitiFile;
use crate::initialized_validators::Error::UnableToOpenVotingKeystore;
use account_utils::validator_definitions::ValidatorDefinitions;
use attestation_service::{AttestationService, AttestationServiceBuilder};
use block_service::{BlockService, BlockServiceBuilder};
@@ -184,7 +185,16 @@ impl<T: EthSpec> ProductionValidatorClient<T> {
log.clone(),
)
.await
.map_err(|e| format!("Unable to initialize validators: {:?}", e))?;
.map_err(|e| {
match e {
UnableToOpenVotingKeystore(err) => {
format!("Unable to initialize validators: {:?}. If you have recently moved the location of your data directory \
make sure to update the location of voting_keystore_path in your validator_definitions.yml", err)
},
err => {
format!("Unable to initialize validators: {:?}", err)}
}
})?;
let voting_pubkeys: Vec<_> = validators.iter_voting_pubkeys().collect();