Sitelet https://github.com/starkware-libs/cairo/pull/10219
Skip to content

Made calling meta_tx_v0 not crashl cairo test. - #10219

Merged
orizi merged 1 commit into
mainfrom
orizi/07-20-made_calling_meta_tx_v0_not_crashl_cairo_test
Jul 20, 2026
Merged

orizi merged 1 commit into
mainfrom
orizi/07-20-made_calling_meta_tx_v0_not_crashl_cairo_test

Conversation

@orizi

@orizi orizi commented Jul 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Replace panic! with fail_syscall! for the MetaTxV0 syscall handler, so that unsupported meta transactions result in a graceful syscall failure rather than a hard process panic.


Type of change

Please check one:

  • Bug fix (fixes incorrect behavior)
  • New feature
  • Performance improvement
  • Documentation change with concrete technical impact
  • Style, wording, formatting, or typo-only change

Why is this change needed?

Using panic! in a syscall handler causes the entire runner process to abort when a MetaTxV0 syscall is encountered. This is overly aggressive — the error should be surfaced as a syscall-level failure that the caller can handle, rather than crashing the process.


What was the behavior or documentation before?

Calling the MetaTxV0 syscall caused an immediate process panic with the message "Meta transaction is not supported.".


What is the behavior or documentation after?

Calling the MetaTxV0 syscall now returns a syscall failure with the message b"Meta transaction is not supported.", allowing the error to be handled gracefully by the caller.


Related issue or discussion (if any)

N/A


Additional context

N/A

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

orizi commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

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

@orizi
orizi marked this pull request as ready for review July 20, 2026 07:40
@cursor

cursor Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Single-line change in the test/runner syscall stub only; aligns MetaTxV0 with existing fail_syscall error handling and does not affect production execution paths.

Overview
MetaTxV0 in the Cairo Starknet syscall simulator no longer aborts the runner with panic!. It now uses fail_syscall!, matching other unsupported syscall paths.

Hitting this syscall during cairo test (or other runner-backed runs) surfaces a normal syscall failure with revert data Meta tx is not supported. instead of killing the whole process, so callers and tests can handle “not supported” like other syscall errors.

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

@eytan-starkware eytan-starkware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@eytan-starkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on orizi and TomerStarkware).


crates/cairo-lang-runner/src/casm_run/mod.rs line 866 at r1 (raw file):

            }),
            "MetaTxV0" => execute_handle_helper(&mut |_system_buffer, _gas_counter| {
                fail_syscall!(b"Meta transaction is not supported.")

34 chars

@orizi orizi left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@orizi made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on eytan-starkware and TomerStarkware).


crates/cairo-lang-runner/src/casm_run/mod.rs line 866 at r1 (raw file):

Previously, eytan-starkware wrote…

34 chars

Done.

@orizi
orizi force-pushed the orizi/07-20-made_calling_meta_tx_v0_not_crashl_cairo_test branch from 821c0c1 to 8e0da98 Compare July 20, 2026 10:26

@eytan-starkware eytan-starkware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:lgtm:

@eytan-starkware reviewed 1 file and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on TomerStarkware).

@orizi
orizi added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit 660cfbd Jul 20, 2026
55 checks passed
@orizi
orizi deleted the orizi/07-20-made_calling_meta_tx_v0_not_crashl_cairo_test branch July 20, 2026 10:58
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.

3 participants