Skip to content

starknet_os_flow_tests: measure OS linear syscall resources with many…#14461

Merged
dorimedini-starkware merged 1 commit into
mainfrom
dori-larger-linear-inputs
Jun 11, 2026
Merged

starknet_os_flow_tests: measure OS linear syscall resources with many…#14461
dorimedini-starkware merged 1 commit into
mainfrom
dori-larger-linear-inputs

Conversation

@dorimedini-starkware

Copy link
Copy Markdown
Collaborator

… elements

@cursor

cursor Bot commented Jun 11, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes only affect OS flow regression tests and the measurement contract; no production fee or execution logic.

Overview
Improves OS syscall linear-cost measurement by using 100 extra calldata elements instead of a single-element delta when comparing paired syscall invocations.

The Cairo os_resources_test_contract now builds a large_input array (length prefix + 100 felts) and passes it to the second meta_tx_v0_syscall and deploy_syscall calls that exercise the linear factor. The os_resources_regression test divides the resource difference between the two measurements by LARGE_INPUT_LENGTH via div_ceil, and the inline docs describe the new M1 / M2 measurement model and BASE = M1 - LINEAR adjustment.

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

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@dorimedini-starkware dorimedini-starkware force-pushed the dori-larger-linear-inputs branch from a281946 to 331e42d Compare June 11, 2026 10:58

@Yoni-Starkware Yoni-Starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:lgtm:

@Yoni-Starkware reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware).


crates/blockifier_test_utils/resources/feature_contracts/cairo1/os_resources_test_contract.cairo line 54 at r1 (raw file):

        let mut large_input: Array<felt252> = array![LARGE_INPUT_LENGTH.into()];
        for _ in 0..LARGE_INPUT_LENGTH {
            large_input.append(1);

It's 0 in your documentation. Fix one of the

Code quote:

 large_input.append(1);

… elements

Signed-off-by: Dori Medini <dori@starkware.co>
@dorimedini-starkware dorimedini-starkware force-pushed the dori-larger-linear-inputs branch from 331e42d to a9d1d3f Compare June 11, 2026 11:49

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@dorimedini-starkware resolved 1 discussion.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on Yoni-Starkware).

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 2 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on dorimedini-starkware).

@Yoni-Starkware Yoni-Starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Yoni-Starkware reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on dorimedini-starkware).

@dorimedini-starkware dorimedini-starkware added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit 1d84830 Jun 11, 2026
29 checks passed
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.

3 participants