Skip to content

Commit 7882453

Browse files
authored
Merge of #7258
2 parents 47a85cd + 12ea5dd commit 7882453

File tree

1 file changed

+9
-9
lines changed
  • beacon_node/network/src/network_beacon_processor

1 file changed

+9
-9
lines changed

beacon_node/network/src/network_beacon_processor/mod.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -843,19 +843,19 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
843843
block_root: Hash256,
844844
publish_blobs: bool,
845845
) {
846+
let custody_columns = self.network_globals.sampling_columns.clone();
846847
let is_supernode = self.network_globals.is_supernode();
847-
848848
let self_cloned = self.clone();
849849
let publish_fn = move |blobs_or_data_column| {
850-
// At the moment non supernodes are not required to publish any columns.
851-
// TODO(das): we could experiment with having full nodes publish their custodied
852-
// columns here.
853-
if publish_blobs && is_supernode {
850+
if publish_blobs {
854851
match blobs_or_data_column {
855852
BlobsOrDataColumns::Blobs(blobs) => {
856853
self_cloned.publish_blobs_gradually(blobs, block_root);
857854
}
858-
BlobsOrDataColumns::DataColumns(columns) => {
855+
BlobsOrDataColumns::DataColumns(mut columns) => {
856+
if !is_supernode {
857+
columns.retain(|col| custody_columns.contains(&col.index));
858+
}
859859
self_cloned.publish_data_columns_gradually(columns, block_root);
860860
}
861861
};
@@ -1055,7 +1055,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
10551055
///
10561056
/// This is an optimisation to reduce outbound bandwidth and ensures each column is published
10571057
/// by some nodes on the network as soon as possible. Our hope is that some columns arrive from
1058-
/// other supernodes in the meantime, obviating the need for us to publish them. If no other
1058+
/// other nodes in the meantime, obviating the need for us to publish them. If no other
10591059
/// publisher exists for a column, it will eventually get published here.
10601060
fn publish_data_columns_gradually(
10611061
self: &Arc<Self>,
@@ -1080,9 +1080,9 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
10801080
});
10811081
};
10821082

1083-
// If this node is a super node, permute the columns and split them into batches.
1083+
// Permute the columns and split them into batches.
10841084
// The hope is that we won't need to publish some columns because we will receive them
1085-
// on gossip from other supernodes.
1085+
// on gossip from other nodes.
10861086
data_columns_to_publish.shuffle(&mut rand::thread_rng());
10871087

10881088
let blob_publication_batch_interval = chain.config.blob_publication_batch_interval;

0 commit comments

Comments
 (0)