Skip to content

feat(blockchain): count proposals whose build tick was skipped - #676

Open
zexoverz wants to merge 2 commits into
lambdaclass:mainfrom
zexoverz:feat/count-skipped-build-ticks
Open

zexoverz wants to merge 2 commits into
lambdaclass:mainfrom
zexoverz:feat/count-skipped-build-ticks

Conversation

@zexoverz

Copy link
Copy Markdown

🗒️ Description / Motivation

When a late tick jumps over an interval 4 where we propose the next slot, that block is never built and lean_block_building_failures_total stays at 0. This makes the case visible.

What Changed

  • crates/blockchain/src/lib.rs: skipped_build_slots finds the interval-4 ticks a late tick jumped over; on_tick logs a warn and bumps the counter for each one where we are the proposer.
  • crates/blockchain/src/metrics.rs: lean_block_proposals_missed_total.
  • docs/metrics.md: one row for the new metric.

Correctness / Behavior Guarantees

Log and metric only. The root cause at the rotation wrap is left alone.

Tests Added / Run

Three unit tests for skipped_build_slots. They cover the helper, not its call inside on_tick.

Related Issues / PRs

✅ Verification Checklist

  • Ran make fmt — clean
  • Ran make lint (clippy with -D warnings) — clean
  • Ran make test (cargo test --workspace --profile release-fast) — all passing

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant