Skip to content

starknet_os: os resources test - add sha512#14256

Open
dorimedini-starkware wants to merge 1 commit into
05-24-starknet_os_generalize_sha_resource_test_to_include_sha512from
05-27-starknet_os_os_resources_test_-_add_sha512
Open

starknet_os: os resources test - add sha512#14256
dorimedini-starkware wants to merge 1 commit into
05-24-starknet_os_generalize_sha_resource_test_to_include_sha512from
05-27-starknet_os_os_resources_test_-_add_sha512

Conversation

@dorimedini-starkware

Copy link
Copy Markdown
Collaborator

No description provided.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

dorimedini-starkware commented May 28, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cursor

cursor Bot commented May 28, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only and measurement-contract changes; no production fee or syscall execution logic modified.

Overview
Extends the OS resources regression path so Sha512ProcessBlock is measured like SHA-256 instead of being skipped as unmeasurable.

The Cairo OsResourcesTestContract now invokes sha512_process_block_syscall in __execute__. In starknet_os::test_utils, builtin scaling is centralized in scale_builtin_cells, and SHA-512 batch linear costs follow the same unscaled + scaled layout as SHA-256 via SHA512_BATCH_RESOURCES_LINEAR_UNSCALED. os_resources_test treats SHA-512 as a virtual builtin, adjusts measured resources with SHA512_BATCH_RESOURCES_LINEAR_UNSCALED / SHA512_BATCH_SIZE, and drops it from UNMEASURABLE_SYSCALLS so the regression test covers all expected syscalls.

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

@dorimedini-starkware dorimedini-starkware force-pushed the 05-27-starknet_os_os_resources_test_-_add_sha512 branch from 603a864 to 84b8e52 Compare May 29, 2026 14:04
@dorimedini-starkware dorimedini-starkware force-pushed the 05-27-starknet_os_os_resources_test_-_add_sha512 branch 2 times, most recently from 8c2ba59 to eb0adbe Compare June 1, 2026 10:24
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_generalize_sha_resource_test_to_include_sha512 branch from bcfa709 to 71fcf96 Compare June 2, 2026 10:21
@dorimedini-starkware dorimedini-starkware force-pushed the 05-27-starknet_os_os_resources_test_-_add_sha512 branch from eb0adbe to 20daa51 Compare June 2, 2026 10:21
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_generalize_sha_resource_test_to_include_sha512 branch from 71fcf96 to ef797cd Compare June 8, 2026 10:23
@dorimedini-starkware dorimedini-starkware force-pushed the 05-27-starknet_os_os_resources_test_-_add_sha512 branch 2 times, most recently from 9bb2013 to 9431f02 Compare June 9, 2026 11:02
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_generalize_sha_resource_test_to_include_sha512 branch 2 times, most recently from d2d5978 to fe05b95 Compare June 9, 2026 11:07
@dorimedini-starkware dorimedini-starkware force-pushed the 05-27-starknet_os_os_resources_test_-_add_sha512 branch from 9431f02 to b4da5e8 Compare June 9, 2026 11:07
@dorimedini-starkware dorimedini-starkware force-pushed the 05-27-starknet_os_os_resources_test_-_add_sha512 branch from b4da5e8 to d8e56c2 Compare June 9, 2026 11:37
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