Skip to content

starknet_transaction_prover: extract the TLS accept loop and test its drain - #15049

Open
avi-starkware wants to merge 1 commit into
avi/prover-v3/graceful-shutdownfrom
avi/prover-v3/tls-accept-loop-test
Open

starknet_transaction_prover: extract the TLS accept loop and test its drain#15049
avi-starkware wants to merge 1 commit into
avi/prover-v3/graceful-shutdownfrom
avi/prover-v3/tls-accept-loop-test

Conversation

@avi-starkware

Copy link
Copy Markdown
Collaborator

No description provided.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@einat-starkware einat-starkware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:lgtm:

@einat-starkware reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on avi-starkware).

@avi-starkware
avi-starkware marked this pull request as ready for review August 27, 2026 12:40
@cursor

cursor Bot commented Aug 27, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches server accept/shutdown wiring for the transaction prover; incorrect StopHandle sharing could drop in-flight proofs on stop, though behavior is intended to stay the same and is now covered by a regression test.

Overview
Refactors HTTPS JSON-RPC startup by extracting the TCP accept loop into a generic spawn_accept_loop, with a prepare_stream hook that turns each accepted socket into the stream served by jsonrpsee (TLS handshake in start_tls_server, or plain TCP in tests).

Shutdown behavior is documented explicitly: each connection’s service keeps a StopHandle clone so ServerHandle::stopped() stays pending until in-flight requests finish.

Adds tls_test.rs, which drives spawn_accept_loop over HTTP without certificates and asserts that stop() does not let stopped() complete while a parked RPC is still running, then completes after the handler is released.

Reviewed by Cursor Bugbot for commit bdc52bd. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

3 participants