starknet_transaction_prover: relay opaque additional_data on proveTransaction response#14411
Conversation
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryMedium Risk Overview When a blocking check runs in parallel with proving, Tests cover an allow response with Reviewed by Cursor Bugbot for commit 0059879. Bugbot is set up for automated code reviews on this repo. Configure here. |
remollemo
left a comment
There was a problem hiding this comment.
@remollemo reviewed 2 files and all commit messages.
Reviewable status: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.
6e0d222 to
f459598
Compare
a50aab6 to
0059879
Compare
Yoni-Starkware
left a comment
There was a problem hiding this comment.
@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());
ProveTransactionResult gains an optional
additional_datafield 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 underadditional_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_dataas an opaque/open object on thestarknet_proveTransactionresult in the externalstarknet-specsproving-api OpenRPC (starkware-libs/starknet-specs#389), then bumpresources/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