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

Copy link
Copy Markdown
Collaborator

Adds three operational artifacts:

  • MANUAL_TESTING_GUIDE.md — comprehensive manual testing reference
    (endpoints, negative flows, CORS matrix, compression, concurrency,
    load) for deep deployment validation.

  • DEPLOYMENT_SMOKE_TESTING_GUIDE.md — per-deploy 5-10 minute checklist
    covering reachability, core JSON-RPC methods, one real proving flow,
    invalid-request handling, and concurrency protection.

  • deployment_smoke.sh — automated smoke script that mirrors the smoke
    guide's checks, prints a PASS/FAIL summary, and supports
    KEEP_ARTIFACTS / TX_HASH / LOOKBACK_BLOCKS overrides for debugging.

@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 smoke-test script only; no changes to prover runtime, RPC, or proving logic.

Overview
Adds post-deploy operational validation for starknet_transaction_prover: a short DEPLOYMENT_SMOKE_TESTING_GUIDE.md (~5–10 min checklist) and an executable deployment_smoke.sh that runs the same checks and exits with a PASS/FAIL summary.

The guide documents prerequisites (PROVER_URL, CHAIN_RPC_URL, fee-field config for real txs), optional env overrides (TX_HASH, LOOKBACK_BLOCKS, KEEP_ARTIFACTS, OHTTP_SMOKE, TLS_MIN_DAYS, MAX_REQUEST_BODY_SIZE), and manual curl/jq steps for health (starknet_specVersion), compression, TLS, OHTTP keys, oversize bodies, malformed params, a chain-sourced starknet_proveTransaction happy path, and concurrency/recovery (including -32005).

The script automates those checks: it reads SPEC_VERSION from rpc_impl.rs, scans recent blocks (or uses TX_HASH) for an INVOKE v3 tx to build a prove request, tolerates unreachable RPCs under set -e via || true, preserves temp artifacts on failure or when KEEP_ARTIFACTS=true, and skips TLS/OHTTP/body-size checks when not applicable or when python3/openssl are missing.

Reviewed by Cursor Bugbot for commit 649e3c3. 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
-d "$(cat "$TMP_DIR/prove_request_valid.json")" > "$TMP_DIR/concurrency_$i.json"
) &
pids+=("$!")
done

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Concurrency curl calls lack timeout, risking indefinite hang

Low Severity

The three concurrent curl calls in check_concurrency_and_recovery are the only network calls in the script without a --max-time limit. Every other call goes through rpc_call_prover or rpc_call_chain, both of which set --max-time 30. If the prover is slow or unresponsive, the wait loop blocks indefinitely, which is problematic for a script targeting a 5–10 minute runtime and likely used in CI/CD pipelines.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8161746. Configure here.

@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

@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 5 potential issues.

There are 6 total unresolved issues (including 1 from previous review).

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 649e3c3. Configure here.

# `|| true` keeps the script alive when the prover is unreachable so the EXIT trap still
# prints PASS/FAIL totals; the check-level code surfaces the empty body via a FAIL entry.
curl -sS --max-time 30 "$PROVER_URL" -H 'content-type: application/json' -d "$payload" || 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.

Prove requests use thirty second timeout

High Severity

rpc_call_prover applies a 30-second curl limit to every prover call, including starknet_proveTransaction. Real proving often exceeds that window, so the happy-path and recovery checks can fail with empty responses even when the service is healthy.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 649e3c3. Configure here.

pass_step "TLS cert valid for $days_left days (≥ $min_days)"
else
fail_step "TLS cert expires in $days_left days (< $min_days); notAfter=$not_after"
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.

TLS expiry parsing needs GNU date

Medium Severity

check_tls_certificate parses OpenSSL’s notAfter with date -d, which is GNU-specific. On macOS or BSD, parsing fails, expiry_epoch becomes 0, and valid certificates are reported as expiring immediately.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 649e3c3. Configure here.


tx_hash=$(rpc_call_chain "{\"jsonrpc\":\"2.0\",\"id\":101,\"method\":\"starknet_getBlockWithTxs\",\"params\":[{\"block_number\":$block_number}]}" \
| jq -r --arg tx_type "$tx_type" --arg tx_version "$tx_version" \
'[.result.transactions[] | select(.type==$tx_type and .version==$tx_version) | .transaction_hash] | .[0] // empty')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Block scan aborts on RPC errors

Medium Severity

With set -o pipefail, a failed jq filter on a bad starknet_getBlockWithTxs response aborts find_tx_hash instead of skipping that block. The whole script can exit before the PASS/FAIL summary when the chain RPC returns errors for some heights.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 649e3c3. Configure here.

fi
if ! command -v openssl >/dev/null 2>&1; then
fail_step "TLS cert check skipped — openssl not installed on this host"
return 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

OpenSSL missing still marks failure

Low Severity

When PROVER_URL is HTTPS and openssl is missing, the script calls fail_step with a “skipped” message but still returns without treating the check as optional, so FAIL_COUNT rises and the deployment gate fails.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 649e3c3. Configure here.

fail_step "/ohttp-keys response missing cache-control header"
return 0
fi
pass_step "/ohttp-keys returns non-empty, cacheable key material"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

OHTTP omits non-zero max-age

Low Severity

check_ohttp_keys only requires a cache-control header, while the smoke guide requires a non-zero max-age. Responses like Cache-Control: no-cache can pass the script but fail the documented deployment criteria.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 649e3c3. 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