Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/state/access_witness.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (aw *AccessWitness) TouchTxOriginAndComputeGas(originAddr []byte) {

func (aw *AccessWitness) TouchTxExistingAndComputeGas(targetAddr []byte, sendsValue bool) {
aw.touchAddressAndChargeGas(targetAddr, zeroTreeIndex, utils.BasicDataLeafKey, sendsValue, nil)
aw.touchAddressAndChargeGas(targetAddr, zeroTreeIndex, utils.CodeHashLeafKey, false, nil)
aw.touchAddressAndChargeGas(targetAddr, zeroTreeIndex, utils.CodeHashLeafKey, sendsValue, nil)
}

func (aw *AccessWitness) TouchSlotAndChargeGas(addr []byte, slot common.Hash, isWrite bool, useGasFn UseGasFn, warmCostCharging bool) bool {
Expand Down
3 changes: 2 additions & 1 deletion core/vm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ func opExtCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext)
address := slot.Bytes20()
cs := uint64(interpreter.evm.StateDB.GetCodeSize(address))
if interpreter.evm.chainRules.IsVerkle {
if _, isPrecompile := interpreter.evm.precompile(address); isPrecompile {
isSystemContract := interpreter.evm.isSystemContract(address)
if _, isPrecompile := interpreter.evm.precompile(address); isPrecompile || isSystemContract {
Comment on lines +355 to +356
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

if !scope.Contract.UseGas(params.WarmStorageReadCostEIP2929) {
return nil, ErrOutOfGas
}
Expand Down
Loading