Skip to content

starknet_transaction_prover: unify HTTP middleware stack via macro#14286

Open
avi-starkware wants to merge 1 commit into
main-v0.14.3from
avi/prover-v3/middleware-macro
Open

starknet_transaction_prover: unify HTTP middleware stack via macro#14286
avi-starkware wants to merge 1 commit into
main-v0.14.3from
avi/prover-v3/middleware-macro

Conversation

@avi-starkware

Copy link
Copy Markdown
Collaborator

No description provided.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@avi-starkware avi-starkware marked this pull request as ready for review June 1, 2026 11:22
@cursor

cursor Bot commented Jun 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Pure refactor that centralizes an existing middleware chain; HTTP and HTTPS behavior should stay identical if the macro matches the prior stacks.

Overview
Introduces prover_http_middleware! in server.rs so the plain HTTP (start_server) and HTTPS (tls::start_tls_server) JSON-RPC paths share one tower middleware chain instead of two copy-pasted ServiceBuilder blocks.

Both transports now call prover_http_middleware!(cors_layer, ohttp_layer); layer order is unchanged (health outermost, OHTTP outside compression, body mapping around OHTTP). The long inline comments in each path are replaced by a single doc comment on the macro (including why a macro is used and why it must sit above pub mod tls).

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

@avi-starkware avi-starkware force-pushed the avi/prover-v3/middleware-macro branch from f81df1e to 4b74749 Compare June 7, 2026 10:11
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