go-ethereum/core/vm
Jonny Rhea d6f222a081
core, core/vm: precompile result caching (#35388)
Blocks heavy in precompile calls (e.g. Aztec's proof settlement txs)
spend most of their processing time on operations (ECMUL, pairings, KZG
point evaluation, MODEXP) that the state prefetcher has already computed
and thrown away.

This PR adds a precompile result cache shared between the prefetcher and
block processing (and the miner), following the JumpDestCache pattern.
Note that cached precompiles are keyed by address and input, with
entries partitioned by the active precompile set, so a fork that changes
the behavior behind an address can never be served results from before
it.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2026-07-28 10:47:33 +08:00
..
program all: fix problematic function name in comment (#32513) 2025-08-29 08:54:23 +08:00
runtime core: implement EIP-2780 and EIP-8037 changes (#35318) 2026-07-14 14:28:26 +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-2780 and EIP-8037 changes (#35318) 2026-07-14 14:28:26 +02:00
contract.go core/vm: implements EIP-8037 spec change (#35173) 2026-06-23 14:31:24 +08:00
contracts.go core, core/vm: precompile result caching (#35388) 2026-07-28 10:47:33 +08:00
contracts_fuzz_test.go core, core/vm: precompile result caching (#35388) 2026-07-28 10:47:33 +08:00
contracts_test.go core, core/vm: precompile result caching (#35388) 2026-07-28 10:47:33 +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
eip8037_test.go core: implement EIP-8038 (#35216) 2026-07-02 09:05:51 +08:00
eip8038_test.go core: improve amsterdam fork test coverage (#35364) 2026-07-21 11:02:02 +08:00
eips.go core: implement EIP-8038 (#35216) 2026-07-02 09:05:51 +08:00
errors.go core/vm: include operand in error message (#34635) 2026-04-13 14:13:33 +02:00
evm.go core, core/vm: precompile result caching (#35388) 2026-07-28 10:47:33 +08:00
gas.go core/vm: rework gas measurement for call variants (#33648) 2026-03-19 10:02:49 -06:00
gas_table.go core: implement EIP-2780 and EIP-8037 changes (#35318) 2026-07-14 14:28:26 +02:00
gas_table_test.go core: implement EIP-8037, state creation gas cost increase (#33601) 2026-06-12 14:29:03 +02:00
gascosts.go core: implement EIP-2780 and EIP-8037 changes (#35318) 2026-07-14 14:28:26 +02:00
instructions.go core: implement EIP-2780 and EIP-8037 changes (#35318) 2026-07-14 14:28:26 +02:00
instructions_test.go core/vm: fix test error message (#35134) 2026-06-12 19:38:45 +02:00
interface.go core: implement EIP-2780 and EIP-8037 changes (#35318) 2026-07-14 14:28:26 +02:00
interpreter.go core: implement EIP-2780 and EIP-8037 changes (#35318) 2026-07-14 14:28:26 +02:00
interpreter_test.go core: implement EIP-8037, state creation gas cost increase (#33601) 2026-06-12 14:29:03 +02:00
jump_table.go core/vm: initialize the bogota instructions from Amsterdam (#35383) 2026-07-20 09:12:35 -05:00
jump_table_export.go all: add bogota fork to config (#34057) 2026-07-14 14:37:29 +02: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: implement EIP-2780 and EIP-8037 changes (#35318) 2026-07-14 14:28:26 +02:00
operations_verkle.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
precompile_cache.go core, core/vm: precompile result caching (#35388) 2026-07-28 10:47:33 +08:00
stack.go core/vm: compute stack operations in place (#35156) 2026-06-16 07:47:05 -05:00
stack_table.go core/vm: 64 bit memory and gas calculations (#19210) 2019-03-12 11:40:05 +02:00