Merged
Conversation
This was referenced Mar 24, 2026
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5 tasks
6f0d23a to
b93a6e6
Compare
06c0ab5 to
42bdb46
Compare
ilyalesokhin-starkware
approved these changes
Mar 25, 2026
Contributor
ilyalesokhin-starkware
left a comment
There was a problem hiding this comment.
@ilyalesokhin-starkware reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on orizi).
b93a6e6 to
6dbcad5
Compare
42bdb46 to
d9dd45d
Compare
6dbcad5 to
d334a22
Compare
d9dd45d to
553fc47
Compare
d334a22 to
bef1691
Compare
553fc47 to
80f06cd
Compare
orizi
commented
Mar 29, 2026
Collaborator
Author
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on orizi).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Enhanced Blake2s hash tests with new utility functions and comprehensive test coverage. Added
blake2s_finalize_guaranteesimport, converted test assertions to useu256format instead of raw arrays, and introduced a new test for the guarantees-based Blake2s function with proper message construction utilities.Type of change
Please check one:
Why is this change needed?
The existing Blake2s tests were using raw array comparisons and lacked coverage for the guarantees-based Blake2s functions. This change provides better test coverage and more readable assertions by converting hash outputs to
u256format, while also adding comprehensive tests for theblake2s_finalize_guaranteesfunction.What was the behavior or documentation before?
Tests compared Blake2s hash outputs as raw
u32arrays and only tested the basicblake2s_compressandblake2s_finalizefunctions. There was no test coverage forblake2s_finalize_guaranteesor utility functions for message construction.What is the behavior or documentation after?
Tests now compare hash outputs as
u256values for better readability, include comprehensive testing ofblake2s_finalize_guaranteeswith proper message construction fromfelt252values, and provide utility functions for converting between different data formats used in Blake2s operations.Related issue or discussion (if any)
N/A
Additional context
The changes include a new
to_u256conversion function and amsgmodule with utilities for constructing Blake2s input messages fromfelt252values using bounded integer guarantees. The test data also includes new end-to-end test cases for hashing twofelt252values, demonstrating practical usage patterns.Note
Low Risk
Low risk because changes are limited to test code and e2e fixtures, with no production hashing implementation modified. Main risk is test brittleness due to new u256 formatting and bounded-int guarantee message construction.
Overview
Updates Blake2s unit tests to assert outputs as a single
u256value (via a newto_u256helper) instead of raw[u32; 8]arrays.Adds new coverage for
blake2s_finalize_guarantees, including utilities to buildBlake2sInputGuaranteemessages from twofelt252values using bounded-int guarantees, and extends the Blake e2e fixture to exercise hashing twofelt252s with the guarantees-based finalize path (future Sierra enabled).Written by Cursor Bugbot for commit bef1691. This will update automatically on new commits. Configure here.