Skip to content

blockifier,apollo_starknet_os_program: support linear message cost#14153

Open
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_add_send_message_to_l1from
05-23-blockifier_apollo_starknet_os_program_support_linear_message_cost
Open

blockifier,apollo_starknet_os_program: support linear message cost#14153
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_add_send_message_to_l1from
05-23-blockifier_apollo_starknet_os_program_support_linear_message_cost

Conversation

@dorimedini-starkware

Copy link
Copy Markdown
Collaborator

No description provided.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@github-actions

github-actions Bot commented May 24, 2026

Copy link
Copy Markdown

dorimedini-starkware commented May 24, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor

cursor Bot commented May 29, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Changes protocol fee metering for L2→L1 messages across sequencer, OS, and client proving; misalignment would cause rejections or incorrect fees.

Overview
Send message to L1 syscall gas is no longer flat: cost is base + 800 × payload length (base raised from 12470 to 12770), aligned across the OS Cairo implementation, versioned constants, and blockifier (VM, native, and deprecated paths).

Blockifier now charges via get_syscall_cost(payload.len()), tracks linear syscall usage for metering/OS resources (including get_linear_factor_length on the VM request), and 0.14.4 models SendMessageToL1 OS resources as constant + calldata_factor. Regenerated OS / virtual OS program hashes, allowed virtual OS hash list, bytecode length expectations, and test/fixture snapshots (fees, systest blobs).

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

@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 12 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/resources/blockifier_versioned_constants_0_14_3.json line 250 at r1 (raw file):

            "Deploy": {
                "constant": {
                    "n_steps": 1180,

Move to 0_14_4

@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-blockifier_apollo_starknet_os_program_support_linear_message_cost branch from bd8c21c to 158bb8c Compare June 9, 2026 11:40
@dorimedini-starkware dorimedini-starkware changed the base branch from graphite-base/14153 to 05-23-starknet_os_os_resources_test_-_add_send_message_to_l1 June 9, 2026 11:40

@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 made 1 comment.
Reviewable status: 1 of 14 files reviewed, 1 unresolved discussion (waiting on yoavGrs and Yoni-Starkware).


crates/blockifier/resources/blockifier_versioned_constants_0_14_3.json line 250 at r1 (raw file):

Previously, yoavGrs wrote…

Move to 0_14_4

Done.

@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-blockifier_apollo_starknet_os_program_support_linear_message_cost branch from 158bb8c to 92be180 Compare June 9, 2026 11:45
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-blockifier_apollo_starknet_os_program_support_linear_message_cost branch from 92be180 to 5945995 Compare June 9, 2026 12:06
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