Skip to content

starknet_transaction_prover: relay opaque additional_data on proveTransaction response#14411

Open
avi-starkware wants to merge 1 commit into
avi/screening/prover-parse-signaturefrom
avi/screening/prover-additional-data
Open

starknet_transaction_prover: relay opaque additional_data on proveTransaction response#14411
avi-starkware wants to merge 1 commit into
avi/screening/prover-parse-signaturefrom
avi/screening/prover-additional-data

Conversation

@avi-starkware

@avi-starkware avi-starkware commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

ProveTransactionResult gains an optional additional_data field carrying the opaque object the blocking check relayed. The prover passes it through verbatim (omitted from the JSON response when absent) and never interprets its contents — a screened deposit's signature lives under additional_data.signature, but that is the screening/wallet domain's concern, not the prover's. additional_data must be a JSON object; a non-object value maps to Inconclusive (fail-open policy). A transaction allowed via fail-open carries none.

Follow-up (separate change, not in this stack): document additional_data as an opaque/open object on the starknet_proveTransaction result in the external starknet-specs proving-api OpenRPC (starkware-libs/starknet-specs#389), then bump resources/starknet_specs_rev.txt. The committed mock fixture intentionally omits additional_data, so the pinned-spec validation is unaffected; the opaque relay is covered by serde tests.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

avi-starkware commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cursor

cursor Bot commented Jun 8, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches prove RPC response shape and blocking-check integration; behavior is pass-through only, but clients may now depend on additional_data for screening workflows.

Overview
ProveTransactionResult now includes an optional additional_data JSON object that is relayed unchanged from the external blocking check’s allow response into the prove RPC result (e.g. screening signature). The prover does not read or validate that payload; it is omitted from JSON when absent.

When a blocking check runs in parallel with proving, prove_with_blocking_check copies additional_data only on an explicit Allowed outcome. Fail-open paths (inconclusive check or timeout) still allow proving but set additional_data to None.

Tests cover an allow response with additional_data, verbatim serde round-trip, and omission when the field is empty.

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

@remollemo remollemo 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.

@remollemo reviewed 2 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ittaysw and Yoni-Starkware).

…nsaction response

ProveTransactionResult gains an optional additional_data field carrying
the opaque object the blocking check relayed; it is passed through verbatim
(omitted from the JSON response when absent) and the prover never interprets
its contents. A transaction allowed via the fail-open policy carries none.
@avi-starkware avi-starkware force-pushed the avi/screening/prover-parse-signature branch from 6e0d222 to f459598 Compare June 8, 2026 13:43
@avi-starkware avi-starkware force-pushed the avi/screening/prover-additional-data branch from a50aab6 to 0059879 Compare June 8, 2026 13:43
@avi-starkware avi-starkware changed the title starknet_transaction_prover: relay screening signature in proveTransaction response starknet_transaction_prover: relay opaque additional_data on proveTransaction response Jun 8, 2026

@Yoni-Starkware Yoni-Starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Yoni-Starkware reviewed all commit messages and made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on avi-starkware, ittaysw, and remollemo).


crates/starknet_transaction_prover/src/proving/blocking_check_integration_test.rs line 182 at r2 (raw file):

    let json = serde_json::to_value(&result).unwrap();
    assert!(json.get("additional_data").is_none());

How can you distinguish between "missing" and "additional_data": null?
Can you check contains or something? similar?

Code quote:

assert!(json.get("additional_data").is_none());

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.

4 participants