diff --git a/core/lib/dal/src/consensus_dal.rs b/core/lib/dal/src/consensus_dal.rs index 28559e8a62d2..15c4c18b5d88 100644 --- a/core/lib/dal/src/consensus_dal.rs +++ b/core/lib/dal/src/consensus_dal.rs @@ -536,6 +536,7 @@ impl ConsensusDal<'_, '_> { } .await? else { + tracing::info!(%genesis.first_block, "genesis block not found"); return Ok(None); }; Ok(Some(AttestationStatus { diff --git a/core/node/consensus/src/en.rs b/core/node/consensus/src/en.rs index 159629a3ae25..5127ab12352f 100644 --- a/core/node/consensus/src/en.rs +++ b/core/node/consensus/src/en.rs @@ -136,6 +136,7 @@ impl EN { attester, attestation_status, }; + tracing::info!("running the external node executor"); executor.run(ctx).await?; Ok(()) diff --git a/core/node/consensus/src/mn.rs b/core/node/consensus/src/mn.rs index 0f1bb8dcb33b..6023231c9764 100644 --- a/core/node/consensus/src/mn.rs +++ b/core/node/consensus/src/mn.rs @@ -85,6 +85,8 @@ pub async fn run_main_node( attester, attestation_status, }; + + tracing::info!("running the main node executor"); executor.run(ctx).await }) .await diff --git a/core/node/consensus/src/tests.rs b/core/node/consensus/src/tests.rs index a2905b355040..8e1594393eac 100644 --- a/core/node/consensus/src/tests.rs +++ b/core/node/consensus/src/tests.rs @@ -616,8 +616,16 @@ async fn test_with_pruning(version: ProtocolVersionId) { .wait_for_batch(ctx, validator.last_sealed_batch()) .await?; + // The main node is not supposed to be pruned. In particular `ConsensusDal::attestation_status` + // does not look for where the last prune happened at, and thus if we prune the block genesis + // points at, we might never be able to start the Executor. + tracing::info!("Wait until the external node has all the batches we want to prune"); + node_pool + .wait_for_batch(ctx, to_prune.next()) + .await + .context("wait_for_batch()")?; tracing::info!("Prune some blocks and sync more"); - validator_pool + node_pool .prune_batches(ctx, to_prune) .await .context("prune_batches")?;