mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-05-14 12:09:35 +00:00
debug: more docker logs
This commit is contained in:
parent
4eb8ac69d6
commit
0ba19e5351
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@ -161,7 +161,7 @@ jobs:
|
||||
run: cargo nextest run -p integration_tests -- --skip tps_test --skip indexer
|
||||
|
||||
integration-tests-indexer:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
@ -182,27 +182,41 @@ jobs:
|
||||
- name: Install nextest
|
||||
run: cargo install --locked cargo-nextest
|
||||
|
||||
- name: Clean up Docker state before tests
|
||||
run: |
|
||||
echo "=== Docker cleanup before tests ==="
|
||||
docker system prune -af --volumes || true
|
||||
docker ps -a
|
||||
docker network ls
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
RISC0_DEV_MODE: "1"
|
||||
RUST_LOG: "info"
|
||||
RUST_LOG: "debug"
|
||||
run: cargo nextest run -p integration_tests indexer --test-threads=1
|
||||
|
||||
- name: Debug Docker state on failure
|
||||
if: failure()
|
||||
run: |
|
||||
echo "=== docker ps -a ==="
|
||||
docker ps -a || true
|
||||
echo "=== Docker containers (after failure) ==="
|
||||
docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Image}}' || true
|
||||
|
||||
echo "=== docker network ls ==="
|
||||
echo ""
|
||||
echo "=== Docker networks ==="
|
||||
docker network ls || true
|
||||
|
||||
echo "=== logs: bedrock/cfgsync containers ==="
|
||||
for c in $(docker ps -a --format '{{.Names}}' | grep -E 'logos-blockchain|cfgsync' | tail -n 40); do
|
||||
echo "----- ${c} -----"
|
||||
docker logs --tail 300 "$c" || true
|
||||
echo ""
|
||||
echo "=== Recent container logs (logos-blockchain + cfgsync) ==="
|
||||
for c in $(docker ps -a --format '{{.Names}}' | grep -E 'logos-blockchain|cfgsync' | tail -n 50); do
|
||||
echo ""
|
||||
echo "------- Container: ${c} -------"
|
||||
docker logs --tail 400 "$c" 2>&1 || echo "Failed to get logs for ${c}"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== Docker system info ==="
|
||||
docker system df || true
|
||||
|
||||
valid-proof-test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
|
||||
@ -6,7 +6,7 @@ use anyhow::{Context as _, Result, bail};
|
||||
use common::{HashType, transaction::NSSATransaction};
|
||||
use futures::FutureExt as _;
|
||||
use indexer_service::IndexerHandle;
|
||||
use log::{debug, error, warn};
|
||||
use log::{debug, error, info, warn};
|
||||
use nssa::{AccountId, PrivacyPreservingTransaction};
|
||||
use nssa_core::Commitment;
|
||||
use sequencer_core::indexer_client::{IndexerClient, IndexerClientTrait as _};
|
||||
@ -65,13 +65,15 @@ impl TestContext {
|
||||
// Ensure logger is initialized only once
|
||||
*LOGGER;
|
||||
|
||||
debug!("Test context setup");
|
||||
debug!("Test context setup starting");
|
||||
|
||||
let (bedrock_compose, bedrock_addr) = Self::setup_bedrock_node().await?;
|
||||
info!("Bedrock cluster ready at {bedrock_addr}");
|
||||
|
||||
let (indexer_handle, temp_indexer_dir) = Self::setup_indexer(bedrock_addr, &initial_data)
|
||||
.await
|
||||
.context("Failed to setup Indexer")?;
|
||||
info!("Indexer ready at {}", indexer_handle.addr());
|
||||
|
||||
let (sequencer_handle, temp_sequencer_dir) = Self::setup_sequencer(
|
||||
sequencer_partial_config,
|
||||
@ -81,11 +83,13 @@ impl TestContext {
|
||||
)
|
||||
.await
|
||||
.context("Failed to setup Sequencer")?;
|
||||
info!("Sequencer ready at {}", sequencer_handle.addr());
|
||||
|
||||
let (wallet, temp_wallet_dir, wallet_password) =
|
||||
Self::setup_wallet(sequencer_handle.addr(), &initial_data)
|
||||
.await
|
||||
.context("Failed to setup wallet")?;
|
||||
info!("Wallet initialized");
|
||||
|
||||
let sequencer_url = config::addr_to_url(config::UrlProtocol::Http, sequencer_handle.addr())
|
||||
.context("Failed to convert sequencer addr to URL")?;
|
||||
@ -98,6 +102,8 @@ impl TestContext {
|
||||
.await
|
||||
.context("Failed to create indexer client")?;
|
||||
|
||||
info!("All components initialized and connected, test ready");
|
||||
|
||||
Ok(Self {
|
||||
sequencer_client,
|
||||
indexer_client,
|
||||
@ -180,6 +186,13 @@ impl TestContext {
|
||||
};
|
||||
|
||||
let addr = SocketAddr::from(([127, 0, 0, 1], port));
|
||||
|
||||
// Wait for Bedrock consensus to stabilize after startup
|
||||
// The cfgsync server coordinates all 4 nodes; we give them time to reach consensus
|
||||
debug!("Bedrock services are up, waiting for consensus stabilization...");
|
||||
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
|
||||
debug!("Bedrock consensus stabilization complete");
|
||||
|
||||
Ok((compose, addr))
|
||||
}
|
||||
|
||||
|
||||
@ -20,12 +20,17 @@ async fn indexer_test_run() -> Result<()> {
|
||||
let ctx = TestContext::new().await?;
|
||||
|
||||
// RUN OBSERVATION
|
||||
info!(
|
||||
"Waiting {} ms for blocks to be created and finalized on Bedrock",
|
||||
L2_TO_L1_TIMEOUT_MILLIS
|
||||
);
|
||||
tokio::time::sleep(std::time::Duration::from_millis(L2_TO_L1_TIMEOUT_MILLIS)).await;
|
||||
info!("Wait period complete");
|
||||
|
||||
let last_block_seq =
|
||||
sequencer_service_rpc::RpcClient::get_last_block_id(ctx.sequencer_client()).await?;
|
||||
|
||||
info!("Last block on seq now is {last_block_seq}");
|
||||
info!("Last block on sequencer: {last_block_seq}");
|
||||
|
||||
let last_block_indexer = ctx
|
||||
.indexer_client()
|
||||
@ -33,7 +38,7 @@ async fn indexer_test_run() -> Result<()> {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
info!("Last block on ind now is {last_block_indexer}");
|
||||
info!("Last finalized block on indexer: {last_block_indexer}");
|
||||
|
||||
assert!(last_block_indexer > 1);
|
||||
|
||||
@ -54,7 +59,7 @@ async fn indexer_block_batching() -> Result<()> {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
info!("Last block on ind now is {last_block_indexer}");
|
||||
info!("Last finalized block on indexer now is {last_block_indexer}");
|
||||
|
||||
assert!(last_block_indexer > 1);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user