go-ethereum/core/vm
Guillaume Ballet 1930b97b65 simplified gas accounting layer (#405)
* simplified gas accounting layer

* integrate some review feedback

* Apply suggestions from code review

Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>

* more suggestions from code review

* don't charge creation gas + charge code chunks in create

* A couple more fixes

* make linter happy

* fix create init gas consumption issue

* fix: in gas funcs, use tx witness instead of global witness

* fix linter issue

* Apply suggestions from code review

Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>

* fix: EXTCODECOPY gas consumption

* fix warm gas costs

* fix the order gas is charged in during contract creation epilogue

* fix selfdestruct

* fix #365 in eip rewrite (#407)

* fix: OOG type in code creation OOG (#408)

* core/vm: charge BLOCKHASH witness cost (#409)

* core/vm: charge BLOCKHASH witness cost

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* remove gas optimization for now

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

---------

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* remove redundant logic for contract creation (#413)

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* fix precompile address check for charging witness costs & fix missing value-bearing rule (#412)

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* core/vm: fix wrong check (#416)

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* charge for account creation if selfdestruct creates a new account (#417)

* add key comparison test (#418)

* core/vm: charge contract init before execution logic (#419)

* core/vm: charge contract init before execution logic

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* fix CREATE2 as well

---------

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>

* quell linter

---------

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>
2024-05-08 13:25:15 +02:00
..
runtime core: 4844 opcode and precompile (#27356) 2023-06-05 16:43:25 +03:00
testdata go.mod: update kzg libraries to use big-endian (#27510) 2023-06-19 15:08:13 +03:00
analysis.go core/vm: clarify comment (#27045) 2023-04-04 02:59:40 -04:00
analysis_test.go core/vm: reverse bit order in bytes of code bitmap (#24120) 2021-12-17 10:32:00 +01:00
common.go Verkle tree-based state with overlay transition 2024-05-08 13:24:03 +02:00
contract.go New access-witness module (#235) 2024-05-08 13:25:14 +02:00
contracts.go port kaustinen code on top of shapella-rebased branch 2024-05-08 13:25:14 +02:00
contracts_test.go core: 4844 opcode and precompile (#27356) 2023-06-05 16:43:25 +03:00
doc.go core/vm: remove JIT VM codes (#16362) 2018-03-26 13:48:04 +03:00
eips.go simplified gas accounting layer (#405) 2024-05-08 13:25:15 +02:00
errors.go core/vm: implement EIP-3860: Limit and meter initcode (#23847) 2023-01-11 04:05:47 -05:00
evm.go simplified gas accounting layer (#405) 2024-05-08 13:25:15 +02:00
gas.go core/vm: use uint256 in EVM implementation (#20787) 2020-06-08 15:24:40 +03:00
gas_table.go simplified gas accounting layer (#405) 2024-05-08 13:25:15 +02:00
gas_table_test.go all: new empty trie with types.EmptyRootHash instead of null (#27230) 2023-05-11 10:19:42 +03:00
instructions.go simplified gas accounting layer (#405) 2024-05-08 13:25:15 +02:00
instructions_test.go core/vm: use types.EmptyCodeHash (#27729) 2023-07-15 17:45:57 +02:00
interface.go Fix SELFDESTRUCT incorrect account zeroing & missing beneficiary balance in witness (#378) 2024-05-08 13:25:15 +02:00
interpreter.go simplified gas accounting layer (#405) 2024-05-08 13:25:15 +02:00
interpreter_test.go all: new empty trie with types.EmptyRootHash instead of null (#27230) 2023-05-11 10:19:42 +03:00
jump_table.go simplified gas accounting layer (#405) 2024-05-08 13:25:15 +02:00
jump_table_export.go port kaustinen code on top of shapella-rebased branch 2024-05-08 13:25:14 +02:00
jump_table_test.go core/vm: deepcopy jumptable when enabling extra eips (#26137) 2022-11-09 07:52:13 +01:00
logger.go eth/tracers, core/vm: remove time from trace output and tracing interface (#26291) 2022-12-05 16:57:47 +01:00
memory.go core/vm: implement EIP-5656, mcopy instruction (#26181) 2023-07-11 03:55:34 -04:00
memory_table.go core/vm: implement EIP-5656, mcopy instruction (#26181) 2023-07-11 03:55:34 -04:00
memory_test.go core/vm: implement EIP-5656, mcopy instruction (#26181) 2023-07-11 03:55:34 -04:00
opcodes.go core/vm: implement EIP-5656, mcopy instruction (#26181) 2023-07-11 03:55:34 -04:00
operations_acl.go simplified gas accounting layer (#405) 2024-05-08 13:25:15 +02:00
operations_verkle.go simplified gas accounting layer (#405) 2024-05-08 13:25:15 +02:00
stack.go core/vm: clean up some dead functions (#24851) 2022-05-11 08:03:35 +03:00
stack_table.go core/vm: 64 bit memory and gas calculations (#19210) 2019-03-12 11:40:05 +02:00