Skip to content

Commit

Permalink
Revert consumeEvmFrame EvmGasManager optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov committed Sep 17, 2024
1 parent 1722402 commit 89ab319
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system-contracts/contracts/EvmGasManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ contract EvmGasManager {
}
}

function consumeEvmFrame() external view returns (uint256 passGas, bool isStatic) {
function consumeEvmFrame() external onlySystemEvm returns (uint256 passGas, bool isStatic) {
uint256 stackDepth;
assembly {
stackDepth := tload(EVM_STACK_SLOT)
Expand All @@ -140,6 +140,7 @@ contract EvmGasManager {
let stackPointer := add(EVM_STACK_SLOT, mul(2, stackDepth))
passGas := tload(stackPointer)
isStatic := tload(add(stackPointer, 1))
tstore(stackPointer, INF_PASS_GAS) // mark as consumed
}
}

Expand Down

0 comments on commit 89ab319

Please sign in to comment.