Skip to content

Commit

Permalink
Remove gas charge todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Oct 1, 2024
1 parent a2e9b8e commit 3a220c1
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions evm_arithmetization/src/cpu/kernel/asm/core/gas.asm
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,16 @@ global sys_gas:
%endmacro


// TODO: `%refund_gas` and `refund_gas_hook` are hooks used for debugging. They should be removed at some point and `refund_gas_original` renamed to `refund_gas`.
%macro refund_gas
PUSH %%after %jump(refund_gas_hook)
%%after:
%refund_gas_original
%endmacro

global refund_gas_hook:
JUMP

%macro refund_gas_original
// stack: amount
DUP1 %journal_refund
%mload_global_metadata(@GLOBAL_METADATA_REFUND_COUNTER)
ADD
%mstore_global_metadata(@GLOBAL_METADATA_REFUND_COUNTER)
%endmacro

// TODO: `%charge_gas` and `charge_gas_hook` are hooks used for debugging. They should be removed at some point and `charge_gas_original` renamed to `charge_gas`.
%macro charge_gas
PUSH %%after %jump(charge_gas_hook)
%%after:
%charge_gas_original
%endmacro

global charge_gas_hook:
JUMP

// Charge gas. Faults if we exceed the limit for the current context.
%macro charge_gas_original
%macro charge_gas
// stack: gas, kexit_info
%shl_const(192)
ADD
Expand Down

0 comments on commit 3a220c1

Please sign in to comment.