Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Add static OOG for all opcodes #801

Merged
merged 4 commits into from
Nov 7, 2023

Conversation

ClementWalter
Copy link
Member

@ClementWalter ClementWalter commented Nov 7, 2023

Time spent on this PR: 0.4

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Some opcode families defines their own opcode_label.
OOG and Stack over/underflow are defined at the opcode of family level.

What is the new behavior?

One single opcode_label constant is defined and used everywhere.
OOG and Stack over/underflow are defined at the exec_opcode level.

Resolves: #777

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (63e8569) 68.77% compared to head (0fe913b) 71.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #801      +/-   ##
==========================================
+ Coverage   68.77%   71.28%   +2.50%     
==========================================
  Files          45       45              
  Lines        6286     5930     -356     
==========================================
- Hits         4323     4227      -96     
+ Misses       1963     1703     -260     
Files Coverage Δ
src/kakarot/account.cairo 71.61% <ø> (ø)
src/kakarot/evm.cairo 100.00% <ø> (ø)
.../kakarot/instructions/duplication_operations.cairo 100.00% <ø> (+34.61%) ⬆️
...karot/instructions/environmental_information.cairo 100.00% <100.00%> (+11.53%) ⬆️
src/kakarot/instructions/exchange_operations.cairo 100.00% <ø> (+28.57%) ⬆️
src/kakarot/instructions/push_operations.cairo 100.00% <ø> (+21.42%) ⬆️
...akarot/instructions/stop_and_math_operations.cairo 94.42% <ø> (+20.65%) ⬆️
src/kakarot/instructions/system_operations.cairo 87.05% <ø> (+2.96%) ⬆️
src/kakarot/library.cairo 24.69% <ø> (ø)
src/kakarot/precompiles/precompiles.cairo 59.52% <ø> (-0.48%) ⬇️
... and 3 more

... and 2 files with indirect coverage changes

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

@ClementWalter ClementWalter changed the title Add an Opcode constant Add static OOG for all opcodes Nov 7, 2023
@ClementWalter ClementWalter marked this pull request as ready for review November 7, 2023 14:07
Copy link
Member

@Eikix Eikix left a comment

Choose a reason for hiding this comment

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

nice one!

@ClementWalter ClementWalter merged commit 4277d5f into kkrt-labs:main Nov 7, 2023
7 checks passed
@ClementWalter ClementWalter deleted the cw/opcodes-constant branch November 7, 2023 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: revert the context on OOG
2 participants