Skip to content

starknet_os: os resources test - add send_message_to_l1#14143

Open
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_add_replace_classfrom
05-23-starknet_os_os_resources_test_-_add_send_message_to_l1
Open

starknet_os: os resources test - add send_message_to_l1#14143
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_add_replace_classfrom
05-23-starknet_os_os_resources_test_-_add_send_message_to_l1

Conversation

@dorimedini-starkware

Copy link
Copy Markdown
Collaborator

No description provided.

dorimedini-starkware commented May 24, 2026

Copy link
Copy Markdown
Collaborator Author

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@dorimedini-starkware dorimedini-starkware self-assigned this May 24, 2026
@dorimedini-starkware dorimedini-starkware marked this pull request as ready for review May 24, 2026 07:03
@cursor

cursor Bot commented May 24, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes protocol fee/gas constants and OS program hashes for 0.14.4, which affects transaction charging and client-side proving allowlists; scope is limited to syscall accounting and test harness.

Overview
Adds send_message_to_l1_syscall to the OS resources measurement contract and folds SendMessageToL1 into the syscall regression suite by dropping it from UNMEASURABLE_SYSCALLS and asserting the expected L1 message in the flow test.

SendMessageToL1 costs are lowered to match measured OS overhead: n_steps 144 → 124 in versioned constants, SEND_MESSAGE_TO_L1_GAS_COST 14470 → 12470 in Cairo OS constants, with matching updates to blockifier syscall tests, versioned-constants diff regression, and central systest blob/receipt fixtures (fees and L2 gas).

OS program hashes (program_hash.json, allowed virtual OS hash slot 2) are refreshed after the Cairo constants change.

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

@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_replace_class branch from 9534bec to ed548b5 Compare May 24, 2026 20:08
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_send_message_to_l1 branch from 39edd2e to b4dc505 Compare May 24, 2026 20:08
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_replace_class branch from ed548b5 to 8be4f98 Compare May 28, 2026 16:18
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_send_message_to_l1 branch from b4dc505 to 6d69bf0 Compare May 28, 2026 16:18
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_send_message_to_l1 branch from 6d69bf0 to a359fa6 Compare May 29, 2026 14:04

@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 a359fa6. Configure here.

Comment thread crates/blockifier/resources/versioned_constants_diff_regression/0.14.3_0.14.4.txt Outdated
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_send_message_to_l1 branch 2 times, most recently from dda5432 to c91e910 Compare June 1, 2026 10:24
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_replace_class branch from 823c1a8 to 2b48c6b Compare June 2, 2026 10:21
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_send_message_to_l1 branch from c91e910 to 18c656c Compare June 2, 2026 10:21

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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


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

        // send message to l1 syscall.
        // TODO(Yoni, 1/6/2022): In this case the number of steps depends on the payload size -
        //  consider counting it.

Yes, it should be linear.
I don't know what payload size represents an average cost.
In Python, there is 1 element.

Code quote:

        // TODO(Yoni, 1/6/2022): In this case the number of steps depends on the payload size -
        //  consider counting it.

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@yoavGrs made 1 comment and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Yoni-Starkware).


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

Previously, yoavGrs wrote…

Yes, it should be linear.
I don't know what payload size represents an average cost.
In Python, there is 1 element.

Oh, you're doing it now, NVM

@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_send_message_to_l1 branch from 18c656c to b7607b6 Compare June 8, 2026 10:23
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_replace_class branch from 2b48c6b to 1ef8f5d Compare June 8, 2026 10:23
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_replace_class branch from 1ef8f5d to 42b29c1 Compare June 9, 2026 11:02
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_send_message_to_l1 branch from b7607b6 to 1cc8b43 Compare June 9, 2026 11:02
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