Skip to content

feat: add new_oog helpers to InterpreterResult, CallOutcome, CreateOutcome, and FrameResult#3309

Merged
rakita merged 1 commit intomainfrom
add-new-oog-helpers
Jan 14, 2026
Merged

feat: add new_oog helpers to InterpreterResult, CallOutcome, CreateOutcome, and FrameResult#3309
rakita merged 1 commit intomainfrom
add-new-oog-helpers

Conversation

@rakita
Copy link
Copy Markdown
Member

@rakita rakita commented Jan 14, 2026

Summary

  • Add InterpreterResult::new_oog(gas_limit) - creates OOG result with empty output and all gas consumed
  • Add CallOutcome::new_oog(gas_limit, memory_offset) - creates call outcome for OOG error
  • Add CreateOutcome::new_oog(gas_limit) - creates create outcome for OOG error with no address
  • Add FrameResult::new_call_oog(gas_limit, memory_offset) - creates call frame result for OOG
  • Add FrameResult::new_create_oog(gas_limit) - creates create frame result for OOG

Test plan

  • Code compiles successfully with cargo check -p revm-interpreter -p revm-handler

…Outcome, and FrameResult

Add convenience constructors for creating out-of-gas results:
- `InterpreterResult::new_oog(gas_limit)`
- `CallOutcome::new_oog(gas_limit, memory_offset)`
- `CreateOutcome::new_oog(gas_limit)`
- `FrameResult::new_call_oog(gas_limit, memory_offset)`
- `FrameResult::new_create_oog(gas_limit)`
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jan 14, 2026

Merging this PR will not alter performance

✅ 173 untouched benchmarks


Comparing add-new-oog-helpers (452fa25) with main (1e87f70)

Open in CodSpeed

@rakita rakita merged commit 2af8053 into main Jan 14, 2026
31 checks passed
@rakita rakita deleted the add-new-oog-helpers branch January 14, 2026 18:19
@github-actions github-actions bot mentioned this pull request Jan 14, 2026
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.

1 participant