Skip to content

starknet_transaction_prover: add TLS integration tests#13138

Open
avi-starkware wants to merge 1 commit intoavi/privacy/cors-and-config-testsfrom
avi/privacy/tls-tests
Open

starknet_transaction_prover: add TLS integration tests#13138
avi-starkware wants to merge 1 commit intoavi/privacy/cors-and-config-testsfrom
avi/privacy/tls-tests

Conversation

@avi-starkware
Copy link
Collaborator

@avi-starkware avi-starkware commented Mar 10, 2026

Summary

  • Add 5 TLS tests: HTTPS request succeeds with self-signed cert, plain HTTP to TLS fails, missing cert file, missing key file, invalid PEM content
  • Use rcgen (new workspace dev-dependency) to generate self-signed certs at test time, avoiding committed fixtures that expire
  • Make load_tls_acceptor pub(crate) for unit-level testing

Test plan

  • SEED=0 cargo test -p starknet_transaction_prover -- tls_test — 5 tests pass
  • SEED=0 cargo test -p starknet_transaction_prover --lib — 103 pass, 0 fail, 6 ignored

🤖 Generated with Claude Code


Note

Low Risk
Low risk: changes are test-only plus a minor visibility tweak (pub(crate)) with no production logic changes.

Overview
Adds a new tls_test.rs suite that spins up the JSON-RPC server over HTTPS with a self-signed certificate and validates both success (HTTPS starknet_specVersion) and failure modes (HTTP-to-TLS, missing cert/key files, invalid PEM).

Introduces rcgen as a (dev) dependency to generate certificates at test time, and makes load_tls_acceptor pub(crate) so it can be unit-tested.

Written by Cursor Bugbot for commit 6b00901. This will update automatically on new commits. Configure here.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from 50f4fea to 3714254 Compare March 10, 2026 14:27
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from cf88612 to 1091461 Compare March 10, 2026 14:27
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch 2 times, most recently from fe7020f to d3a6339 Compare March 10, 2026 14:36
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from 1091461 to 6235e80 Compare March 10, 2026 14:36
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from d3a6339 to c63f0d5 Compare March 10, 2026 14:55
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from 6235e80 to 6a944e0 Compare March 10, 2026 14:55
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from c63f0d5 to e2796ec Compare March 10, 2026 15:07
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from 1eade72 to 662669a Compare March 10, 2026 16:39
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from e2796ec to 61d038d Compare March 10, 2026 16:39
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from 662669a to 783e4ce Compare March 10, 2026 17:16
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from 61d038d to 1ef94b1 Compare March 10, 2026 17:16
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from 783e4ce to a8827f8 Compare March 10, 2026 18:01
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from 1ef94b1 to 2e8b350 Compare March 10, 2026 18:01
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from a8827f8 to 49a3322 Compare March 10, 2026 19:58
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from 2e8b350 to 42fbe3b Compare March 10, 2026 19:58
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from 49a3322 to f479105 Compare March 11, 2026 05:58
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from 42fbe3b to d085339 Compare March 11, 2026 05:58
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from f479105 to cf86175 Compare March 11, 2026 07:18
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from d085339 to 1ad788f Compare March 11, 2026 07:18
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from cf86175 to ce8a83d Compare March 11, 2026 08:01
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from 1ad788f to dfa96ea Compare March 11, 2026 08:01
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from ce8a83d to 8453086 Compare March 11, 2026 08:38
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch 2 times, most recently from 58223bb to ec86e42 Compare March 11, 2026 12:23
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from 8453086 to 8517456 Compare March 11, 2026 12:23
Add 5 tests for the TLS server module:
- HTTPS request succeeds with self-signed cert (specVersion)
- Plain HTTP to TLS server fails (protocol mismatch)
- Missing cert/key file produces error
- Invalid PEM content produces error

Uses rcgen (new workspace dev-dep) to generate self-signed certs at
test time, avoiding committed certificate fixtures that expire.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@avi-starkware avi-starkware force-pushed the avi/privacy/cors-and-config-tests branch from 8517456 to 8155738 Compare March 11, 2026 13:33
@avi-starkware avi-starkware force-pushed the avi/privacy/tls-tests branch from ec86e42 to 6b00901 Compare March 11, 2026 13:33
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