Skip to content

fix: run hints of each visited pc in run_for_steps - #2392

Open
orizi wants to merge 1 commit into
claude/vm-execution-performance-32hi0cfrom
orizi/09-09-fix_run_hints_of_each_visited_pc_in_run_for_steps
Open

orizi wants to merge 1 commit into
claude/vm-execution-performance-32hi0cfrom
orizi/09-09-fix_run_hints_of_each_visited_pc_in_run_for_steps

Conversation

@orizi

@orizi orizi commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

run_for_steps computed the hint slice for the entry pc once and reused it for every step, so hints at subsequent pcs never ran and the entry pc's hints re-ran on every step. Resolve the slice per step, as run_until_pc does. Only the non-extensive_hints path was affected.

Adds a regression test with a vm_enter_scope() hint attached to a non-entry pc.

Based on #2391.

🤖 Generated with Claude Code


This change is Reviewable

@orizi
orizi force-pushed the orizi/09-09-fix_run_hints_of_each_visited_pc_in_run_for_steps branch from 1c7d205 to 0b69496 Compare September 9, 2026 08:39
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.068 ± 0.033 2.037 2.150 1.00
head big_factorial 2.077 ± 0.060 2.022 2.166 1.00 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 1.932 ± 0.032 1.907 1.990 1.01 ± 0.02
head big_fibonacci 1.918 ± 0.024 1.902 1.984 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 6.312 ± 0.197 6.192 6.798 1.00
head blake2s_integration_benchmark 6.319 ± 0.121 6.231 6.562 1.00 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 1.979 ± 0.016 1.966 2.015 1.00 ± 0.01
head compare_arrays_200000 1.974 ± 0.007 1.965 1.986 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.382 ± 0.009 1.374 1.401 1.00
head dict_integration_benchmark 1.384 ± 0.010 1.373 1.402 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.111 ± 0.011 1.097 1.126 1.00
head field_arithmetic_get_square_benchmark 1.127 ± 0.012 1.112 1.153 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 6.319 ± 0.025 6.293 6.373 1.00
head integration_builtins 6.346 ± 0.016 6.322 6.368 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 6.420 ± 0.032 6.363 6.459 1.00
head keccak_integration_benchmark 6.473 ± 0.072 6.415 6.636 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 1.974 ± 0.009 1.962 1.987 1.00
head linear_search 1.992 ± 0.025 1.977 2.062 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.471 ± 0.033 1.449 1.538 1.01 ± 0.03
head math_cmp_and_pow_integration_benchmark 1.463 ± 0.018 1.453 1.514 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.437 ± 0.011 1.426 1.459 1.00
head math_integration_benchmark 1.437 ± 0.007 1.428 1.454 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.191 ± 0.009 1.181 1.205 1.00 ± 0.01
head memory_integration_benchmark 1.188 ± 0.005 1.182 1.195 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.517 ± 0.017 1.507 1.565 1.00
head operations_with_data_structures_benchmarks 1.523 ± 0.016 1.511 1.556 1.00 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 534.9 ± 8.8 525.4 553.6 1.00 ± 0.02
head pedersen 534.5 ± 4.0 525.7 540.9 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 646.4 ± 8.2 641.5 668.6 1.00
head poseidon_integration_benchmark 651.6 ± 21.3 638.0 708.3 1.01 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.828 ± 0.028 1.810 1.903 1.00 ± 0.02
head secp_integration_benchmark 1.824 ± 0.015 1.815 1.865 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 653.5 ± 1.8 650.4 657.2 1.00
head set_integration_benchmark 654.1 ± 4.9 650.7 667.7 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 3.742 ± 0.043 3.716 3.860 1.00
head uint256_integration_benchmark 3.765 ± 0.028 3.734 3.829 1.01 ± 0.01

@orizi
orizi force-pushed the orizi/09-09-fix_run_hints_of_each_visited_pc_in_run_for_steps branch from 0b69496 to 681c028 Compare September 9, 2026 09:47
@codecov

codecov Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.23%. Comparing base (c610d41) to head (1ebfbb4).

Additional details and impacted files
@@                           Coverage Diff                           @@
##           claude/vm-execution-performance-32hi0c    #2392   +/-   ##
=======================================================================
  Coverage                                   96.23%   96.23%           
=======================================================================
  Files                                         107      107           
  Lines                                       37985    38009   +24     
=======================================================================
+ Hits                                        36555    36579   +24     
  Misses                                       1430     1430           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@orizi
orizi force-pushed the orizi/09-09-fix_run_hints_of_each_visited_pc_in_run_for_steps branch from 681c028 to 258ef43 Compare September 9, 2026 10:06
run_for_steps computed the hint slice for the entry pc once and reused
it for every step, so hints at subsequent pcs never ran and the entry
pc's hints re-ran on every step. Resolve the slice per step, as
run_until_pc does. Only the non-extensive_hints path was affected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@orizi
orizi force-pushed the orizi/09-09-fix_run_hints_of_each_visited_pc_in_run_for_steps branch from 258ef43 to 1ebfbb4 Compare September 9, 2026 10:17
@ilyalesokhin-starkware

Copy link
Copy Markdown

-- commits line 7 at r1:
rephrase

Code quote:

  run_for_steps computed the hint slice for the entry pc once and reused
  it for every step, so hints at subsequent pcs never ran and the entry
  pc's hints re-ran on every step. Resolve the slice per step, as
  run_until_pc does. Only the non-extensive_hints path was affected.

This branch has not been deployed

No deployments
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