Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Eitan Seri-Levi <eserilev@gmail.com>
Co-authored-by: Jacob Kaufmann <jacobkaufmann18@gmail.com>
  • Loading branch information
3 people authored Feb 14, 2024
1 parent 64061e2 commit 4f3b243
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/beacon_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3246,7 +3246,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
}

/// Checks if the provided data column can make any cached blocks available, and imports immediately
/// if so, otherwise caches the blob in the data availability checker.
/// if so, otherwise caches the data column in the data availability checker.
async fn check_gossip_data_column_availability_and_import(
self: &Arc<Self>,
data_column: GossipVerifiedDataColumn<T>,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/block_verification_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ enum RpcBlockInner<E: EthSpec> {
/// This variant is used with parent lookups and by-range responses. It should have all blobs
/// ordered, all block roots matching, and the correct number of blobs for this block.
BlockAndBlobs(Arc<SignedBeaconBlock<E>>, BlobSidecarList<E>),
/// This variant is used with parent lookups and by-range responses. It should have all blobs
/// This variant is used with parent lookups and by-range responses. It should have all data columns
/// ordered, all block roots matching, and the correct number of data columns for this block.
BlockAndDataColumns(Arc<SignedBeaconBlock<E>>, DataColumnSidecarList<E>),
}
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/beacon_chain/src/data_availability_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
.put_kzg_verified_blobs(gossip_blob.block_root(), vec![gossip_blob.into_inner()])
}

/// Check if we've cached other data columns for this block. If it completes a set and we also
/// Check if we've cached other data columns for this block. If it satisfies the custody requirement and we also
/// have a block cached, return the `Availability` variant triggering block import.
/// Otherwise cache the data column sidecar.
///
Expand Down Expand Up @@ -358,7 +358,7 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
}
}
(maybe_blob_list, maybe_data_column_list) => {
let (verified_blobs, verified_data_column) =
let (verified_blobs, verified_data_columns) =
if self.blobs_required_for_block(&block) {
(maybe_blob_list, maybe_data_column_list)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub trait AvailabilityView<E: EthSpec> {
///
/// Data columns are only inserted if:
/// 1. The data column entry at the index is empty and no block exists.
/// 2. The block exists and its commitment matches the blob's commitment.
/// 2. The block exists and its commitments matches the data column's commitments.
fn merge_data_columns(
&mut self,
data_columns: FixedVector<Option<Self::DataColumnType>, E::DataColumnCount>,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/data_column_verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub enum GossipDataColumnError<T: EthSpec> {
///
/// ## Peer scoring
///
/// We were unable to process this blob due to an internal error. It's
/// We were unable to process this data column due to an internal error. It's
/// unclear if the data column is valid.
BeaconChainError(BeaconChainError),

Expand Down
2 changes: 1 addition & 1 deletion beacon_node/store/src/hot_cold_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
}
}

/// Fetch blobs for a given block from the store.
/// Fetch data_columns for a given block from the store.
pub fn get_data_columns(
&self,
block_root: &Hash256,
Expand Down
2 changes: 1 addition & 1 deletion consensus/types/src/data_column_sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub type ColumnIndex = u64;
pub type Cell<T> = FixedVector<u8, <T as EthSpec>::FieldElementsPerCell>;
pub type DataColumn<T> = VariableList<Cell<T>, <T as EthSpec>::MaxBlobsPerBlock>;

/// Container of the data that identifies an individual blob.
/// Container of the data that identifies an individual data column.
#[derive(
Serialize, Deserialize, Encode, Decode, TreeHash, Copy, Clone, Debug, PartialEq, Eq, Hash,
)]
Expand Down

0 comments on commit 4f3b243

Please sign in to comment.