Commit graph

539 commits

Author SHA1 Message Date
Matthieu Vachon
f47d2fc315 Merge branch 'extended-tracer-struct' into firehose-fh3.0
# Conflicts:
#	core/blockchain.go
#	core/state/statedb.go
#	eth/backend.go
#	eth/tracers/live/printer.go
#	go.mod
#	go.sum
2024-03-13 16:23:13 -04:00
Sina Mahmoodi
65bdbc175f fix lint issue 2024-03-13 12:45:22 +01:00
Sina Mahmoodi
73ca96b97e resolve merge conflict 2024-03-12 17:55:17 +01:00
Sina Mahmoodi
eeb0a46429 rm canceler 2024-03-07 13:08:27 +01:00
Sina Mahmoodi
5bdbf07837 add fn refundGas 2024-03-07 12:15:57 +01:00
Sina Mahmoodi
935ff70d6d replace opcode with byte 2024-03-07 10:30:13 +01:00
Sina Mahmoodi
1d0101969a rm OnKeccakPreimage 2024-03-06 17:08:00 +01:00
Sina Mahmoodi
8b3cddabb5 rename tracer methods to On pattern 2024-03-06 16:34:18 +01:00
Sina Mahmoodi
37ce159500 rm OnStart and onEnd 2024-03-06 15:49:49 +01:00
cui
5a1e8a6547
core: delete unused ErrMaxInitCodeSizeExceeded (#29062) 2024-03-04 10:30:15 +01:00
Sina Mahmoodi
923c180058 rename Capture hooks to On 2024-02-29 17:18:43 +01:00
Sina Mahmoodi
d10d4b7626 rm old logger file 2024-02-29 16:38:54 +01:00
Sina Mahmoodi
f358e57490 rename scopeContext to opContext 2024-02-29 15:13:03 +01:00
Sina Mahmoodi
a2829c6f49 rename LiveLogger to hooks 2024-02-28 19:38:04 +01:00
Sina Mahmoodi
7d8db9b503 move logger interface to core/tracing 2024-02-28 19:34:49 +01:00
Sina Mahmoodi
8cc747f439 moaar fixes 2024-02-28 19:20:17 +01:00
cui
02d77c98f9
core: using math.MaxUint64 instead of 0xffffffffffffffff (#29094) 2024-02-28 15:25:12 +08:00
Sina Mahmoodi
a1877ab520 fixes, rm t8ntool tracewriter 2024-02-27 20:31:01 +01:00
Sina Mahmoodi
f434c8df56 Add canceler interface 2024-02-21 18:54:15 +01:00
Sina Mahmoodi
fc35780124 full struct-based tracing infra 2024-02-21 18:47:59 +01: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
Sina Mahmoodi
50095906e2 use struct for tracing events 2024-02-16 11:20:56 +01:00
Sina Mahmoodi
27f662d96c fix merge conflict 2024-02-08 19:07:00 +01: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
Matthieu Vachon
a46903cf0c Reduce amount of changes to Geth Live Tracer to keep Firehose backward compatibility
We removed the `precompile` check on `OnNewAccount` and moved it to the Firehose tracer directly. This way, we can remove our custom logic that toggle the check at the tracing code level and we can instead move the logic of backward compatibility back `FirehoseTracer`.

Refactored a bit also how precompiles are check. We moved the precompiles checker up to the block level now that `chainConfig` is available on `OnBlockStart` meaning we can extract the list of active precompiles. However, to make it work, we had to modify `OnGenesisBlock` to also receive `chainConfig` parameter, I've ask to add it to the geth codebase directly.
2024-02-05 12:01:21 -05:00
Matthieu Vachon
8767058368 Merge branch 'extended-tracer' into firehose-fh3.0
# Conflicts:
#	cmd/evm/internal/t8ntool/execution.go
#	consensus/beacon/consensus.go
#	consensus/ethash/consensus.go
#	consensus/misc/dao.go
#	core/genesis.go
#	core/state/statedb.go
#	core/state/statedb_test.go
#	core/state_transition.go
#	core/txpool/blobpool/blobpool_test.go
#	core/txpool/legacypool/legacypool2_test.go
#	core/txpool/legacypool/legacypool_test.go
#	core/vm/evm.go
#	core/vm/interface.go
#	tests/state_test_util.go
2024-02-02 15:08:47 -05:00
Sina Mahmoodi
ae522d6fb6
rm empty line
Co-authored-by: Martin HS <martin@swende.se>
2024-01-30 16:29:19 +01:00
Sina Mahmoodi
4c1d675041 resolve merge conflict 2024-01-29 20:00:43 +01: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
Arun Dhyani
0b70fbd76a account creation fixes 2024-01-17 10:46:52 +08:00
Matthieu Vachon
35c5b287f0 Merge branch 'extended-tracer' into firehose-fh3.0
# Conflicts:
#	go.sum
2024-01-15 13:25:36 -05:00
Matthieu Vachon
306a1fca64 Merge branch 'extended-tracer' into firehose-fh3.0
# Conflicts:
#	go.mod
#	go.sum
2024-01-15 12:40:19 -05:00
Darioush Jalali
29b73555ae
core/state: unexport GetOrNewStateObject (#28804) 2024-01-14 12:32:23 +01:00
Sina Mahmoodi
aa0db68d3a resolve merge conflict 2024-01-12 17:58:24 +03:30
Sina Mahmoodi
580f02527e has call reverted to snapshot 2024-01-12 17:53:12 +03:30
Darioush Jalali
2365d77968
core/vm: update comments to match eip number (#28743) 2024-01-02 11:39:53 +01: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
Sina Mahmoodi
2d14bb573c rename and document balance change reasons 2023-12-13 17:52:56 +03:30
Matthieu Vachon
72410c399d
Fixed BlockchainLogger.OnBlockEnd called too much times (#19)
The `processBlock` is already doing the work to call `OnBlockEnd`, no need to call it anymore afterwards.
2023-11-30 19:05:38 +03:30
Matthieu Vachon
e51cbb0c95 Merge branch 'extended-tracer' into firehose-fh3.0
# Conflicts:
#	go.mod
#	go.sum
2023-11-29 13:50:08 -05:00
Sina Mahmoodi
56600e911b fix VMError.Unwrap 2023-11-24 18:17:57 +03:30
Sina Mahmoodi
9c00b1290b fix merge conflict 2023-11-24 16:09:47 +03:30
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
Sina Mahmoodi
0d268b796c fix TxStart for traceCall 2023-11-08 19:28:42 +03: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
Sina Mahmoodi
429dcc99ca fix merge conflict 2023-11-02 15:58:17 +01:00