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
Changes are test harness, versioned constant calibration, and program hash metadata—not runtime auth or fee logic.

Overview
EmitEvent is now part of the Starknet OS per-syscall resource regression flow instead of being skipped as unmeasurable.

The Cairo1 OsResourcesTestContract invokes emit_event_syscall during __execute__, and os_resources_test expects that event, strips the extra EmitEvent trace from fee transfer, and asserts EmitEvent is measurable. Versioned constants for EmitEvent drop n_steps from 61 to 47, and program_hash.json updates the os hash to match the rebuilt program.

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

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