mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Don't publish data columns reconstructed from RPC columns to the gossip network (#7409)
Don't publish data columns reconstructed from RPC columns to the gossip network, as this may result in peer downscoring if we're sending columns from past slots.
This commit is contained in:
@@ -1160,7 +1160,8 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
"Processed data column, waiting for other components"
|
||||
);
|
||||
|
||||
self.attempt_data_column_reconstruction(block_root).await;
|
||||
self.attempt_data_column_reconstruction(block_root, true)
|
||||
.await;
|
||||
}
|
||||
},
|
||||
Err(BlockError::DuplicateFullyImported(_)) => {
|
||||
|
||||
@@ -918,9 +918,13 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
///
|
||||
/// Returns `Some(AvailabilityProcessingStatus)` if reconstruction is successfully performed,
|
||||
/// otherwise returns `None`.
|
||||
///
|
||||
/// The `publish_columns` parameter controls whether reconstructed columns should be published
|
||||
/// to the gossip network.
|
||||
async fn attempt_data_column_reconstruction(
|
||||
self: &Arc<Self>,
|
||||
block_root: Hash256,
|
||||
publish_columns: bool,
|
||||
) -> Option<AvailabilityProcessingStatus> {
|
||||
// Only supernodes attempt reconstruction
|
||||
if !self.network_globals.is_supernode() {
|
||||
@@ -930,7 +934,9 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
let result = self.chain.reconstruct_data_columns(block_root).await;
|
||||
match result {
|
||||
Ok(Some((availability_processing_status, data_columns_to_publish))) => {
|
||||
self.publish_data_columns_gradually(data_columns_to_publish, block_root);
|
||||
if publish_columns {
|
||||
self.publish_data_columns_gradually(data_columns_to_publish, block_root);
|
||||
}
|
||||
match &availability_processing_status {
|
||||
AvailabilityProcessingStatus::Imported(hash) => {
|
||||
debug!(
|
||||
|
||||
@@ -383,8 +383,12 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
);
|
||||
// Attempt reconstruction here before notifying sync, to avoid sending out more requests
|
||||
// that we may no longer need.
|
||||
if let Some(availability) =
|
||||
self.attempt_data_column_reconstruction(block_root).await
|
||||
// We don't publish columns reconstructed from rpc columns to the gossip network,
|
||||
// as these are likely historic columns.
|
||||
let publish_columns = false;
|
||||
if let Some(availability) = self
|
||||
.attempt_data_column_reconstruction(block_root, publish_columns)
|
||||
.await
|
||||
{
|
||||
result = Ok(availability)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user