Skip to content

Commit

Permalink
vm: spec fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Sep 11, 2024
1 parent 568ea84 commit dcfce83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/vm/operations_verkle.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func gasExtCodeSize4762(evm *EVM, contract *Contract, stack *Stack, mem *Memory,

func gasExtCodeHash4762(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) {
address := stack.peek().Bytes20()
if _, isPrecompile := evm.precompile(address); isPrecompile {
if _, isPrecompile := evm.precompile(address); isPrecompile || evm.isSystemContract(address) {

Check failure on line 64 in core/vm/operations_verkle.go

View workflow job for this annotation

GitHub Actions / setup

evm.isSystemContract undefined (type *EVM has no field or method isSystemContract)

Check failure on line 64 in core/vm/operations_verkle.go

View workflow job for this annotation

GitHub Actions / setup

evm.isSystemContract undefined (type *EVM has no field or method isSystemContract)

Check failure on line 64 in core/vm/operations_verkle.go

View workflow job for this annotation

GitHub Actions / build

evm.isSystemContract undefined (type *EVM has no field or method isSystemContract)

Check failure on line 64 in core/vm/operations_verkle.go

View workflow job for this annotation

GitHub Actions / conversion

evm.isSystemContract undefined (type *EVM has no field or method isSystemContract)

Check failure on line 64 in core/vm/operations_verkle.go

View workflow job for this annotation

GitHub Actions / lint

evm.isSystemContract undefined (type *EVM has no field or method isSystemContract)) (typecheck)

Check failure on line 64 in core/vm/operations_verkle.go

View workflow job for this annotation

GitHub Actions / lint

evm.isSystemContract undefined (type *EVM has no field or method isSystemContract)) (typecheck)

Check failure on line 64 in core/vm/operations_verkle.go

View workflow job for this annotation

GitHub Actions / lint

evm.isSystemContract undefined (type *EVM has no field or method isSystemContract)) (typecheck)

Check failure on line 64 in core/vm/operations_verkle.go

View workflow job for this annotation

GitHub Actions / test-process-verkle

evm.isSystemContract undefined (type *EVM has no field or method isSystemContract)
return 0, nil
}
codehashgas := evm.Accesses.TouchCodeHash(address[:], false)
Expand Down Expand Up @@ -132,6 +132,10 @@ func gasExtCodeCopyEIP4762(evm *EVM, contract *Contract, stack *Stack, mem *Memo
return 0, err
}
addr := common.Address(stack.peek().Bytes20())

if _, isPrecompile := evm.precompile(addr); isPrecompile {
return gas, nil
}
wgas := evm.Accesses.TouchBasicData(addr[:], false)
if wgas == 0 {
wgas = params.WarmStorageReadCostEIP2929
Expand Down

0 comments on commit dcfce83

Please sign in to comment.