Skip to content

blockifier,starknet_os: expect the blake constants in tests and check consistency#14035

Open
dorimedini-starkware wants to merge 1 commit into
05-15-starknet_os_recompute_and_assert_the_blake_constantsfrom
05-16-blockifier_starknet_os_expect_the_blake_constants_in_tests_and_check_consistency
Open

blockifier,starknet_os: expect the blake constants in tests and check consistency#14035
dorimedini-starkware wants to merge 1 commit into
05-15-starknet_os_recompute_and_assert_the_blake_constantsfrom
05-16-blockifier_starknet_os_expect_the_blake_constants_in_tests_and_check_consistency

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

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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 16, 2026

@cursor
Copy link
Copy Markdown

cursor Bot commented May 16, 2026

PR Summary

Low Risk
Low risk: changes are limited to test infrastructure and Cargo feature wiring, with no functional changes to hashing or execution logic. Main risk is potential build/feature configuration issues from the new optional expect-test dependency.

Overview
Adds expect-test-based golden expectations for CASM V2 (Blake) hash step estimation constants, exposing them via a new #[cfg(test, feature = "testing")] expected module alongside CasmV2HashResourceEstimate.

Updates Blockifier and Starknet OS Blake tests to assert against these expectations (instead of hard-coded equality) and adds a consistency test ensuring the production constants remain in sync with the expected baselines. Also wires expect-test into Blockifier’s testing feature as an optional dependency.

Reviewed by Cursor Bugbot for commit 8b75bd9. 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 2 potential issues.

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 57722b6. Configure here.

Comment thread crates/blockifier/src/execution/casm_hash_estimation_test.rs Outdated
@dorimedini-starkware dorimedini-starkware force-pushed the 05-16-blockifier_starknet_os_expect_the_blake_constants_in_tests_and_check_consistency branch from 57722b6 to c2492f9 Compare May 16, 2026 10:23
Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware resolved 2 discussions.
Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on AvivYossef-starkware and Yoni-Starkware).

@dorimedini-starkware dorimedini-starkware force-pushed the 05-16-blockifier_starknet_os_expect_the_blake_constants_in_tests_and_check_consistency branch from c2492f9 to 4cdda7f Compare May 16, 2026 12:34
@dorimedini-starkware dorimedini-starkware force-pushed the 05-15-starknet_os_recompute_and_assert_the_blake_constants branch from 30206ec to 139758c Compare May 16, 2026 12:34
@dorimedini-starkware dorimedini-starkware force-pushed the 05-16-blockifier_starknet_os_expect_the_blake_constants_in_tests_and_check_consistency branch from 4cdda7f to 917ff62 Compare May 17, 2026 08:01
@dorimedini-starkware dorimedini-starkware force-pushed the 05-15-starknet_os_recompute_and_assert_the_blake_constants branch from 139758c to 7307bab Compare May 17, 2026 08:01
@dorimedini-starkware dorimedini-starkware force-pushed the 05-16-blockifier_starknet_os_expect_the_blake_constants_in_tests_and_check_consistency branch from 917ff62 to bec3ce4 Compare May 17, 2026 10:56
@dorimedini-starkware dorimedini-starkware force-pushed the 05-15-starknet_os_recompute_and_assert_the_blake_constants branch from 7307bab to 9bb0f78 Compare May 17, 2026 10:56
@dorimedini-starkware dorimedini-starkware force-pushed the 05-15-starknet_os_recompute_and_assert_the_blake_constants branch from 9bb0f78 to dc54cc6 Compare May 17, 2026 11:29
@dorimedini-starkware dorimedini-starkware force-pushed the 05-16-blockifier_starknet_os_expect_the_blake_constants_in_tests_and_check_consistency branch from bec3ce4 to 8b75bd9 Compare May 17, 2026 11:29
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