bsc/core
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
..
asm all: use strings.EqualFold for string comparison (#24890) 2022-09-21 17:02:02 +08:00
beacon dep: bump the version of several important library (#1274) 2023-02-02 19:36:37 +08:00
bloombits fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
forkid clean: Remove support for Ethereum testnet (#1337) 2023-03-06 19:53:13 +08:00
monitor mointor: implement double sign monitor (#1199) 2023-02-03 15:53:36 +08:00
rawdb clean: Remove support for Ethereum testnet (#1337) 2023-03-06 19:53:13 +08:00
state BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
systemcontracts BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
types BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
vm Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443) 2023-04-13 17:26:21 +08:00
vote BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443) 2023-04-13 17:26:21 +08:00
block_validator_test.go consensus: fix the GasLimitBoundDivisor (#1060) 2022-08-22 11:24:50 +08:00
block_validator.go core:remove redundant func (#1159) 2022-10-31 14:03:45 +08:00
blockchain_diff_test.go fix: asynchronous caching of difflayer causes random errors in tests 2022-07-06 15:43:33 +08:00
blockchain_insert.go core: fix snapshot missing when recovery from crash (#23496) 2021-11-01 14:09:36 +01:00
blockchain_notries_test.go fix: asynchronous caching of difflayer causes random errors in tests 2022-07-06 15:43:33 +08:00
blockchain_reader.go BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
blockchain_repair_test.go fix bug #1034, offline tool start failed when start with pruneancient 2022-08-16 14:02:45 +08:00
blockchain_sethead_test.go fix bug #1034, offline tool start failed when start with pruneancient 2022-08-16 14:02:45 +08:00
blockchain_snapshot_test.go fix bug #1034, offline tool start failed when start with pruneancient 2022-08-16 14:02:45 +08:00
blockchain_test.go Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443) 2023-04-13 17:26:21 +08:00
blockchain.go BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
blocks.go core: typos and comments improve 2017-05-25 17:14:33 +03:00
bloom_indexer.go core: preallocate batch size in bloomIndexer (#25289) 2022-12-16 17:30:34 +08:00
chain_indexer_test.go core: fix potential race in chainIndexerTest (#22346) 2021-03-19 13:32:57 +01:00
chain_indexer.go all: make logs a bit easier on the eye to digest (#22665) 2021-04-15 20:35:00 +03:00
chain_makers_test.go cmd, core, eth: background transaction indexing (#20302) 2020-05-11 18:58:43 +03:00
chain_makers.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
dao_test.go accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2021-06-15 13:56:14 +03:00
error.go Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443) 2023-04-13 17:26:21 +08:00
events.go BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
evm.go core/evm: RANDOM opcode (EIP-4399) (#24141) 2022-01-10 09:44:21 +02:00
forkchoice.go BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
gaspool.go miner: avoid unnecessary work (#15883) 2018-01-15 12:57:06 +02:00
gen_genesis_account.go tests: update for London (#22976) 2021-06-07 14:37:56 +02:00
gen_genesis.go core: change baseFee into baseFeePerGas in genesis json 2021-06-14 14:04:44 +02:00
genesis_alloc.go core/genesis: remove calaverasAllocData (#25516) 2022-11-18 11:16:03 +08:00
genesis_test.go clean: Remove support for Ethereum testnet (#1337) 2023-03-06 19:53:13 +08:00
genesis.go clean: Remove support for Ethereum testnet (#1337) 2023-03-06 19:53:13 +08:00
headerchain_test.go all: core rework for the merge transition (#23761) 2021-11-26 13:23:02 +02:00
headerchain.go BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
mkalloc.go all: add go:build lines (#23468) 2021-08-25 18:46:29 +02:00
receipt_processor.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00
remote_state_verifier.go [R4R]fix: resolve the concurrent cache read and write issue for fast node (#1009) 2022-07-22 15:54:06 +08:00
rlp_test.go core: fix benchmark tests (#23803) 2021-10-27 13:08:51 +02:00
state_prefetcher_test.go core: fix potential goroutine leak (#1079) 2022-09-21 17:02:02 +08:00
state_prefetcher.go core: fix potential goroutine leak (#1079) 2022-09-21 17:02:02 +08:00
state_processor_test.go Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443) 2023-04-13 17:26:21 +08:00
state_processor.go [Feature]: Improve trie prefetch (#952) 2022-08-01 17:41:50 +08:00
state_transition.go Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443) 2023-04-13 17:26:21 +08:00
tx_cacher.go Comment error (#18303) 2018-12-14 11:15:31 +01:00
tx_journal.go core: transaction journal should not be executable (#23090) 2021-06-23 07:29:20 +03:00
tx_list_test.go core: fix benchmark tests (#23803) 2021-10-27 13:08:51 +02:00
tx_list.go fix: add some boundary check for security (#1354) 2023-03-24 09:51:11 +08:00
tx_noncer.go core: more efficient nonce-update in txpool (#22231) 2021-11-02 18:32:23 +01:00
tx_pool_test.go core/txpool: implement additional DoS defenses (#1348) 2023-03-13 21:16:00 +08:00
tx_pool.go Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443) 2023-04-13 17:26:21 +08:00
txpool2_test.go core/txpool: implement additional DoS defenses (#1348) 2023-03-13 21:16:00 +08:00
types.go fix: code compatibility fixes 2022-07-05 11:14:21 +08:00