go-ethereum/core/vm
Marius van der Wijden 34f00a42f8
core/state: add GetStateAndCommittedState (#31585)
Improves the SSTORE gas calculation a bit. Previously we would pull up
the state object twice. This is okay for existing objects, since they
are cached, however non-existing objects are not cached, thus we needed
to go through all 128 diff layers as well as the disk layer twice, just
for the gas calculation

```
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/vm
cpu: AMD Ryzen 9 5900X 12-Core Processor            
               │ /tmp/old.txt │            /tmp/new.txt             │
               │    sec/op    │   sec/op     vs base                │
Interpreter-24   1118.0n ± 2%   602.8n ± 1%  -46.09% (p=0.000 n=10)
```

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-07-03 13:19:34 +08:00
..
program all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
runtime core/asm: delete assembler/disassembler (#31211) 2025-02-19 06:57:08 -07:00
testdata core/vm: implement EIP 7883 - ModExp Gas Cost Increase (#31606) 2025-06-05 16:47:49 +02:00
analysis_legacy.go core/vm, cmd/evm: implement eof validation (#30418) 2024-10-02 15:05:50 +02:00
analysis_legacy_test.go core/vm, cmd/evm: remove EOF (#32000) 2025-06-11 14:50:46 +02:00
common.go all: get rid of custom MaxUint64 and MaxUint64 (#30636) 2024-10-20 14:41:51 +03:00
contract.go core/vm: clean up EVM environmental structure (#31061) 2025-02-18 21:53:33 +08:00
contracts.go core/vm: implement updates to modexp gas cost changes in EIP-7883 (#32015) 2025-06-13 14:01:50 +02:00
contracts_fuzz_test.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
contracts_test.go core/vm: implement EIP 7883 - ModExp Gas Cost Increase (#31606) 2025-06-05 16:47:49 +02:00
doc.go core/vm: remove JIT VM codes (#16362) 2018-03-26 13:48:04 +03:00
eips.go core/vm, cmd/evm: remove EOF (#32000) 2025-06-11 14:50:46 +02:00
errors.go build: update to golangci-lint 1.61.0 (#30587) 2024-10-14 19:25:22 +02:00
evm.go core/state, core/vm: update stateless gas costs to follow the verkle-gen-7 testnet (#31014) 2025-05-15 20:43:52 +08:00
gas.go core/vm, cmd/evm: implement eof validation (#30418) 2024-10-02 15:05:50 +02:00
gas_table.go core/state: add GetStateAndCommittedState (#31585) 2025-07-03 13:19:34 +08:00
gas_table_test.go core/vm: clean up EVM environmental structure (#31061) 2025-02-18 21:53:33 +08:00
instructions.go all: create global hasher pool (#31769) 2025-05-09 13:52:40 +08:00
instructions_test.go core/vm: clean up EVM environmental structure (#31061) 2025-02-18 21:53:33 +08:00
interface.go core/state: add GetStateAndCommittedState (#31585) 2025-07-03 13:19:34 +08:00
interpreter.go core/state, core/vm: update stateless gas costs to follow the verkle-gen-7 testnet (#31014) 2025-05-15 20:43:52 +08:00
interpreter_test.go core/state: add GetStateAndCommittedState (#31585) 2025-07-03 13:19:34 +08:00
jump_table.go core/vm, cmd/evm: remove EOF (#32000) 2025-06-11 14:50:46 +02:00
jump_table_export.go params: start osaka fork (#31125) 2025-02-04 15:29:51 +01:00
jump_table_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
memory.go core/vm, go.mod: update uint256 and use faster method to write to memory (#30868) 2024-12-17 08:58:26 +01:00
memory_table.go core/vm, cmd/evm: remove EOF (#32000) 2025-06-11 14:50:46 +02:00
memory_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
opcodes.go core/vm: make all opcodes proper type (#30925) 2024-12-17 18:37:29 +01:00
operations_acl.go core/state: add GetStateAndCommittedState (#31585) 2025-07-03 13:19:34 +08:00
operations_verkle.go core/state, core/vm: update stateless gas costs to follow the verkle-gen-7 testnet (#31014) 2025-05-15 20:43:52 +08:00
stack.go core/vm: improved stack swap performance (#30249) 2024-08-06 14:38:47 +02:00
stack_table.go core/vm: 64 bit memory and gas calculations (#19210) 2019-03-12 11:40:05 +02:00