refactor(validator): refactor gRPC server implementation#1959
Merged
Conversation
This commit refactors the gRPC server implementation in the validator crate. The API implementation is now split into separate modules for each endpoint.
aa3a80b to
3da29dc
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the validator gRPC API implementation to the new per-method trait-based framework and splits each RPC method into its own module, aligning with the approach described in #1885.
Changes:
- Migrated validator RPC method implementations to generated per-method traits (
Status,SubmitProvenTransaction,SignBlock). - Split each validator RPC method into its own file under
crates/validator/src/server/. - Added a changelog entry documenting the validator gRPC server refactor.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/validator/src/server/mod.rs | Removes the direct api_server::Api impl and wires the server to rely on the new generated blanket implementation; adds per-method modules. |
| crates/validator/src/server/status.rs | Implements the per-method Status trait for ValidatorServer. |
| crates/validator/src/server/submit_proven_transaction.rs | Implements the per-method SubmitProvenTransaction trait, including decode/handle/encode split. |
| crates/validator/src/server/sign_block.rs | Implements the per-method SignBlock trait, including decode/handle/encode split and semaphore serialization. |
| CHANGELOG.md | Documents the validator gRPC API refactor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Mirko-von-Leipzig
approved these changes
Apr 21, 2026
Collaborator
Mirko-von-Leipzig
left a comment
There was a problem hiding this comment.
I didn't inspect the code too much with the assumption that its largely a copy-paste from the original.
sergerad
approved these changes
Apr 22, 2026
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.
As outlined in #1885, after having the build-time generation of related traits and blanket implementations (PR #1950) we can start moving our GRPC API implementations to the new framework.
This PR does this for the validator GRPC API. As suggested in the issue, each method is moved to its own file.
Closes #1970