go-ethereum/core/vm
Guillaume Ballet 4dc7d46155
core/vm: implement stack arena (#33960)
Here, we change the EVM stack implementation to use an 'arena', i.e.
a shared allocation pool for sub-call stacks. The stack is now more
GC-friendly, since it is a slice of uint256 values instead of a slice of pointers.

Code that pushes an item to the stack has been changed to get() the top
item, then overwrite it.

The PR is a rewrite/rebase of #30362.

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2026-04-28 11:10:44 +02:00
..
program all: fix problematic function name in comment (#32513) 2025-08-29 08:54:23 +08:00
runtime core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
testdata core/vm: switch modexp gas computation to uint64 (#32527) 2025-09-08 13:33:10 +02:00
analysis_legacy.go core/vm: add configurable jumpdest analysis cache (#32143) 2025-08-01 13:57:38 +02:00
analysis_legacy_test.go core/vm: using testing.B.Loop (#32660) 2025-09-19 17:06:55 -06:00
common.go core: Implement eip-7954 increase Maximum Contract Size (#33832) 2026-03-12 10:23:49 +08:00
contract.go core/vm, eth, tests: introduce gas budget (#34712) 2026-04-20 15:33:29 +08:00
contracts.go core: track the state access footprint (#34776) 2026-04-22 13:42:49 +08:00
contracts_fuzz_test.go core: track the state access footprint (#34776) 2026-04-22 13:42:49 +08:00
contracts_test.go core: track the state access footprint (#34776) 2026-04-22 13:42:49 +08:00
doc.go core/vm: remove JIT VM codes (#16362) 2018-03-26 13:48:04 +03:00
eip7610.go cmd/geth, core/state, tests: rework EIP7610 check (#34718) 2026-04-14 15:54:36 +02:00
eip7610_test.go cmd/geth, core/state, tests: rework EIP7610 check (#34718) 2026-04-14 15:54:36 +02:00
eips.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
errors.go core/vm: include operand in error message (#34635) 2026-04-13 14:13:33 +02:00
evm.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
gas.go core/vm: rework gas measurement for call variants (#33648) 2026-03-19 10:02:49 -06:00
gas_table.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
gas_table_test.go core/vm, eth, tests: introduce gas budget (#34712) 2026-04-20 15:33:29 +08:00
gascosts.go core/vm, eth, tests: introduce gas budget (#34712) 2026-04-20 15:33:29 +08:00
instructions.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
instructions_test.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
interface.go core: track the state access footprint (#34776) 2026-04-22 13:42:49 +08:00
interpreter.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
interpreter_test.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
jump_table.go core: turn gas into a vector <regularGas, stateGas> (#34691) 2026-04-13 14:09:42 +08:00
jump_table_export.go cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
jump_table_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
jumpdests.go core/vm: add configurable jumpdest analysis cache (#32143) 2025-08-01 13:57:38 +02:00
memory.go core/vm: improve memory resize (#33056) 2025-11-26 16:50:16 +01:00
memory_table.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
memory_test.go core/vm: improve memory resize (#33056) 2025-11-26 16:50:16 +01:00
opcodes.go core/vm: implement eip-7843: SLOTNUM (#33589) 2026-02-26 13:53:46 +01:00
operations_acl.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
operations_verkle.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
stack.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
stack_table.go core/vm: 64 bit memory and gas calculations (#19210) 2019-03-12 11:40:05 +02:00