go-ethereum/core/vm
Martin HS f9bed32236 core/vm, cmd/evm: implement eof validation (#30418)
The bulk of this PR is authored by @lightclient , in the original
EOF-work. More recently, the code has been picked up and reworked for the new EOF
specification, by @MariusVanDerWijden , in https://github.com/ethereum/go-ethereum/pull/29518, and also @shemnon has contributed with fixes.

This PR is an attempt to start eating the elephant one small bite at a
time, by selecting only the eof-validation as a standalone piece which
can be merged without interfering too much in the core stuff.

In this PR: 

- [x] Validation of eof containers, lifted from #29518, along with
test-vectors from consensus-tests and fuzzing, to ensure that the move
did not lose any functionality.
- [x] Definition of eof opcodes, which is a prerequisite for validation
- [x] Addition of `undefined` to a jumptable entry item. I'm not
super-happy with this, but for the moment it seems the least invasive
way to do it. A better way might be to go back and allowing nil-items or
nil execute-functions to denote "undefined".
- [x] benchmarks of eof validation speed 


---------

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Danno Ferrin <danno.ferrin@shemnon.com>
2024-11-19 14:50:11 +01:00
..
runtime core/state: state reader abstraction (#29761) 2024-09-05 13:10:47 +03:00
testdata core/vm: more benchmarks for bls g1/g2-multiexp precompiles (#30459) 2024-09-24 13:53:46 +02:00
analysis_eof.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
analysis_legacy.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
analysis_legacy_test.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
common.go cmd, core, params, trie: add verkle access witness gas charging (#29338) 2024-05-10 20:13:11 +02:00
contract.go cmd, core, params, trie: add verkle access witness gas charging (#29338) 2024-05-10 20:13:11 +02:00
contracts.go internal/ethapi: eth_multicall (#27720) 2024-09-06 11:31:00 +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: add KZG benchmark (#29583) 2024-04-19 13:46:43 +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: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
eof.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
eof_control_flow.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
eof_immediates.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
eof_instructions.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
eof_test.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
eof_validation.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
eof_validation_test.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
errors.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
evm.go core/state, core/vm: Nyota contract create init simplification (#30409) 2024-09-13 15:37:30 +02:00
gas.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
gas_table.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
gas_table_test.go core/state: state reader abstraction (#29761) 2024-09-05 13:10:47 +03:00
instructions.go core/vm: reuse Memory instances (#30137) 2024-08-20 14:31:06 +02:00
instructions_test.go core/state: state reader abstraction (#29761) 2024-09-05 13:10:47 +03:00
interface.go all: stateless witness builder and (self-)cross validator (#29719) 2024-06-25 14:48:08 +03:00
interpreter.go core/tracing, core/vm: add ContractCode to the OpContext (#30466) 2024-09-24 13:18:36 +02:00
interpreter_test.go core/state: state reader abstraction (#29761) 2024-09-05 13:10:47 +03:00
jump_table.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
jump_table_export.go core: fix typos (#28255) 2023-10-10 10:22:03 +02:00
jump_table_test.go all: fix typos in comments (#28881) 2024-02-05 22:16:32 +01:00
memory.go core/vm: reuse Memory instances (#30137) 2024-08-20 14:31:06 +02:00
memory_table.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
memory_test.go core/vm: implement EIP-5656, mcopy instruction (#26181) 2023-07-11 03:55:34 -04:00
opcodes.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
operations_acl.go core/vm, cmd/evm: implement eof validation (#30418) 2024-11-19 14:50:11 +01:00
operations_verkle.go trie, core/state: Nyota EIP-6800 & EIP-4762 spec updates (#30357) 2024-08-30 14:13:02 +02: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