Skip to content

refactor(proto): deprecate tonic-prost generated gRPC server types #2263

Merged
kkovaacs merged 4 commits into
nextfrom
krisztian/grpc-hide-tonic-prost-server-implementation
Jun 18, 2026
Merged

refactor(proto): deprecate tonic-prost generated gRPC server types #2263
kkovaacs merged 4 commits into
nextfrom
krisztian/grpc-hide-tonic-prost-server-implementation

Conversation

@kkovaacs

@kkovaacs kkovaacs commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR introduces public server facade helpers under miden_node_proto::server and migrates node components away from directly constructing tonic-prost generated *Server types such as ApiServer and WorkerStatusApiServer.

The proto build now generates, for each service, a server(service) constructor returning an opaque tower service and a service_name() helper for health reporting. The underlying tonic-prost generated server structs remain available for compatibility, but are now marked deprecated with a note directing callers to use miden_node_proto::server instead. Internal generated code and facade helpers suppress those deprecation warnings so preferred usage remains warning-free.

Runtime server setup in RPC, NTX builder, validator, and remote prover now registers services via the new facade helpers. Health reporting was updated to use generated service names instead of naming concrete tonic server wrapper types. Tests that constructed generated server wrappers were updated to use the facade path, and validator tests now call generated facade method traits directly where appropriate.

Closes #1974

Changelog

changelog = "none"
reason    = "Internal change only."

kkovaacs added 2 commits June 17, 2026 16:35
Instead of directly using the `tonic_prost_build` generated server structs
this change adds a per-server `server()` method returning a service
instance that can be used in our Tonic server setup.

@Mirko-von-Leipzig Mirko-von-Leipzig left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Naming suggestion but LGTM.

Comment thread crates/proto/build.rs Outdated
Comment thread crates/proto/build.rs Outdated
kkovaacs added 2 commits June 18, 2026 08:50
…ed module

This allows for removing the rewriting of the tonic-prost-build generated
server module.
@kkovaacs kkovaacs merged commit fecc84f into next Jun 18, 2026
23 checks passed
@kkovaacs kkovaacs deleted the krisztian/grpc-hide-tonic-prost-server-implementation branch June 18, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate the tonic gRPC servers

3 participants