Skip to content

feat: improve sequencer healthcheck to return HealthStatus#418

Open
ygd58 wants to merge 4 commits intologos-blockchain:mainfrom
ygd58:feat/sequencer-healthcheck
Open

feat: improve sequencer healthcheck to return HealthStatus#418
ygd58 wants to merge 4 commits intologos-blockchain:mainfrom
ygd58:feat/sequencer-healthcheck

Conversation

@ygd58
Copy link
Copy Markdown
Contributor

@ygd58 ygd58 commented Mar 28, 2026

Refs #244.

Returns HealthStatus { chain_height, is_healthy } instead of ().
Clients can poll chain_height to verify sequencer is progressing.

Follow-up: add block progression check inside the endpoint.

ygd58 added 3 commits March 28, 2026 19:49
Previously check_health() always returned Ok(()) without checking
anything meaningful. A sequencer could be stuck and still pass.

Now check_health() returns the current chain height (BlockId).
Clients can call this twice with a delay to verify the chain is
progressing.

Refs logos-blockchain#244
Previously check_health() always returned Ok(()) - completely useless.

Now returns HealthStatus { chain_height, is_healthy } so clients can:
1. Call check_health() once to get current chain_height
2. Wait a few seconds
3. Call again - if chain_height increased, sequencer is healthy

Refs logos-blockchain#244
is_healthy is now true only if the block store is accessible and
has produced at least the genesis block.

Clients should poll chain_height twice with a delay to verify
the sequencer is making progress.

Refs logos-blockchain#244
@ygd58
Copy link
Copy Markdown
Contributor Author

ygd58 commented Mar 28, 2026

Update ✅

Added meaningful is_healthy check:

  • Returns true only if block store is accessible and has genesis block
  • chain_height field allows clients to poll twice and verify progress

This addresses the core issue from #244 where check_health() always returned Ok(()) without checking anything.

@schouhy
Copy link
Copy Markdown
Collaborator

schouhy commented Apr 22, 2026

Thanks for the PR. The sequencer service already has endpoints to return chain height.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants