Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

feat(rpc): add /kona-rollup-boost/healthz endpoint#3130

Closed
teddyknox wants to merge 1 commit intomainfrom
teddyknox/separate-rollup-boost-healthz
Closed

feat(rpc): add /kona-rollup-boost/healthz endpoint#3130
teddyknox wants to merge 1 commit intomainfrom
teddyknox/separate-rollup-boost-healthz

Conversation

@teddyknox
Copy link
Copy Markdown
Contributor

Summary

Separates rollup boost health into a dedicated /kona-rollup-boost/healthz HTTP endpoint with proper status codes.

Changes

  • Add tower middleware to serve /kona-rollup-boost/healthz with HTTP status codes:
    • 200 OK — healthy
    • 206 Partial Content — L2 healthy but builder unhealthy
    • 503 Service Unavailable — L2 unhealthy
  • Remove rollup_boost_health field from /healthz response
  • Simplify HealthzRpc to only return version info

/// The rollup boost health.
pub rollup_boost_health: mpsc::Sender<RollupBoostHealthQuery>,
}
#[derive(Debug, Default)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you import derive_more you can use derive_more::Constructor and remove the new method below

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to use HealthzRpc::default() instead?

health_tx: mpsc::Sender<RollupBoostHealthQuery>,
) -> Result<ServerHandle, std::io::Error> {
let middleware = tower::ServiceBuilder::new()
.layer(RollupBoostHealthLayer::new(health_tx))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that implemented as a layer and not just a regular RPC endpoint?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So jsonrpsee is a JSON-RPC server, which means everything comes back as HTTP 200 with a JSON body. even errors are just JSON-RPC error objects, not actual HTTP error codes. But the spec for this endpoint wants real HTTP status codes (200/206/503) with plain text bodies... can't do that with a normal RPC method. A tower layer lets us intercept the request before it hits jsonrpsee and just return a raw HTTP response.

inner: S,
/// The rollup boost health query sender.
health_tx: mpsc::Sender<RollupBoostHealthQuery>,
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be a middleware but a simple RPC endpoint. Can you implement this method the same way as we implemented the top-level healthz endpoint? You don't need to redefine a new struct or anything, just add a new method to HealthzApiClient

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See response above

#3130 (comment)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 58.53659% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.2%. Comparing base (2f7145f) to head (4ddf9c3).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/node/service/src/actors/rpc.rs 56.4% 17 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@teddyknox
Copy link
Copy Markdown
Contributor Author

Closing in favor of #3131

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants