Skip to content

starknet_transaction_prover: unit-test the JSON-RPC error mapping - #15034

Draft
avi-starkware wants to merge 1 commit into
avi/privacy/deployment-docs-and-smoke-v2from
avi/privacy/errors-unit-tests
Draft

starknet_transaction_prover: unit-test the JSON-RPC error mapping#15034
avi-starkware wants to merge 1 commit into
avi/privacy/deployment-docs-and-smoke-v2from
avi/privacy/errors-unit-tests

Conversation

@avi-starkware

Copy link
Copy Markdown
Collaborator

runner_error_to_rpc had no test module, so nothing pinned the rule that
upstream Starknet application errors (non-negative codes) are forwarded
verbatim while JSON-RPC infrastructure errors (negative codes) collapse
into -32603. Inverting that condition kept every test green.

Covers both sides of the split, the i32 overflow fallback, the out-of-gas
hint keeping the upstream revert reason, and the pending-block and
validation-error mappings.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

runner_error_to_rpc had no test module, so nothing pinned the rule that
upstream Starknet application errors (non-negative codes) are forwarded
verbatim while JSON-RPC infrastructure errors (negative codes) collapse
into -32603. Inverting that condition kept every test green.

Covers both sides of the split, the i32 overflow fallback, the out-of-gas
hint keeping the upstream revert reason, and the pending-block and
validation-error mappings.
@avi-starkware
avi-starkware force-pushed the avi/privacy/errors-unit-tests branch from 0f4e357 to d987c0b Compare August 25, 2026 20:01
@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
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