Skip to content

starknet_os: os resources test - invoke tx constant factor#14146

Open
dorimedini-starkware wants to merge 1 commit into
05-24-starknet_os_os_resources_test_-_extract_setup_test_builderfrom
05-24-starknet_os_os_resources_test_-_invoke_tx_constant_factor
Open

starknet_os: os resources test - invoke tx constant factor#14146
dorimedini-starkware wants to merge 1 commit into
05-24-starknet_os_os_resources_test_-_extract_setup_test_builderfrom
05-24-starknet_os_os_resources_test_-_invoke_tx_constant_factor

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

dorimedini-starkware commented May 24, 2026

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.

@cursor
Copy link
Copy Markdown

cursor Bot commented May 24, 2026

PR Summary

Medium Risk
Updates fee-related OS resource constants used for invoke transactions; changes are test-driven but affect resource accounting for production paths that consume versioned constants.

Overview
Adds test_execute_txs_inner_resources, which measures invoke OS scaffolding for execute_transaction_inner as full OS trace resources minus blockifier validate/execute VM resources, then checks the result against os_resources.execute_txs_inner.InvokeFunction (constant part only; calldata scaling factor 2 is asserted but not recomputed yet).

Setup change: the stable measurement contract is funded after deploy so a minimal invoke from that address can run in the new test.

Versioned constants (0.14.4): bumps the invoke constant overhead under InvokeFunctionn_steps 4348 → 4790, range_check_builtin 90 → 110 — to match the measured OS-only cost.

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

@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_invoke_tx_constant_factor branch 2 times, most recently from c632d3d to e678a92 Compare May 24, 2026 20:08
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 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 e678a92. Configure here.

Comment thread crates/starknet_os_flow_tests/src/os_resources_test.rs
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_extract_setup_test_builder branch from 72ceed8 to e0bcdfa Compare May 28, 2026 16:18
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_invoke_tx_constant_factor branch from e678a92 to c2f6aca Compare May 28, 2026 16:18
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_extract_setup_test_builder branch from e0bcdfa to 668f39a Compare May 29, 2026 14:04
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_invoke_tx_constant_factor branch from c2f6aca to 350efcf Compare May 29, 2026 14:04
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_extract_setup_test_builder branch from 668f39a to 8cf1830 Compare June 1, 2026 08:37
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_invoke_tx_constant_factor branch from 350efcf to 885d969 Compare June 1, 2026 08:37
@dorimedini-starkware dorimedini-starkware force-pushed the 05-24-starknet_os_os_resources_test_-_invoke_tx_constant_factor branch from 885d969 to ac6fd8a Compare June 1, 2026 10:24
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