Skip to content

refactor(validator): refactor gRPC server implementation#1959

Merged
kkovaacs merged 5 commits intonextfrom
krisztian/refactor-validator-grpc-server
Apr 22, 2026
Merged

refactor(validator): refactor gRPC server implementation#1959
kkovaacs merged 5 commits intonextfrom
krisztian/refactor-validator-grpc-server

Conversation

@kkovaacs
Copy link
Copy Markdown
Contributor

@kkovaacs kkovaacs commented Apr 20, 2026

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

Base automatically changed from krisztian/grpc-servers to next April 21, 2026 08:05
This commit refactors the gRPC server implementation in the validator
crate. The API implementation is now split into separate modules for
each endpoint.
@kkovaacs kkovaacs force-pushed the krisztian/refactor-validator-grpc-server branch from aa3a80b to 3da29dc Compare April 21, 2026 08:57
@kkovaacs kkovaacs marked this pull request as ready for review April 21, 2026 09:19
@kkovaacs kkovaacs requested a review from Copilot April 21, 2026 09:19
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.

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.

Comment thread crates/validator/src/server/status.rs
Comment thread crates/validator/src/server/sign_block.rs Outdated
Comment thread CHANGELOG.md Outdated
kkovaacs and others added 2 commits April 21, 2026 12:52
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

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

Choose a reason for hiding this comment

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

I didn't inspect the code too much with the assumption that its largely a copy-paste from the original.

Comment thread crates/validator/src/server/sign_block.rs
Comment thread crates/validator/src/server/status.rs
@kkovaacs kkovaacs requested a review from sergerad April 21, 2026 14:38
@kkovaacs kkovaacs merged commit cc919d0 into next Apr 22, 2026
18 checks passed
@kkovaacs kkovaacs deleted the krisztian/refactor-validator-grpc-server branch April 22, 2026 06:12
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.

Migrate validator gRPC server to new codegen

4 participants