bsc/light
sunny2022da b4f1cdffd5
Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443)
* core/vm: deepcopy jumptable when enabling extra eips

When the interpreter is configured to use extra-eips,
this change makes it so that all the opcodes are deep-copied,
to prevent accidental modification of the 'base' jumptable.

Original-auther: yihuang <huang@crypto.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>

* core/vm: implement EIP-3860: Limit and meter initcode

Implementation of https://eips.ethereum.org/EIPS/eip-3860, limit and meter initcode.
Most of this change takes the go-ethereum implementation as reference.

Original-author: Andrei Maiboroda <andrei@ethereum.org>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

* core/vm: implement EIP-3855: PUSH0 instruction

* core/vm: Implement PUSH0

* Move PUSH0 to enable3855

* Add method doc

Original-author: Alex Beregszaszi <alex@rtfs.hu>

* core/vm: enable EIP-3855 (PUSH0) in Boneh

Original-author: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com>

* core/vm: Fix issue of incorrect instructionSet used for jump_table

Also update the related test case for gas change.

* core/vm: fix test cases issues that not suitable for boneh

* core/vm: reuse ErrMaxInitCodeSizeExceeded as error message

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-04-13 17:26:21 +08:00
..
lightchain_test.go consensus/clique, core: API cleanup (#23100) 2021-10-11 23:16:46 +02:00
lightchain.go BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
nodeset.go all: integrate the freezer with fast sync 2019-05-16 10:39:32 +03:00
odr_test.go core: only check sendernoeoa in non fake mode (#23424) 2021-08-23 12:49:39 +03:00
odr_util.go les, light: improve txstatus retrieval (#22349) 2021-02-25 14:24:04 +01:00
odr.go les, light: improve txstatus retrieval (#22349) 2021-02-25 14:24:04 +01:00
postprocess.go core, light, tests, trie: add state metrics (#23433) 2021-08-24 22:00:42 +03:00
trie_test.go accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2021-06-15 13:56:14 +03:00
trie.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
txpool_test.go accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2021-06-15 13:56:14 +03:00
txpool.go Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443) 2023-04-13 17:26:21 +08:00