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(