Skip to content

starknet_os: os resources test - library call#14129

Open
dorimedini-starkware wants to merge 1 commit into
graphite-base/14129from
05-21-starknet_os_os_resources_test_-_library_call
Open

starknet_os: os resources test - library call#14129
dorimedini-starkware wants to merge 1 commit into
graphite-base/14129from
05-21-starknet_os_os_resources_test_-_library_call

Conversation

@dorimedini-starkware
Copy link
Copy Markdown
Collaborator

No description provided.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Collaborator Author

dorimedini-starkware commented May 21, 2026

@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_os_resources_test_-_library_call branch from 8b1afb6 to a3596f2 Compare May 24, 2026 06:50
@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_initial_test_measure_call_contract_resources branch from a5cf1a7 to c7c8260 Compare May 24, 2026 06:50
@github-actions
Copy link
Copy Markdown

Artifacts upload workflows:

@cursor
Copy link
Copy Markdown

cursor Bot commented May 24, 2026

PR Summary

Medium Risk
Updates fee/resource constants and OS program hashes used for proving and execution; incorrect values would affect gas accounting and client-side proving compatibility.

Overview
Adds library_call to the OS resources regression path so its Starknet OS overhead is measured end-to-end like call_contract.

The test contract’s __execute__ now invokes library_call_syscall against empty_function, and LibraryCall is removed from the unmeasurable syscall list so test_os_resources_regression can assert LibraryCall costs in versioned constants. Measured LibraryCall VM cost drops from 879 to 872 steps, with LIBRARY_CALL_GAS_COST aligned to 88460 in Cairo OS constants and 0.14.3 blockifier JSON. OS and virtual OS program hashes in program_hash.json and the allowed virtual hash list are refreshed to match the rebuilt program.

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

@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_os_resources_test_-_library_call branch from a3596f2 to ec08192 Compare May 24, 2026 10:15
@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_initial_test_measure_call_contract_resources branch from c7c8260 to bd46d55 Compare May 24, 2026 10:15
@dorimedini-starkware dorimedini-starkware changed the base branch from 05-21-starknet_os_initial_test_measure_call_contract_resources to graphite-base/14129 May 24, 2026 11:40
@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_os_resources_test_-_library_call branch from ec08192 to b88d6c1 Compare May 24, 2026 13:12
@dorimedini-starkware dorimedini-starkware changed the base branch from graphite-base/14129 to 05-21-starknet_os_initial_test_measure_call_contract_resources May 24, 2026 13:12
@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_initial_test_measure_call_contract_resources branch from ae772fc to 6a1a1c1 Compare May 24, 2026 17:03
@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_os_resources_test_-_library_call branch from b88d6c1 to 24bc2a4 Compare May 24, 2026 17:03
@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_os_resources_test_-_library_call branch from 24bc2a4 to 7facbbd Compare May 25, 2026 09:48
@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_initial_test_measure_call_contract_resources branch from 6a1a1c1 to 2dc8f91 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 7facbbd. Configure here.

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

Choose a reason for hiding this comment

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

Regression diff missing LibraryCall n_steps change

Low Severity

The regression diff file between 0.14.2 and 0.14.3 was updated to reflect the new allowed_virtual_os_program_hashes value, but it's missing the LibraryCall n_steps change from 879 (in 0.14.2) to 872 (in 0.14.3). This omission means the regression diff file no longer accurately captures all differences between the two versions, which will likely cause the associated regression test to fail.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7facbbd. Configure here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The CI is green, how can it be @dorimedini-starkware?

@dorimedini-starkware dorimedini-starkware force-pushed the 05-21-starknet_os_os_resources_test_-_library_call branch from 7facbbd to bf48e42 Compare May 25, 2026 15:37
@dorimedini-starkware dorimedini-starkware changed the base branch from 05-21-starknet_os_initial_test_measure_call_contract_resources to graphite-base/14129 May 25, 2026 15:51
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 5 files and all commit messages, and made 1 comment.
Reviewable status: 5 of 6 files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware).

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

Choose a reason for hiding this comment

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

The CI is green, how can it be @dorimedini-starkware?

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.

:lgtm:

@Yoni-Starkware made 1 comment.
Reviewable status: 5 of 6 files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware).

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