This commit is contained in:
realbigsean 2023-07-25 14:40:04 -04:00 committed by GitHub
parent 33dd13c798
commit 8c341bb9cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -17,15 +17,15 @@ use types::{
};
/// A block that has been received over RPC. It has 2 internal variants:
///
///
/// 1. `BlockAndBlobs`: A fully available post deneb block with all the blobs available. This variant
/// is only constructed after making consistency checks between blocks and blobs.
/// Hence, it is fully self contained w.r.t verification. i.e. this block has all the required
/// data to get verfied and imported into fork choice.
///
///
/// 2. `Block`: This can be a fully available pre-deneb block **or** a post-deneb block that may or may
/// not require blobs to be considered fully available.
///
///
/// Note: We make a distinction over blocks received over gossip because
/// in a post-deneb world, the blobs corresponding to a given block that are received
/// over rpc do not contain the proposer signature for dos resistance.
@ -98,15 +98,15 @@ impl<E: EthSpec> From<SignedBeaconBlock<E>> for RpcBlock<E> {
}
}
/// A block that has gone through all pre-deneb block processing checks including block processing
/// A block that has gone through all pre-deneb block processing checks including block processing
/// and execution by an EL client. This block hasn't completed data availability checks.
///
///
///
///
/// It contains 2 variants:
/// 1. `Available`: This block has been executed and also contains all data to consider it a
/// fully available block. i.e. for post-deneb, this implies that this contains all the
/// required blobs.
/// 2. `AvailabilityPending`: This block hasn't received all required blobs to consider it a
/// 2. `AvailabilityPending`: This block hasn't received all required blobs to consider it a
/// fully available block.
pub enum ExecutedBlock<E: EthSpec> {
Available(AvailableExecutedBlock<E>),
@ -186,7 +186,7 @@ impl<E: EthSpec> AvailableExecutedBlock<E> {
}
/// A block that has completed all pre-deneb block processing checks, verification
/// by an EL client but does not have all requisite blob data to get imported into
/// by an EL client but does not have all requisite blob data to get imported into
/// fork choice.
#[derive(Encode, Decode, Clone)]
pub struct AvailabilityPendingExecutedBlock<E: EthSpec> {

View File

@ -339,12 +339,12 @@ pub fn make_available<T: EthSpec>(
}
/// Makes the following checks to ensure that the list of blobs correspond block:
///
///
/// * Check that a block is post-deneb
/// * Checks that the number of blobs is equal to the length of kzg commitments in the list
/// * Checks that the index, slot, root and kzg_commitment in the block match the blobs in the correct order
///
/// Returns `Ok(())` if all consistency checks pass and an error otherwise.
///
/// Returns `Ok(())` if all consistency checks pass and an error otherwise.
pub fn consistency_checks<T: EthSpec>(
block: &SignedBeaconBlock<T>,
blobs: &[Arc<BlobSidecar<T>>],