feat(coprocessor): add healthcheck to tx-sender#256
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a health-check endpoint and underlying logic to the transaction-sender service, moves configuration into its own module, and updates dependencies to support HTTP routing.
- Introduces
HealthStatusand ahealth_checkmethod onTransactionSender - Adds an Axum-based HTTP server with
/healthzand/livenessroutes - Extracts
ConfigSettingsintoconfig.rsand bumps the crate version, adding new dependencies
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| transaction_sender.rs | Implemented health_check and imported HealthStatus |
| ops/mod.rs | Extended Op trait with check_provider_connection |
| lib.rs & config.rs | Extracted ConfigSettings; added HealthStatus |
| http_server.rs | New HTTP server exposing health and liveness endpoints |
| Cargo.toml | Bumped version; added Axum, Tower, Serde deps |
Comments suppressed due to low confidence (3)
coprocessor/fhevm-engine/transaction-sender/src/http_server.rs:21
- [nitpick] The
status_codefield is aString; consider using an integer type (e.g.,u16) to better align with HTTP status codes and reduce parsing overhead.
status_code: String,
coprocessor/fhevm-engine/transaction-sender/src/transaction_sender.rs:174
- Add more detailed doc comments describing what downstream errors or partial failures are captured by
health_check, and how callers should interpretHealthStatus.details.
/// Checks the health of the transaction sender's connections
coprocessor/fhevm-engine/transaction-sender/src/transaction_sender.rs:175
- There are no unit tests covering the new
health_checklogic; consider adding tests that simulate healthy/unhealthy database and blockchain scenarios.
pub async fn health_check(&self) -> HealthStatus {
26b3617 to
d886fe8
Compare
paulo-zama
pushed a commit
that referenced
this pull request
Mar 26, 2026
* chore: remove hardhat/contracts This test suite has been migrated to fhecm-test-suite * chore: deploy mocked contracts using only docker image This feature is very useful and practical, using mocked contract is now just a matter of choosing the correct version in the docker compose file * chore: clean Makefile with only relevant test Hardhat test are obsolete now A new script to test api has been added * chore: update config file with mocked addresses Also add a mock_mode option to disable readyness check for user decrypt and public decrypt. In mock mode, contracts are simplified so this check is not needed and blocking (because allows and add ciphertext are missing) * chore: use config options Before private key was read by env, but now all the options in config file could be defined (and have the priority over config file) as env variable starting with APP_... Example: APP_TRANSACTION__PRIVATE_KEY_FHEVM_ENV=0x... APP_TRANSACTION__PRIVATE_KEY_GATEWAY_ENV=0x... * chore: use hard coded key using same key as relayer triggered errors TODO: use the key from a config file * feat: add mock mode to disable readyness check Bonus: use signature for input proof instead of manual hash * feat: allow to have private key with or without 0x * chore: add ability to pull private image delete obsolete workflow, test image is now in fhevm-test-suite * chore: update after rebase * chore: update test workflow to also run api test * chore: set privatekey for test against fhevm chain * chore: build and run in background clean process + lint * chore: update Makefile * chore: add unit test for verifyProofRequest
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.
No description provided.