Skip to content

refactor(rpc): gRPC codegen should pass request metadata to handle()#2312

Open
kkovaacs wants to merge 5 commits into
nextfrom
krisztian/grpc-pass-request-metadata-to-handle-method
Open

refactor(rpc): gRPC codegen should pass request metadata to handle()#2312
kkovaacs wants to merge 5 commits into
nextfrom
krisztian/grpc-pass-request-metadata-to-handle-method

Conversation

@kkovaacs

@kkovaacs kkovaacs commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

As described in issue #2302 we now have quite a few gRPC method implementations where we're overriding the generated full() method just so that we have access to request metadata (client IP address, header values, etc.).

This PR changes the gRPC codegen so that the handle() method gets passed the gRPC request metadata (in addition to the decoded request).

Please note that we're passing a lightweight tonic::Request<()> instead of the original request because that'd require cloning the payload.

Closes #2302

Changelog

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

Comment thread crates/proto/build.rs Outdated
Comment thread crates/rpc/src/server/api/subscription/proof.rs Outdated
Comment thread crates/rpc/src/server/api/subscription/block.rs Outdated
Comment thread crates/rpc/src/server/api/get_network_note_status.rs Outdated
Comment thread crates/rpc/src/server/api/submit_proven_tx.rs Outdated
@kkovaacs kkovaacs marked this pull request as ready for review July 3, 2026 11:48
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.

gRPC codegen should expose raw request

2 participants