Skip to content

starknet_os: os resources test - add 3 more syscalls#14138

Open
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_remove_all_fee_transfer_syscallsfrom
05-23-starknet_os_os_resources_test_-_add_3_more_syscalls
Open

starknet_os: os resources test - add 3 more syscalls#14138
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_remove_all_fee_transfer_syscallsfrom
05-23-starknet_os_os_resources_test_-_add_3_more_syscalls

Conversation

@dorimedini-starkware
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Collaborator Author

dorimedini-starkware commented May 24, 2026

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@dorimedini-starkware dorimedini-starkware self-assigned this May 24, 2026
@dorimedini-starkware dorimedini-starkware marked this pull request as ready for review May 24, 2026 07:03
@cursor
Copy link
Copy Markdown

cursor Bot commented May 24, 2026

PR Summary

Medium Risk
Updates versioned OS/syscall gas and resource constants plus program hashes used for proving and execution accounting; incorrect values would break fee estimation or client-side OS validation.

Overview
Extends the OS resources regression path so GetBlockHash, GetClassHashAt, and GetExecutionInfo are exercised and measured instead of treated as unmeasurable.

The Cairo1 OsResourcesTestContract now invokes those syscalls in __execute__, and UNMEASURABLE_SYSCALLS drops the three selectors. Measured VM steps and builtins in blockifier_versioned_constants_0_14_3.json are updated accordingly, along with matching syscall gas costs in OS constants.cairo and refreshed os / virtual_os program hashes in program_hash.json and the allowed virtual OS hash list.

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

@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_remove_all_fee_transfer_syscalls branch from cd7ac82 to 72d6d62 Compare May 24, 2026 20:08
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_3_more_syscalls branch from e55a063 to 01423bf Compare May 24, 2026 20:08
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_remove_all_fee_transfer_syscalls branch from 72d6d62 to ba9b395 Compare May 25, 2026 09:48
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_3_more_syscalls branch from 01423bf to 5d943b5 Compare May 25, 2026 09:48
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5d943b5. Configure here.

@@ -1,2 +1,2 @@
~ /enable_casm_hash_migration: true
+ /os_constants/allowed_virtual_os_program_hashes/1: "0x4fb8c0cb28349d61091f3fc633493c01385f77cd0d4ebfd577251b3941d49b9"
+ /os_constants/allowed_virtual_os_program_hashes/1: "0x7b33f87bb36acce52d403e202c5d490d316910ab68d6264c9afde698ad52fc6"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Diff regression file missing OS resource changes

Medium Severity

The 0.14.2_0.14.3.txt diff regression file only captures the allowed virtual OS program hash change, but the PR also modifies OS resource values in the 0.14.3 JSON that differ from 0.14.2: GetBlockHash n_steps (107→106) and range_check_builtin (2→3), GetClassHashAt n_steps (89→75), and GetExecutionInfo n_steps (125→111). Since the 0.14.2 JSON was not changed, the test_vc_diffs_regression test will compute these as Replace operations in the JSON diff but the expected file doesn't include them, causing the test to fail.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5d943b5. Configure here.

Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

@Yoni-Starkware reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: 4 of 6 files reviewed, 2 unresolved discussions (waiting on dorimedini-starkware).


crates/blockifier_test_utils/resources/feature_contracts/cairo1/os_resources_test_contract.cairo line 104 at r1 (raw file):

        // get execution info syscall.
        get_execution_info_v2_syscall().unwrap_syscall();

Same OS impl though

Suggestion:

get_execution_info_v3_syscall()

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