blockifier: add benchmarking and only-native feature flags#13541
blockifier: add benchmarking and only-native feature flags#13541avi-starkware wants to merge 1 commit intomain-v0.14.2from
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4a818d0 to
1ea7c66
Compare
b4eeb90 to
4d74bec
Compare
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 9 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on noaov1 and Yoni-Starkware).
Yoni-Starkware
left a comment
There was a problem hiding this comment.
@Yoni-Starkware reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on avi-starkware, noaov1, and TomerStarkware).
crates/blockifier/src/execution/entry_point_execution.rs line 526 at r2 (raw file):
time: Default::default(), #[cfg(feature = "benchmarking")] call_counter: 0,
@TomerStarkware why do we need this? can't you just count the number of nested calls at the end of the run?
Code quote:
#[cfg(feature = "benchmarking")]
call_counter: 0,4d74bec to
7293ba2
Compare
PR SummaryMedium Risk Overview With With Reviewed by Cursor Bugbot for commit bfe0a84. Bugbot is set up for automated code reviews on this repo. Configure here. |
7293ba2 to
c9f42dd
Compare
Yoni-Starkware
left a comment
There was a problem hiding this comment.
@Yoni-Starkware reviewed 7 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on avi-starkware and noaov1).
crates/blockifier/src/execution/entry_point.rs line 331 at r3 (raw file):
// Used to support charging for gas consumed in blockifier revert flow. pub sierra_gas_revert_tracker: SierraGasRevertTracker,
Revert the newline
Adds two new feature flags: - \`benchmarking\`: gates time/call_counter fields on CallInfo and EntryPointExecutionContext for execution profiling - \`only-native\`: forces native execution path even when tracked resource is CairoSteps Zero behavior change without flags enabled.
c9f42dd to
bfe0a84
Compare

Adds two new feature flags:
EntryPointExecutionContext for execution profiling
resource is CairoSteps
Zero behavior change without flags enabled.
Note
Medium Risk
Low impact by default, but when enabled this changes execution-path selection (forcing native execution) and adds new data fields to
CallInfo, which could affect consumers expecting a stable struct layout/serialization behind feature gates.Overview
Adds two new opt-in feature flags to
blockifier:benchmarkingandonly-native.With
benchmarkingenabled, execution populates per-call profiling metadata (timeandcall_counter) onCallInfo, backed by a counter inEntryPointExecutionContext. Withonly-nativeenabled (andcairo_native), the dispatcher no longer falls back to the VM path forTrackedResource::CairoSteps, forcing the native executor.Updates tests/fixtures to construct
CallInfovia..Default::default()so new optional fields don’t break compilation, and derives serde forCallSummary/ExecutionSummarywhentransaction_serdeis enabled.Reviewed by Cursor Bugbot for commit 4d74bec. Bugbot is set up for automated code reviews on this repo. Configure here.