Skip to content

starknet_os: os resources test - support virtual builtins, add sha256#14141

Open
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_define_sha256_batch_resources_constantsfrom
05-23-starknet_os_os_resources_test_-_support_virtual_builtins_add_sha256
Open

starknet_os: os resources test - support virtual builtins, add sha256#14141
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_define_sha256_batch_resources_constantsfrom
05-23-starknet_os_os_resources_test_-_support_virtual_builtins_add_sha256

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
Changes published OS program hashes and syscall gas/resource constants used for fee accounting; scope is calibration and tests, not new runtime features.

Overview
Updates SHA256 process-block costing to match revised OS execution: SHA256_PROCESS_BLOCK_GAS_COST and Sha256ProcessBlock step/builtin counts are lowered, and OS / virtual OS program hashes in program_hash.json are refreshed accordingly.

The OS resources regression path now measures Sha256ProcessBlock (removed from unmeasurable syscalls). Because SHA256 work runs on a virtual builtin after execute_syscalls, measured traces are adjusted by adding a per-block share of SHA256_BATCH_RESOURCES_LINEAR (using shared SHA256_BLOCK_TO_ROUND and public BUILTIN_INSTANCE_SIZES). The Cairo1 os resources test contract invokes sha256_process_block_syscall so the syscall appears in the flow test.

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

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 035e95f. Configure here.

Comment thread crates/starknet_os_flow_tests/src/os_resources_test.rs
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_support_virtual_builtins_add_sha256 branch from 90ce97f to b11e870 Compare May 24, 2026 20:08
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_define_sha256_batch_resources_constants branch from e94b0c7 to 908973c Compare May 24, 2026 20:08
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.

2 participants