Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding native_submitPlainRequest RPC method #3245

Merged
merged 12 commits into from
Feb 5, 2025

Conversation

silva-fj
Copy link
Contributor

This pull request introduces a new rpc method to submit plain (unencrypted) requests for native calls as well some small refactoring.

Move authentication code from submit_aes_request to a separate module to
improve code organization and reusability. The new module
native_call_authenticated.rs contains the authentication logic and data
structures previously embedded in submit_aes_request.rs.
Improve code readability for AES request handler by:
- Reducing variable shadowing by using block scoping in spawn_blocking
- Making error message more consistent with other error messages
Add new RPC method native_submitPlainRequest to handle unencrypted requests:
- Add PlainRequest struct to represent unencrypted requests
- Register new method in RPC module
- Implement authentication verification for plain requests
- Handle native task execution and response handling
@silva-fj silva-fj requested review from kziemianek, Kailai-Wang and a team January 30, 2025 10:44
Copy link

linear bot commented Jan 30, 2025

Copy link
Member

@kziemianek kziemianek left a comment

Choose a reason for hiding this comment

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

It would be good to have have tests (authentication for example).

@silva-fj
Copy link
Contributor Author

silva-fj commented Feb 3, 2025

It would be good to have have tests (authentication for example).

Yep, we'll do in a separate PR

@silva-fj silva-fj enabled auto-merge (squash) February 5, 2025 09:05
@silva-fj silva-fj merged commit a2f2fb9 into dev Feb 5, 2025
20 checks passed
@silva-fj silva-fj deleted the p-1295-add-native_submitplainrequest-rpc-method branch February 5, 2025 09:06
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.

2 participants