feat: improve sequencer healthcheck to return HealthStatus#418
Open
ygd58 wants to merge 4 commits intologos-blockchain:mainfrom
Open
feat: improve sequencer healthcheck to return HealthStatus#418ygd58 wants to merge 4 commits intologos-blockchain:mainfrom
ygd58 wants to merge 4 commits intologos-blockchain:mainfrom
Conversation
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
Contributor
Author
Update ✅Added meaningful is_healthy check:
This addresses the core issue from #244 where check_health() always returned Ok(()) without checking anything. |
Collaborator
|
Thanks for the PR. The sequencer service already has endpoints to return chain height. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.