Skip to content

starknet_os: os resources test - add emit event#14136

Open
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_add_meta_txfrom
05-23-starknet_os_os_resources_test_-_add_emit_event
Open

starknet_os: os resources test - add emit event#14136
dorimedini-starkware wants to merge 1 commit into
05-23-starknet_os_os_resources_test_-_add_meta_txfrom
05-23-starknet_os_os_resources_test_-_add_emit_event

Conversation

@dorimedini-starkware
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Collaborator Author

dorimedini-starkware commented May 24, 2026

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@cursor
Copy link
Copy Markdown

cursor Bot commented May 24, 2026

PR Summary

Low Risk
Test and versioned-constant tuning for syscall metering; no runtime execution or auth changes.

Overview
EmitEvent is now part of the OS resources regression suite instead of being skipped as unmeasurable.

The Cairo1 OsResourcesTestContract invokes emit_event_syscall during __execute__, and os_resources_test asserts the emitted event (keys/data) while peeling off the extra EmitEvent trace from fee transfer so syscall overhead can be attributed correctly. EmitEvent is removed from UNMEASURABLE_SYSCALLS, and blockifier_versioned_constants_0_14_4.json updates measured EmitEvent OS cost from 61 to 47 steps (range-check builtin unchanged).

Reviewed by Cursor Bugbot for commit 6683ff3. 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_emit_event branch from 00a30cb to 6b8d3d4 Compare May 24, 2026 20:08
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_emit_event branch from 6b8d3d4 to 755576b Compare May 25, 2026 09:48
@dorimedini-starkware dorimedini-starkware changed the base branch from graphite-base/14136 to 05-23-starknet_os_os_resources_test_-_add_meta_tx May 25, 2026 09:49
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_meta_tx branch from f48908d to f30d4c1 Compare May 25, 2026 15:37
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_emit_event branch from 755576b to e06dbf0 Compare May 25, 2026 15:37
Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

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


crates/starknet_os_flow_tests/src/os_resources_test.rs line 220 at r1 (raw file):

    // Extract syscall resources consumed, per (measurable) syscall.
    // There should be two events emitted: the first is the syscall we are measuring, and the second
    // is the last syscall in the tx, emitted from the fee transfer. Pop the second event.

You can run this tx with trivial fee bounds and make this test a bit cleaner

Code quote:

    // There should be two events emitted: the first is the syscall we are measuring, and the second
    // is the last syscall in the tx, emitted from the fee transfer. Pop the second event.

@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_emit_event branch from e06dbf0 to f058a8d Compare May 28, 2026 16:18
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_meta_tx branch from f30d4c1 to ed74ad5 Compare May 28, 2026 16:18
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_meta_tx branch from ed74ad5 to 7c9637b Compare May 29, 2026 14:04
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_emit_event branch from f058a8d to 1d912ff Compare May 29, 2026 14:04
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_meta_tx branch from 7c9637b to 616bec9 Compare June 1, 2026 08:37
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_emit_event branch from 1d912ff to 07b4e34 Compare June 1, 2026 08:37
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_meta_tx branch from 616bec9 to e970e02 Compare June 1, 2026 10:24
@dorimedini-starkware dorimedini-starkware force-pushed the 05-23-starknet_os_os_resources_test_-_add_emit_event branch from 07b4e34 to 6683ff3 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.

3 participants