Soft-block channel capacity misconfiguration
Description
The soft_blocks
channel is used for communicating soft blocks (which have been processed by the Sequencer but not Celestia, as opposed to firm blocks, which have also been processed by Celestia).
Its capacity is tied to the celestia_block_variance
value in the rollup node’s genesis configuration. If this value is set to zero, soft blocks will never be sent or executed.
Impact
In the Executor's init method, the soft block channel's capacity is set based on calculate_max_spread
, which multiplies celestia_block_variance
by six:
fn calculate_max_spread(&self) -> usize {
usize::try_from(self.state.celestia_block_variance())
.expect("converting a u32 to usize should work on any architecture conductor runs on")
.saturating_mul(6)
}
If celestia_block_variance
is zero, it results in a max_spread
of zero, preventing soft blocks from being processed:
if let Some(channel) = self.soft_blocks.as_mut() {
channel.set_capacity(max_spread);
}
This creates a situation where soft blocks are never sent or executed. Notably, in soft-only mode, celestia_block_variance
and the soft-block channel capacity do not appear to have any direct functional relationship, yet a zero variance still prevents execution.
Recommendations
Ensure a minimum value for celestia_block_variance
or set a default value for soft-only mode to decouple the logic and guarantee that soft blocks can be processed in any mode.