Skip to content

Commit

Permalink
fix: force switched precompile ctx gas configs
Browse files Browse the repository at this point in the history
  • Loading branch information
onikonychev committed Oct 31, 2024
1 parent df34075 commit 8151d98
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 163 deletions.
10 changes: 0 additions & 10 deletions evm-e2e/contracts/EventsEmitter.sol

This file was deleted.

17 changes: 0 additions & 17 deletions evm-e2e/contracts/InfiniteLoopGas.sol

This file was deleted.

51 changes: 0 additions & 51 deletions evm-e2e/contracts/SendReceiveNibi.sol

This file was deleted.

16 changes: 0 additions & 16 deletions evm-e2e/contracts/TestERC20.sol

This file was deleted.

28 changes: 0 additions & 28 deletions evm-e2e/contracts/TransactionReverter.sol

This file was deleted.

37 changes: 0 additions & 37 deletions evm-e2e/package.json

This file was deleted.

7 changes: 3 additions & 4 deletions x/evm/precompile/precompile.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,10 @@ func OnRunStart(
return res, fmt.Errorf("error committing dirty journal entries: %w", err)
}

// Temporarily switching to a local gas meter to enforce gas limit check for a precompile
// returning parent gas meter after execution or failure
// Switching to a local gas meter to enforce gas limit check for a precompile
cacheCtx = cacheCtx.WithGasMeter(sdk.NewGasMeter(gasLimit)).
WithKVGasConfig(sdk.GasConfig{}).
WithTransientKVGasConfig(sdk.GasConfig{})
WithKVGasConfig(store.KVGasConfig()).
WithTransientKVGasConfig(store.TransientGasConfig())

return OnRunStartResult{
Args: args,
Expand Down

0 comments on commit 8151d98

Please sign in to comment.