starknet_os_flow_tests: fuzz test panic scenario#12967
Conversation
01da34e to
5c0e455
Compare
16a121d to
87749de
Compare
47c6516 to
cbf8e66
Compare
6d20d2b to
cd09b3e
Compare
cbf8e66 to
b08c35d
Compare
cd09b3e to
d3e3c0b
Compare
c8811ee to
10c1b46
Compare
7943497 to
27bf044
Compare
Yoni-Starkware
left a comment
There was a problem hiding this comment.
@Yoni-Starkware reviewed 13 files and all commit messages, and made 4 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on dorimedini-starkware).
crates/blockifier_test_utils/resources/feature_contracts/cairo1/fuzz_revert.cairo line 83 at r2 (raw file):
if scenario == SCENARIO_CALL { let contract_address: ContractAddress = orchestrator.pop_front().try_into().unwrap(); let should_unwrap = orchestrator.pop_front();
cast to bool
Code quote:
let should_unwrap = orchestrator.pop_front();crates/blockifier_test_utils/resources/feature_contracts/cairo1/fuzz_revert.cairo line 100 at r2 (raw file):
class_hash, FUZZ_TEST_SELECTOR, array![].span() ); if should_unwrap_with != 0 {
Be consistent
Suggestion:
should_unwrapcrates/blockifier_test_utils/resources/feature_contracts/cairo1/fuzz_revert.cairo line 104 at r2 (raw file):
} else { self.handle_error_catch(orchestrator, result); }
Move inside handle_error_catch?
Code quote:
if should_unwrap_with != 0 {
result.unwrap_syscall();
} else {
self.handle_error_catch(orchestrator, result);
}10c1b46 to
d4939ec
Compare
27bf044 to
c7f3a0b
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware resolved 3 discussions.
Reviewable status: 9 of 13 files reviewed, all discussions resolved (waiting on Yoni-Starkware).
d4939ec to
ef78909
Compare
c7f3a0b to
bb590df
Compare
bb590df to
07749a0
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 8 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on dorimedini-starkware).

Note
Low Risk
Changes are confined to
blockifier_test_utilsfuzz-test contracts and regenerated compiled fixtures; they shouldn’t affect production logic, but can alter flow-test expectations if the new panic/index semantics are incorrect.Overview
Adds a new
SCENARIO_PANICto the fuzz-revert feature contracts so the flow tests can exercise uncatchable panics (Cairo0) and explicitpanic_with_felt252behavior (Cairo1).For Cairo1, this introduces orchestrator
get_index/set_indexAPIs plus shared internal helpers (orchestrator()andhandle_error_catch) so failedcall_contract/library_callscenarios can optionally unwrap or, when caught, restore the orchestrator’s scenario index that would otherwise be reverted by the inner panic.Regenerates the corresponding compiled Cairo0/Cairo1 artifacts (
*.json/*.casm.json) to reflect the new scenario and control-flow changes.Written by Cursor Bugbot for commit 07749a0. This will update automatically on new commits. Configure here.