feat: use /status over /state for checking liveness#533
Merged
ChaoticTempest merged 4 commits intodevelopfrom Sep 26, 2025
Merged
feat: use /status over /state for checking liveness#533ChaoticTempest merged 4 commits intodevelopfrom
ChaoticTempest merged 4 commits intodevelopfrom
Conversation
volovyks
reviewed
Sep 22, 2025
chain-signatures/node/src/web/mod.rs
Outdated
| #[tracing::instrument(level = "debug", skip_all)] | ||
| async fn status(Extension(web): Extension<Arc<AxumState>>) -> Json<StateStatus> { | ||
| let status = match web.node.status() { | ||
| NodeStatus::Started | NodeStatus::Starting => StateStatus::NotRunning, |
Contributor
There was a problem hiding this comment.
Let's reuse the existing NodeStatus enum type. The difference is only in the naming of a single field.
ppca
previously approved these changes
Sep 22, 2025
chain-signatures/node/src/web/mod.rs
Outdated
| #[tracing::instrument(level = "debug", skip_all)] | ||
| async fn status(Extension(web): Extension<Arc<AxumState>>) -> Json<StateStatus> { | ||
| let status = match web.node.status() { | ||
| NodeStatus::Started | NodeStatus::Starting => StateStatus::NotRunning, |
jakmeier
previously approved these changes
Sep 25, 2025
Co-authored-by: Jakob Meier <inbox@jakobmeier.ch>
volovyks
approved these changes
Sep 26, 2025
ppca
approved these changes
Sep 26, 2025
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.
This utilizes a new endpoint called
/statusto check for liveness./statemakes use of 4 different calls to redis which can be slow if we have too many calls to redis at the same time. This could be the case when we're generating a ton of triples and presignatures and there's many writes to it, with congestion to the redis connection pool./statusdoes none of these redis calls and purely checks the current protocol state (i.e.Running,Resharing,Generating, ...).Should wait until #532 gets merged first to see an improvement in our web endpoint metrics