Fix and improve handling of empty columns after getBlobs response (#9361)

This PR fixes two issues:

1. This condition is inverted: dfb259171a/beacon_node/network/src/network_beacon_processor/gossip_methods.rs (L1507-L1508)
We are supposed to filter out incomplete columns when we DON'T have local blobs yet!
2. When the EL returns no blobs, we never store a partial in the assembler, and this code fails to publish our need to the network, as no partials are returned: dfb259171a/beacon_node/network/src/network_beacon_processor/mod.rs (L1038-L1050)


  The simple fix for 1 would be to invert the condition, but we can improve the flow here: Instead of not publishing anything, we can publish what we got, but not request anything. This ties into the fix for 2: After get blobs completes, we not only publish anything in the partial assembler, but also for every missing custody column in there, publish an empty column and a request for all cells.

In particular:
- When sending a partial message to `network`, allow specifying a request bitmap instead of hardcoding an all-ones bitmap.
- For clarity and to prepare for Gloas integration, add a `PubsubPartialMessage` enum with a `DataColumnFulu` variant.
- On republishing after merging a gossip column: always publish, but only request cells if local blobs are known or get blobs is disabled. This also prepares us to request only *some* cells, e.g. in cases where we are aware of the blobs that the EL is going to send us, e.g. via `engine_hasBlobs`.
- Move guards in `fetch_engine_blobs_and_publish` to ensure everything works fine if there are no blobs or if get_blobs is disabled.


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
This commit is contained in:
Daniel Knopik
2026-06-19 02:50:24 +02:00
committed by GitHub
parent ddfc265123
commit 560f90611e
15 changed files with 313 additions and 148 deletions

View File

@@ -14,7 +14,7 @@ use eth2::types::{
};
use execution_layer::{ProvenancedPayload, SubmitBlindedBlockResponse};
use futures::TryFutureExt;
use lighthouse_network::PubsubMessage;
use lighthouse_network::{PubsubMessage, PubsubPartialMessage};
use logging::crit;
use network::NetworkMessage;
use rand::prelude::SliceRandom;
@@ -442,12 +442,22 @@ pub(crate) fn publish_column_sidecars<T: BeaconChainTypes>(
// Publish partial messages
if !partial_columns.is_empty() {
if let Some(header) = partial_header {
let header = Arc::new(header);
let messages = partial_columns
.into_iter()
.map(|column| {
let mut request_cells = column.sidecar.cells_present_bitmap.clone();
request_cells.not_inplace();
PubsubPartialMessage::DataColumnFulu {
column,
request_cells,
header: header.clone(),
}
})
.collect();
crate::utils::publish_network_message(
sender_clone,
NetworkMessage::PublishPartialColumns {
columns: partial_columns,
header: Arc::new(header),
},
NetworkMessage::PublishPartialColumns { messages },
)
.map_err(|_| {
BlockError::BeaconChainError(Box::new(BeaconChainError::UnableToPublish))