Made calling meta_tx_v0 not crashl cairo test. - #10219
Conversation
PR SummaryLow Risk Overview Hitting this syscall during Reviewed by Cursor Bugbot for commit 8e0da98. Bugbot is set up for automated code reviews on this repo. Configure here. |
eytan-starkware
left a comment
There was a problem hiding this comment.
@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
left a comment
There was a problem hiding this comment.
@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.
821c0c1 to
8e0da98
Compare
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware reviewed 1 file and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on TomerStarkware).

Summary
Replace
panic!withfail_syscall!for theMetaTxV0syscall handler, so that unsupported meta transactions result in a graceful syscall failure rather than a hard process panic.Type of change
Please check one:
Why is this change needed?
Using
panic!in a syscall handler causes the entire runner process to abort when aMetaTxV0syscall 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
MetaTxV0syscall caused an immediate process panic with the message"Meta transaction is not supported.".What is the behavior or documentation after?
Calling the
MetaTxV0syscall now returns a syscall failure with the messageb"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