Skip to content

starknet_os: generalize sha resource test to include sha512#14255

Open
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_add_secp_syscallsfrom
05-24-starknet_os_generalize_sha_resource_test_to_include_sha512
Open

starknet_os: generalize sha resource test to include sha512#14255
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_add_secp_syscallsfrom
05-24-starknet_os_generalize_sha_resource_test_to_include_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
Changes are limited to test helpers and expected resource constants; no production OS or runtime behavior is modified.

Overview
Refactors the SHA finalize resource harness into a generic run_finalize_sha<T> so SHA-256 and SHA-512 share the same Cairo VM setup, input layout, and two-point linear/constant resource extraction.

Adds a sha_512_update_state reference helper and test_finalize_sha512, which runs the OS finalize_sha512 entrypoint and asserts against new SHA512_BATCH_* expected ExecutionResources in test_utils (batch size 3). The existing SHA-256 test is updated to call the generic runner with u32 and the SHA-256 finalize symbol.

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

@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_l1_handler_tx_calldata_factor branch from ebdeac0 to 82597b0 Compare May 29, 2026 14:04
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_generalize_sha_resource_test_to_include_sha512 branch from 9d76d08 to 734ffe2 Compare May 29, 2026 14:04
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_l1_handler_tx_calldata_factor branch from 82597b0 to a054ea9 Compare June 1, 2026 08:37
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_generalize_sha_resource_test_to_include_sha512 branch from 734ffe2 to 44d88e1 Compare June 1, 2026 08:37
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_l1_handler_tx_calldata_factor branch from a054ea9 to f0b2689 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 44d88e1 to bcfa709 Compare June 1, 2026 10:24
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_l1_handler_tx_calldata_factor branch from f0b2689 to 9c2eff6 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 bcfa709 to 71fcf96 Compare June 2, 2026 10:21
@dorimedini-starkware dorimedini-starkware changed the base branch from 05-24-starknet_os_os_resources_test_-_l1_handler_tx_calldata_factor to graphite-base/14255 June 8, 2026 10:23
@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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 ef797cd. Configure here.

Comment thread crates/starknet_os/src/resource_utils_test.rs
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_generalize_sha_resource_test_to_include_sha512 branch from ef797cd to d2d5978 Compare June 9, 2026 11:02
@dorimedini-starkware dorimedini-starkware changed the base branch from graphite-base/14255 to 05-23-starknet_os_os_resources_test_-_add_secp_syscalls June 9, 2026 11:02
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_generalize_sha_resource_test_to_include_sha512 branch from d2d5978 to fe05b95 Compare June 9, 2026 11:07
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