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-constants tuning for syscall metering; no runtime auth or execution-path changes beyond updated EmitEvent step counts.

Overview
EmitEvent is now covered by the Starknet OS syscall resource regression test instead of being skipped as unmeasurable.

The measurement contract invokes emit_event_syscall with fixed keys/data. The flow test asserts the emitted event, expects two EmitEvent syscall traces (measurement + fee transfer), and pops the fee-transfer trace so it does not skew OS overhead. UNMEASURABLE_SYSCALLS no longer includes EmitEvent.

blockifier_versioned_constants_0_14_4.json updates EmitEvent OS n_steps from 61 to 47 to match the new measurement.

Reviewed by Cursor Bugbot for commit 1d912ff. 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
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