Skip to content

Conversation

@qj0r9j0vc2
Copy link
Member

Summary

  • Fix validator sync lag issue where one of four validators consistently falls behind during devnet startup
  • Changed get_history_min_height() to return 0 instead of 1 when history is empty

Problem

At startup, tip_height=0 but history_min_height=1 was returned, creating an empty range 1..=0. Peers couldn't serve any height from this invalid range, causing lagging validators to fail sync.

Solution

Return history_min_height=0 when empty, creating valid range 0..=0. Peers correctly report no blocks available until first block is decided.

Test plan

  • Added unit tests for empty history case
  • All 56 consensus tests pass
  • Full workspace tests pass

@qj0r9j0vc2
Copy link
Member Author

Added second fix: set queue_capacity = 10 in engine config.

Root cause discovered: The BoundedQueue for buffering consensus inputs had capacity 0 (default), causing all sync responses for future heights to be silently dropped. This prevented validators from catching up via sync.

@qj0r9j0vc2 qj0r9j0vc2 self-assigned this Jan 29, 2026
@qj0r9j0vc2 qj0r9j0vc2 merged commit f41d2d0 into main Jan 29, 2026
10 checks passed
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.

2 participants