-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add signature verification to node response #105
base: main
Are you sure you want to change the base?
feat: add signature verification to node response #105
Conversation
@@ -332,6 +335,7 @@ pub async fn confidential_image_generations_create( | |||
) | |||
)] | |||
#[allow(clippy::too_many_arguments)] | |||
#[allow(clippy::significant_drop_tightening)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've allowed this as refactoring would be quite substantial, see #210
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -463,6 +462,11 @@ impl Stream for Streamer { | |||
} | |||
} else if let Some(usage) = chunk.get(USAGE) { | |||
self.status = StreamStatus::Completed; | |||
let _ = { | |||
let guard = self.sui.blocking_read(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How safe is it to have a blocking_read
in an async stream ?
Another possibility is poll::pending and add logic to the poll next method to handle when a signature is ready, but that's a bit too much of hassle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point, we actually try caching the keystore
when creating the Streamer to avoid locking during stream processing, wdyt?
No description provided.