Skip to content

cli: promote one block-tick line per N blocks to INFO — operators have no visible heartbeat #333

@obchain

Description

@obchain

Problem

charon listen logs every received block at DEBUG only (crates/charon-cli/src/main.rs:918). Under the default RUST_LOG=info filter the only post-startup log lines are WARN/ERROR from oracle / Venus / RPC failures. Operators watching the terminal during a demo see nothing for minutes at a time and assume the bot is hung. The block listener is in fact ticking — the only proof is curl localhost:9091/metrics | grep blocks_received.

Proposed fix

Add a low-frequency heartbeat at INFO:

// In the NewBlock arm of run_listen
if number % 50 == 0 {
    info!(chain = %chain, block = number, "block listener tick");
}

Or make the cadence configurable via [bot] heartbeat_blocks = 50 and default to 50 (~150s on BSC).

Acceptance

  • A line every ~150s under default config.
  • Existing DEBUG line preserved for high-resolution debugging.

Found during the local mainnet validation walk on 2026-04-25.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlayer:rustRust crates (core / scanner / protocols / executor / cli)priority:p2-polishNice-to-have / polishstatus:readyScoped and ready to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions