cargo fmt (#4541)
This commit is contained in:
parent
33dd13c798
commit
8c341bb9cc
@ -17,15 +17,15 @@ use types::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// A block that has been received over RPC. It has 2 internal variants:
|
/// 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
|
/// 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.
|
/// 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
|
/// 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.
|
/// 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
|
/// 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.
|
/// not require blobs to be considered fully available.
|
||||||
///
|
///
|
||||||
/// Note: We make a distinction over blocks received over gossip because
|
/// 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
|
/// 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.
|
/// 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.
|
/// and execution by an EL client. This block hasn't completed data availability checks.
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
/// It contains 2 variants:
|
/// It contains 2 variants:
|
||||||
/// 1. `Available`: This block has been executed and also contains all data to consider it a
|
/// 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
|
/// fully available block. i.e. for post-deneb, this implies that this contains all the
|
||||||
/// required blobs.
|
/// 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.
|
/// fully available block.
|
||||||
pub enum ExecutedBlock<E: EthSpec> {
|
pub enum ExecutedBlock<E: EthSpec> {
|
||||||
Available(AvailableExecutedBlock<E>),
|
Available(AvailableExecutedBlock<E>),
|
||||||
@ -186,7 +186,7 @@ impl<E: EthSpec> AvailableExecutedBlock<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A block that has completed all pre-deneb block processing checks, verification
|
/// 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.
|
/// fork choice.
|
||||||
#[derive(Encode, Decode, Clone)]
|
#[derive(Encode, Decode, Clone)]
|
||||||
pub struct AvailabilityPendingExecutedBlock<E: EthSpec> {
|
pub struct AvailabilityPendingExecutedBlock<E: EthSpec> {
|
||||||
|
@ -339,12 +339,12 @@ pub fn make_available<T: EthSpec>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Makes the following checks to ensure that the list of blobs correspond block:
|
/// Makes the following checks to ensure that the list of blobs correspond block:
|
||||||
///
|
///
|
||||||
/// * Check that a block is post-deneb
|
/// * 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 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
|
/// * 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>(
|
pub fn consistency_checks<T: EthSpec>(
|
||||||
block: &SignedBeaconBlock<T>,
|
block: &SignedBeaconBlock<T>,
|
||||||
blobs: &[Arc<BlobSidecar<T>>],
|
blobs: &[Arc<BlobSidecar<T>>],
|
||||||
|
Loading…
Reference in New Issue
Block a user