Skip to content

Commit d4e9d6a

Browse files
committed
Have Fullnodes publish data columns from EL getBlobs.
1 parent 578db67 commit d4e9d6a

File tree

1 file changed

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

1 file changed

+10
-10
lines changed

beacon_node/network/src/network_beacon_processor/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -927,20 +927,20 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
927927
block_root: Hash256,
928928
publish_blobs: bool,
929929
) {
930-
let is_supernode = self.network_globals.is_supernode();
931-
930+
let custody_columns = self.network_globals.sampling_columns.clone();
932931
let self_cloned = self.clone();
933932
let publish_fn = move |blobs_or_data_column| {
934-
// At the moment non supernodes are not required to publish any columns.
935-
// TODO(das): we could experiment with having full nodes publish their custodied
936-
// columns here.
937-
if publish_blobs && is_supernode {
933+
if publish_blobs {
938934
match blobs_or_data_column {
939935
BlobsOrDataColumns::Blobs(blobs) => {
940936
self_cloned.publish_blobs_gradually(blobs, block_root);
941937
}
942938
BlobsOrDataColumns::DataColumns(columns) => {
943-
self_cloned.publish_data_columns_gradually(columns, block_root);
939+
let columns_to_publish = columns
940+
.into_iter()
941+
.filter(|c| custody_columns.contains(&c.index))
942+
.collect();
943+
self_cloned.publish_data_columns_gradually(columns_to_publish, block_root);
944944
}
945945
};
946946
}
@@ -1139,7 +1139,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
11391139
///
11401140
/// This is an optimisation to reduce outbound bandwidth and ensures each column is published
11411141
/// by some nodes on the network as soon as possible. Our hope is that some columns arrive from
1142-
/// other supernodes in the meantime, obviating the need for us to publish them. If no other
1142+
/// other nodes in the meantime, obviating the need for us to publish them. If no other
11431143
/// publisher exists for a column, it will eventually get published here.
11441144
fn publish_data_columns_gradually(
11451145
self: &Arc<Self>,
@@ -1164,9 +1164,9 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
11641164
});
11651165
};
11661166

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

11721172
let blob_publication_batch_interval = chain.config.blob_publication_batch_interval;

0 commit comments

Comments
 (0)