From 35b7712b12d848b319886cfaa95211f2f7bc5216 Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 9 Apr 2026 15:04:15 +0200 Subject: [PATCH] debugging --- .github/workflows/ci.yml | 14 +++++++--- integration_tests/tests/indexer.rs | 41 +++++++++++++++++------------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1fbb2a3..0fb307ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -213,13 +213,19 @@ jobs: if: failure() run: | kill "$(cat /tmp/log-watcher.pid)" 2>/dev/null || true + # Filter out noisy gossipsub/overwatch lines that bloat the log without helping debug. + NOISE='gossipsub|libp2p_gossipsub|overwatch::overwatch::(handle|runner)|services::state::handle' for f in /tmp/container-logs/*.log; do [ -e "$f" ] || continue echo "=== $f (lines: $(wc -l < $f)) ===" - echo "--- proposed-block events with removals ---" - grep -B 200 -A 5 -E '\([1-9][0-9]* removed\)' "$f" | tail -3000 || true - echo "--- mempool/tx/inscribe activity ---" - grep -i -E 'mempool|inscrib|verif|reject|invalid|gas|validate|removed' "$f" | tail -1000 || true + echo "--- proposed-block events with removals (denoised) ---" + grep -v -E "$NOISE" "$f" \ + | grep -B 200 -A 5 -E '\([1-9][0-9]* removed\)' \ + | tail -3000 || true + echo "--- mempool/tx/inscribe activity (denoised) ---" + grep -v -E "$NOISE" "$f" \ + | grep -i -E 'mempool|inscrib|verif|reject|invalid|gas|validate|removed' \ + | tail -1000 || true done valid-proof-test: diff --git a/integration_tests/tests/indexer.rs b/integration_tests/tests/indexer.rs index aab03171..9f520676 100644 --- a/integration_tests/tests/indexer.rs +++ b/integration_tests/tests/indexer.rs @@ -25,25 +25,32 @@ const L2_TO_L1_TIMEOUT_MILLIS: u64 = 900_000; /// or until [`L2_TO_L1_TIMEOUT_MILLIS`] elapses. Returns the last indexer block /// id observed. async fn wait_for_indexer_to_catch_up(ctx: &TestContext) -> u64 { - let deadline = tokio::time::Instant::now() + Duration::from_millis(L2_TO_L1_TIMEOUT_MILLIS); - loop { - let seq = sequencer_service_rpc::RpcClient::get_last_block_id(ctx.sequencer_client()) - .await - .unwrap_or(0); - let ind = ctx - .indexer_client() - .get_last_finalized_block_id() - .await - .unwrap_or(1); - if ind >= seq && ind > 1 { - info!("Indexer caught up: seq={seq}, ind={ind}"); - return ind; + let timeout = Duration::from_millis(L2_TO_L1_TIMEOUT_MILLIS); + let mut last_ind: u64 = 1; + let inner = async { + loop { + let seq = sequencer_service_rpc::RpcClient::get_last_block_id(ctx.sequencer_client()) + .await + .unwrap_or(0); + let ind = ctx + .indexer_client() + .get_last_finalized_block_id() + .await + .unwrap_or(1); + last_ind = ind; + if ind >= seq && ind > 1 { + info!("Indexer caught up: seq={seq}, ind={ind}"); + return ind; + } + tokio::time::sleep(Duration::from_secs(2)).await; } - if tokio::time::Instant::now() >= deadline { - info!("Indexer catch-up timed out: seq={seq}, ind={ind}"); - return ind; + }; + match tokio::time::timeout(timeout, inner).await { + Ok(ind) => ind, + Err(_) => { + info!("Indexer catch-up timed out: ind={last_ind}"); + last_ind } - tokio::time::sleep(Duration::from_secs(2)).await; } }