Commit Graph

501 Commits

Author SHA1 Message Date
philip-morlier
98464ca463 Further changes to enable the shanghai fork as well as redefining the random opcode 2024-02-28 20:37:17 -08:00
philip-morlier
bd9dd1b3ce Merge tag 'v1.13.13' into merge/geth-v1.13.13 2024-02-22 11:19:29 -08:00
Martin HS
ac0ff04460
core/vm, params: ensure order of forks, prevent overflow (#29023)
This PR fixes an overflow which can could happen if inconsistent blockchain rules were configured. Additionally, it tries to prevent such inconsistencies from occurring by making sure that merge cannot be enabled unless previous fork(s) are also enabled.
2024-02-19 16:29:59 +01:00
cui
5d984796af
core: using math.MaxUint64 instead of 0xffffffffffffffff (#29022) 2024-02-19 13:03:58 +01:00
philip-morlier
7e8ed6b43d Merge commit '02eb36afc' into merge/geth-v1.13.12 2024-02-09 07:15:32 -08:00
lmittmann
199e0c9ff5
core/state, core/vm: minor uint256 related perf improvements (#28944) 2024-02-07 17:01:38 +01:00
Dimitris Apostolou
8fd43c8013
all: fix typos in comments (#28881) 2024-02-05 22:16:32 +01:00
philip-morlier
48be241dbf Merge commit '8f7eb9ccd' into merge/geth-v1.13.11 2024-01-24 09:31:20 -08:00
trocher
2dc74770a7
core/vm: fix misleading comment (#28860)
fix misleading comment
2024-01-23 15:17:42 +01:00
Martin HS
a5a4fa7032
all: use uint256 in state (#28598)
This change makes use of uin256 to represent balance in state. It touches primarily upon statedb, stateobject and state processing, trying to avoid changes in transaction pools, core types, rpc and tracers.
2024-01-23 14:51:58 +01:00
Darioush Jalali
29b73555ae
core/state: unexport GetOrNewStateObject (#28804) 2024-01-14 12:32:23 +01:00
Austin Roberts
c2fa267503 Merge tag 'v1.13.9' into merge/geth-v1.13.9 2024-01-10 10:51:25 -06:00
Darioush Jalali
2365d77968
core/vm: update comments to match eip number (#28743) 2024-01-02 11:39:53 +01:00
philip-morlier
ac499a7ff1 Merge commit 'da6cdaf63' into merge/geth-v1.13.6 2023-12-18 15:08:33 -08:00
alex
edc864f9ba
all: fix typos in comments (#28682)
chore(core,eth):fix a couple of typos
2023-12-18 09:35:12 +01:00
philip-morlier
406ad4d1fb Merge commit '916d6a441' into merge/geth-v1.13.5 2023-11-14 08:39:46 -08:00
Martin Holst Swende
2391fbc676
tests/fuzzers: move fuzzers into native packages (#28467)
This PR moves our fuzzers from tests/fuzzers into whatever their respective 'native' package is.

The historical reason why they were placed in an external location, is that when they were based on go-fuzz, they could not be "hidden" via the _test.go prefix. So in order to shove them away from the go-ethereum "production code", they were put aside.

But now we've rewritten them to be based on golang testing, and thus can be brought back. I've left (in tests/) the ones that are not production (bls128381), require non-standard imports (secp requires btcec, bn256 requires gnark/google/cloudflare deps).

This PR also adds a fuzzer for precompiled contracts, because why not.

This PR utilizes a newly rewritten replacement for go-118-fuzz-build, namely gofuzz-shim, which utilises the inputs from the fuzzing engine better.
2023-11-14 14:34:29 +01:00
Sina Mahmoodi
e803ef09ad
eth/tracers/js: fix isPush for push0 (#28520)
Fixes so that `push0` opcode is correctly reported as `true` by the `IsPush` function

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-14 13:14:38 +01:00
Péter Szilágyi
470dba8fc1
core/vm: set basefee to 0 internally on eth_call (#28470)
* core/vm: set basefee to 0 internally on eth_call

* core: nicer 0-basefee, make it work for blob fees too

* internal/ethapi: make tests a bit more complex

* core: fix blob fee checker

* core: make code a bit more readable

* core: fix some test error strings

* core/vm: Get rid of weird comment

* core: dict wrong typo
2023-11-08 11:22:08 +02:00
lmittmann
a3be38127c
core/vm: performance tweak of OpCode.String() (#28453)
make `opCodeToString` a `[256]string` array

Co-authored-by: lmittmann <lmittmann@users.noreply.github.com>
2023-11-02 08:54:28 +02:00
AusIV
210c889297
Merge pull request #92 from openrelayxyz/feature/etc-plugin
Feature/etc plugin
2023-10-30 12:53:00 -05:00
philip-morlier
9974ce6f92 Modified pluginOpCodeSelect injection 2023-10-30 10:43:04 -07:00
Austin Roberts
20a51847a8 Add plugeth injection comment 2023-10-24 11:06:29 -05:00
Austin Roberts
cd9d109d65 Fix interpreter instruction set selection 2023-10-24 10:58:21 -05:00
Austin Roberts
e42a4cb944 Use EIP160 case instead of EIP158 2023-10-24 09:29:09 -05:00
Austin Roberts
0bb80e6be1 Set undefined operations instead of nil 2023-10-23 14:31:50 -05:00
Austin Roberts
a6ee75999b Add separate EIP160 check 2023-10-23 12:34:02 -05:00
kevaundray
a6a0ae45b6
crypto/kzg4844: use the new trusted setup file and format (#28383)
Changes the trusted_setup to the one created during the kzg-ceremony. The trusted setup file can be found in the consensus specs: https://github.com/ethereum/consensus-specs/blob/dev/presets/mainnet/trusted_setups/trusted_setup_4096.json
---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-10-22 16:05:04 +02:00
philip-morlier
63f8d10434 OpCode select plugin hook and injection 2023-10-20 09:27:20 -07:00
philip-morlier
f912a2192d Merge commit '0d45d72d7' into merge/geth-v1.13.3 2023-10-12 07:16:53 -07:00
0xbstn
fa6107c85e
core: fix typos (#28255)
fixes various typos in core
2023-10-10 10:22:03 +02:00
Marius van der Wijden
c39cbc1a78
core: implement BLOBBASEFEE opcode (0x4a) (#28098)
Implements "EIP-7516: BLOBBASEFEE opcode" for cancun, as per spec: https://eips.ethereum.org/EIPS/eip-7516
2023-10-02 05:49:29 -04:00
philip-morlier
18be67b3a3 Merge commit 'dc34fe829' into merge/geth-v1.13.2 2023-09-28 08:41:54 -07:00
hzysvilla
4de89e92e4
core/vm: minor code formatting (#28199)
Adding a space beween function opOrigin() and opcCaller() in instruciton.go.
Adding a space beween function opkeccak256()  and opAddress() in instruciton.go.
2023-09-26 11:58:01 +03:00
philip-morlier
bdc42a9128 Merge commit '7371b3817' into merge/geth-v1.13.0 2023-09-12 12:34:24 -07:00
Guido Vranken
0ba2d3cfa4
core/vm/runtime: Add Random field to config (#28001) 2023-08-25 04:05:33 -04:00
Martin Holst Swende
e13fa32cea
core/vm: update 4844 - point evaluation precompile address (#27874) 2023-08-08 15:54:19 +03:00
Darioush Jalali
57cdbaef30
all: remove trailing whitespace (#27741) 2023-08-05 00:24:32 +02:00
Péter Szilágyi
57268f7e6c
all: rename dataGas to blobGas (#27789) 2023-07-27 16:53:28 +03:00
jwasinger
988d84aa7c
core/state, core/vm: implement EIP 6780 (#27189)
EIP-6780: SELFDESTRUCT only in same transaction

>     SELFDESTRUCT will recover all funds to the caller but not delete the account, except when called in the same transaction as creation

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-07-17 13:02:18 -04:00
Martin Holst Swende
b058cf454b
core, tests: EIP-4844 transaction processing logic (#27721)
This updates the reference tests to the latest version and also adds logic
to process EIP-4844 blob transactions into the state transition. We are now
passing most Cancun fork tests.

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-07-15 23:27:36 +02:00
ucwong
99e000cb13
core/vm: use types.EmptyCodeHash (#27729) 2023-07-15 17:45:57 +02:00
jwasinger
d233b6b23a
core: replace instances of 'suicide' with 'selfdestruct' to improve code consistency. (#27716)
---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
2023-07-15 10:35:30 -04:00
philip-morlier
e516d5842c automated merge 2023-07-11 16:01:17 -07:00
Charles Cooper
5c9cbc218a
core/vm: implement EIP-5656, mcopy instruction (#26181)
Implements [EIP 5656](https://eips.ethereum.org/EIPS/eip-5656), MCOPY instruction, and enables it for Cancun. 

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-07-11 03:55:34 -04:00
Martin Holst Swende
af8b138c1a
core/vm: define cancun + enable 1153 (tstore/tload) in cancun (#27663) 2023-07-10 14:40:31 -04:00
Guillaume Ballet
85b8d1c06c
params, trie: add verkle fork management + upgrade go-verkle (#27464)
* params, trie: add verkle fork management + upgrade go-verkle

* remove the two verkle files

* core, eth, params: add missing function

* Gary's feedback

* remove trie/utils/verkle.go

* add verkle block override

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2023-06-28 12:08:48 +03:00
Marius van der Wijden
d7ea278fe3
core/vm: move TSTORE,TLOAD to correct opcode nums (#27613)
* core/vm: move TSTORE,TLOAD to correct opcode nums

* core/vm: cleanup
2023-06-27 03:25:08 -04:00
Marius van der Wijden
091c25d983
go.mod: update kzg libraries to use big-endian (#27510)
* go.mod: update kzg libraries to use big-endian

* go.sum: ran go mod tidy

* core/testdata/precompiles: fix blob verification test

* core/testdata/precompiles: fix blob verification test
2023-06-19 15:08:13 +03:00
Marius van der Wijden
c537ace249
core: 4844 opcode and precompile (#27356)
* core: crypto: implement BLOBHASH and pointEval precompile

* core: crypto: fixed nitpicks, moved precompile return value

* core/vm: fix review comments
2023-06-05 16:43:25 +03:00