Merge branch 'deneb-free-blobs' into partial-processing

This commit is contained in:
Pawan Dhananjay
2023-03-20 22:29:40 +05:30
27 changed files with 857 additions and 1032 deletions

View File

@@ -5416,7 +5416,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
latest_valid_hash,
ref validation_error,
} => {
debug!(
warn!(
self.log,
"Invalid execution payload";
"validation_error" => ?validation_error,
@@ -5425,11 +5425,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
"head_block_root" => ?head_block_root,
"method" => "fcU",
);
warn!(
self.log,
"Fork choice update invalidated payload";
"status" => ?status
);
match latest_valid_hash {
// The `latest_valid_hash` is set to `None` when the EE
@@ -5475,7 +5470,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
PayloadStatus::InvalidBlockHash {
ref validation_error,
} => {
debug!(
warn!(
self.log,
"Invalid execution payload block hash";
"validation_error" => ?validation_error,
@@ -5483,11 +5478,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
"head_block_root" => ?head_block_root,
"method" => "fcU",
);
warn!(
self.log,
"Fork choice update invalidated payload";
"status" => ?status
);
// The execution engine has stated that the head block is invalid, however it
// hasn't returned a latest valid ancestor.
//

View File

@@ -300,10 +300,10 @@ pub enum BlockError<T: EthSpec> {
///
/// ## Peer scoring
///
/// TODO(merge): reconsider how we score peers for this.
///
/// The peer sent us an invalid block, but I'm not really sure how to score this in an
/// "optimistic" sync world.
/// The peer sent us an invalid block, we must penalise harshly.
/// If it's actually our fault (e.g. our execution node database is corrupt) we have bigger
/// problems to worry about than losing peers, and we're doing the network a favour by
/// disconnecting.
ParentExecutionPayloadInvalid {
parent_root: Hash256,
},

View File

@@ -159,7 +159,7 @@ async fn notify_new_payload<'a, T: BeaconChainTypes>(
latest_valid_hash,
ref validation_error,
} => {
debug!(
warn!(
chain.log,
"Invalid execution payload";
"validation_error" => ?validation_error,
@@ -206,7 +206,7 @@ async fn notify_new_payload<'a, T: BeaconChainTypes>(
PayloadStatus::InvalidBlockHash {
ref validation_error,
} => {
debug!(
warn!(
chain.log,
"Invalid execution payload block hash";
"validation_error" => ?validation_error,

View File

@@ -15,6 +15,7 @@ use std::io;
use std::marker::PhantomData;
use std::str::Utf8Error;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use store::AbstractExecPayload;
use types::{
AttesterSlashing, BeaconBlockRef, BeaconState, ChainSpec, Epoch, EthSpec, Hash256,
IndexedAttestation, ProposerSlashing, PublicKeyBytes, SignedAggregateAndProof,
@@ -1736,9 +1737,9 @@ fn u64_to_i64(n: impl Into<u64>) -> i64 {
}
/// Returns the delay between the start of `block.slot` and `seen_timestamp`.
pub fn get_block_delay_ms<T: EthSpec, S: SlotClock>(
pub fn get_block_delay_ms<T: EthSpec, S: SlotClock, P: AbstractExecPayload<T>>(
seen_timestamp: Duration,
block: BeaconBlockRef<'_, T>,
block: BeaconBlockRef<'_, T, P>,
slot_clock: &S,
) -> Duration {
get_slot_delay_ms::<S>(seen_timestamp, block.slot(), slot_clock)