Skip to content

starknet_transaction_prover: add deployment smoke script and guide - #14052

Open
avi-starkware wants to merge 1 commit into
avi/privacy/manual-testing-guide-v2from
avi/privacy/deployment-docs-and-smoke-v2
Open

starknet_transaction_prover: add deployment smoke script and guide#14052
avi-starkware wants to merge 1 commit into
avi/privacy/manual-testing-guide-v2from
avi/privacy/deployment-docs-and-smoke-v2

Conversation

@avi-starkware

@avi-starkware avi-starkware commented May 17, 2026

Copy link
Copy Markdown
Collaborator

Adds a per-deploy smoke script and its guide:

  • deployment_smoke.sh — runs the checks in the guide against a live endpoint
    and prints a PASS/FAIL/SKIP summary. TX_HASH, LOOKBACK_BLOCKS and
    KEEP_ARTIFACTS are supported for debugging a failing run.
  • DEPLOYMENT_SMOKE_TESTING_GUIDE.md — the per-deploy checklist, mapping each
    check to its pass criteria and to the MANUAL_TESTING_GUIDE.md section that
    reproduces it manually.

The deep-dive manual guide it references is #14404.

Worth a reviewer's attention:

  • A skipped check is now counted and printed. Previously check_body_size_limit
    (no python3), check_ohttp_keys (OHTTP_SMOKE unset) and
    check_tls_certificate (non-HTTPS URL) each returned without touching a
    counter, so a run that tested none of them printed Overall result: PASS
    indistinguishably from a clean one. SKIP is explicitly not a pass.
  • The oversize body is built with jq rather than python3, which drops the
    interpreter dependency and with it the skip path above.
  • build_valid_prove_request now checks .result != null before reporting
    success. del on a null .result returns null and exits 0, so a chain RPC
    answering with a JSON-RPC error produced a request built around
    params[1]: null, a spurious PASS, and downstream failures that blamed the
    prover.
  • The temp dir is created below the early exit 2 paths, which previously
    leaked it.
  • The /ohttp-keys max-age check is anchored to the cache-control line. An
    unanchored match is satisfied by an ingress-added
    strict-transport-security: max-age=... while cache-control says
    max-age=0.
  • Malformed params assert -32602 rather than any error, so the check can no
    longer pass on -32601 (method missing) or -32603 (handler threw).
  • Numeric env vars are validated before reaching bash arithmetic, which
    evaluates command substitution.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@cursor

cursor Bot commented May 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation and an external bash smoke-test harness only; no changes to prover runtime, auth, or on-chain logic.

Overview
Adds post-deploy smoke validation for starknet_transaction_prover: a checklist (DEPLOYMENT_SMOKE_TESTING_GUIDE.md) and an executable runner (deployment_smoke.sh) that operators invoke with PROVER_URL and CHAIN_RPC_URL.

The script exercises /health, starknet_specVersion (expected value read from rpc_impl.rs or SPEC_VERSION), gzip compression, optional HTTPS cert and OHTTP key checks, oversized-body rejection, malformed-params (-32602), pending-block rejection, a real INVOKE v3 prove happy path (chain tx discovery or TX_HASH), and a small concurrent-prove burst with recovery. It prints PASS/FAIL/SKIP counts and preserves temp artifacts on failure or when KEEP_ARTIFACTS=true.

Operational safeguards in the script include redacted URL logging, numeric env validation before bash arithmetic, explicit skips (not silent passes) for TLS/OHTTP preconditions, jq-built oversize payloads (no python3), stricter JSON-RPC error assertions, and chain-RPC null checks when assembling prove requests.

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

Comment thread crates/starknet_transaction_prover/deployment_smoke.sh
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh Outdated
@avi-starkware
avi-starkware force-pushed the avi/privacy/exhaustive-error-spec-test-v2 branch from 5ea83ee to 3457808 Compare May 17, 2026 17:39
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from 49aebc4 to 0d65f02 Compare May 17, 2026 17:39
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh Outdated
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh Outdated
@avi-starkware
avi-starkware force-pushed the avi/privacy/exhaustive-error-spec-test-v2 branch from 3457808 to ac2d30f Compare May 17, 2026 19:07
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from 0d65f02 to 5f72fc7 Compare May 17, 2026 19:07
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh
@avi-starkware
avi-starkware force-pushed the avi/privacy/exhaustive-error-spec-test-v2 branch from ac2d30f to cb3ebef Compare May 20, 2026 08:33
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from 5f72fc7 to 8161746 Compare May 20, 2026 08:33
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh Outdated
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh
@avi-starkware
avi-starkware force-pushed the avi/privacy/exhaustive-error-spec-test-v2 branch from cb3ebef to 93accf4 Compare May 31, 2026 10:39
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from 8161746 to e2aec91 Compare May 31, 2026 10:39
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh Outdated
@avi-starkware
avi-starkware changed the base branch from avi/privacy/exhaustive-error-spec-test-v2 to graphite-base/14052 June 7, 2026 11:46
@avi-starkware
avi-starkware force-pushed the graphite-base/14052 branch from 93accf4 to 7a48fbc Compare June 7, 2026 11:46
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from e2aec91 to 649e3c3 Compare June 7, 2026 11:46
@avi-starkware
avi-starkware changed the base branch from graphite-base/14052 to avi/privacy/manual-testing-guide-v2 June 7, 2026 11:46
@avi-starkware avi-starkware changed the title starknet_transaction_prover: add deployment health docs and smoke script starknet_transaction_prover: add deployment smoke script and guide Jun 7, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale.
This PR will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions Bot added the stale label Jul 8, 2026
@avi-starkware
avi-starkware force-pushed the avi/privacy/manual-testing-guide-v2 branch from 7a48fbc to b0918fa Compare July 9, 2026 11:48
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from 649e3c3 to 8b1a523 Compare July 9, 2026 11:48
@avi-starkware
avi-starkware force-pushed the avi/privacy/manual-testing-guide-v2 branch from b0918fa to ad88f40 Compare July 9, 2026 13:03
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from 8b1a523 to 81756c3 Compare July 9, 2026 13:03
fi
else
fail_step "No content-encoding header in response (compression layer may not be active)"
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Compression check false failures

High Severity

check_compression treats a missing content-encoding header on a starknet_specVersion call as failure, but CompressionLayer only compresses responses above tower-http’s size threshold. That RPC response is tiny, so a healthy deployment often passes uncompressed and the smoke run fails check 3.3 anyway.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 81756c3. Configure here.

@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from 81756c3 to dc8880f Compare July 9, 2026 13:57
@avi-starkware
avi-starkware force-pushed the avi/privacy/manual-testing-guide-v2 branch from ad88f40 to 5ed8f8a Compare July 9, 2026 13:57
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh Outdated
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh
@github-actions github-actions Bot removed the stale label Jul 10, 2026
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from dc8880f to 8c6ff4f Compare July 12, 2026 10:09
@avi-starkware
avi-starkware force-pushed the avi/privacy/manual-testing-guide-v2 branch from 5ed8f8a to 663bac2 Compare July 12, 2026 10:09
Comment thread crates/starknet_transaction_prover/deployment_smoke.sh
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from 8c6ff4f to b00c1d4 Compare July 12, 2026 12:39
@avi-starkware
avi-starkware force-pushed the avi/privacy/manual-testing-guide-v2 branch from 663bac2 to 7229c36 Compare July 12, 2026 12:39
@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from b00c1d4 to 6c56049 Compare July 19, 2026 13:25
@avi-starkware
avi-starkware force-pushed the avi/privacy/manual-testing-guide-v2 branch from 7229c36 to 0d54229 Compare July 19, 2026 13:25
echo "Using pre-set TX_HASH=$TX_HASH (skipping block scan)"
echo " Fetching tx receipt for block number..."
TX_BLOCK=$(rpc_call_chain "{\"jsonrpc\":\"2.0\",\"id\":4,\"method\":\"starknet_getTransactionReceipt\",\"params\":[\"$TX_HASH\"]}" \
| jq -r '.result.block_number')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Invalid receipt JSON aborts run

Medium Severity

When TX_HASH is preset, parsing the receipt with jq has no guard under set -e, so empty or non-JSON chain RPC output aborts the script instead of emitting a FAIL summary.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6c56049. Configure here.

@avi-starkware
avi-starkware force-pushed the avi/privacy/deployment-docs-and-smoke-v2 branch from 7678bbf to 583f17f Compare August 25, 2026 20:01
@avi-starkware
avi-starkware force-pushed the avi/privacy/manual-testing-guide-v2 branch from 9ec7826 to 9b3f384 Compare August 25, 2026 20:01

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 583f17f. Configure here.

-H 'content-type: application/json' \
-H 'accept-encoding: gzip' \
-d '{"jsonrpc":"2.0","id":2,"method":"starknet_specVersion","params":[]}' \
-o "$TMP_DIR/compressed_resp.json" 2>&1 || true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Compression check can hang forever

Medium Severity

check_compression issues a curl probe without --max-time, unlike every other HTTP/RPC call in the script. If the prover endpoint hangs or filters stall the connection, the smoke run blocks indefinitely and never reaches the PASS/FAIL summary.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 583f17f. 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.

2 participants