Add REST Endpoint /health to sender crate with configurable port#92
Open
Sajjon wants to merge 1 commit into
Open
Add REST Endpoint /health to sender crate with configurable port#92Sajjon wants to merge 1 commit into
/health to sender crate with configurable port#92Sajjon wants to merge 1 commit into
Conversation
Sajjon
commented
Nov 5, 2025
c4a6109 to
cf57946
Compare
sandreim
reviewed
Nov 6, 2025
| } | ||
|
|
||
| let health_node_url = args.node_url.clone(); | ||
| spawn_healthcheck_server(args.health_port, move || create_api(health_node_url.clone())); |
Contributor
There was a problem hiding this comment.
This will pass in a different API instance than the one used in the sender. Please check that we createa a new one at line 257.
| Value { value: ValueDef::Primitive(Primitive::U128(u128::MAX)), context: () }; | ||
|
|
||
| async fn health_handler(State(api): State<Arc<OnlineClient<PolkadotConfig>>>) -> StatusCode { | ||
| match api.backend().latest_finalized_block_ref().await { |
Contributor
There was a problem hiding this comment.
This will not cover all cases. Due to some other errors the tx sending loop could get stuck or not able to reconnect. This has happened before.
My suggestion is to actually look if we are able to push transactions to the chain. If we can't do it for say 30s, we should return that service is not available.
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.
Adds a REST endpoint to
sendercrate.You can cherry pick commit: Sajjon@bdbd423