Skip to content

Conversation

stephenh-axiom-xyz
Copy link
Contributor

@stephenh-axiom-xyz stephenh-axiom-xyz commented Sep 17, 2025

Resolves INT-5063. Benchmark run shows no difference https://github.com/axiom-crypto/openvm-reth-benchmark/actions/runs/17804008078

// We don't use this result, so for most CTX implementations this does nothing.
// However, for MeteredCtx this forces a segment check since its implementation
// of should_suspend performs one as a side effect.
CTX::should_suspend(*instret, *pc, 0, exec_state);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note we pass 0 to segment_check_insns here, since MeteredCtx will skip the check if instret < segment_check_insns + last_segment_check. This should always force a segment check assuming instret increases monotonically.

Copy link

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (+2 [+0.8%]) 267 322,610 2,058,654 - - -
fibonacci (-22 [-1.8%]) 1,176 1,500,210 2,107,962 - - -
regex (-157 [-5.1%]) 2,931 4,108,483 17,662,886 - - -
ecrecover (+10 [+1.1%]) 889 140,497 2,275,056 - - -
pairing (-51 [-2.9%]) 1,728 1,882,939 25,847,762 - - -

Commit: ff32fef

Benchmark Workflow

Comment on lines +174 to +177
// We don't use this result, so for most CTX implementations this does nothing.
// However, for MeteredCtx this forces a segment check since its implementation
// of should_suspend performs one as a side effect.
CTX::should_suspend(*instret, *pc, 0, exec_state);
Copy link
Contributor

Choose a reason for hiding this comment

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

this conflicts with #2140 so we need to think of a way to both check for segmentation and suspend if segmented (i.e. can't discard the result)

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