Commit graph

14672 commits

Author SHA1 Message Date
Sina Mahmoodi
e7fe236988 a type for each hook
# Conflicts:
#	core/tracing/hooks.go
2024-03-14 16:03:34 -04:00
Sina Mahmoodi
3253b8bab5 assign const values for gas change reasons 2024-03-14 16:03:07 -04:00
Sina Mahmoodi
688f0b9654 rename scopeContext to opContext 2024-03-14 16:03:07 -04:00
Sina Mahmoodi
d4ec634c05 rename GetLogger to Hooks
# Conflicts:
#	eth/tracers/logger/access_list_tracer.go
#	eth/tracers/logger/logger.go
#	eth/tracers/logger/logger_json.go
#	eth/tracers/logger/logger_test.go
#	eth/tracers/tracers_test.go
#	internal/ethapi/api.go
2024-03-14 16:03:05 -04:00
Sina Mahmoodi
39fc9dcafb move logger interface to core/tracing
# Conflicts:
#	cmd/evm/internal/t8ntool/execution.go
#	consensus/beacon/consensus.go
#	consensus/ethash/consensus.go
#	consensus/misc/dao.go
#	core/evm.go
#	core/genesis.go
#	core/state/state_object.go
#	core/state/state_test.go
#	core/state/statedb.go
#	core/state/statedb_fuzz_test.go
#	core/state/statedb_test.go
#	core/state/sync_test.go
#	core/state/trie_prefetcher_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/instructions.go
#	core/vm/interface.go
#	eth/api_debug_test.go
#	internal/ethapi/api.go
#	tests/block_test_util.go
#	tests/state_test_util.go
2024-03-14 15:59:21 -04:00
Sina Mahmoodi
b202e8ab74 renaming GetLogger
# Conflicts:
#	cmd/evm/internal/t8ntool/transition.go
#	eth/tracers/logger/logger_test.go
#	eth/tracers/tracers_test.go
2024-03-14 13:58:26 -04:00
Sina Mahmoodi
e1c669b3aa moaar fixes
# Conflicts:
#	core/state/state_test.go
#	core/state/statedb_fuzz_test.go
#	core/state/statedb_test.go
#	core/state/sync_test.go
#	core/state/trie_prefetcher_test.go
#	core/txpool/blobpool/blobpool_test.go
#	core/txpool/legacypool/legacypool2_test.go
#	core/txpool/legacypool/legacypool_test.go
#	eth/api_debug_test.go
2024-03-14 13:56:15 -04:00
Sina Mahmoodi
29ebfb30c3 fixes, rm t8ntool tracewriter
# Conflicts:
#	cmd/evm/internal/t8ntool/execution.go
#	cmd/evm/internal/t8ntool/transition.go
#	core/vm/instructions.go
#	eth/tracers/internal/tracetest/calltrace_test.go
#	eth/tracers/internal/tracetest/flat_calltrace_test.go
#	eth/tracers/internal/tracetest/prestate_test.go
#	eth/tracers/js/tracer_test.go
#	eth/tracers/logger/logger_test.go
#	eth/tracers/tracers_test.go
#	tests/block_test_util.go
#	tests/state_test_util.go
2024-03-14 13:51:16 -04:00
Sina Mahmoodi
f1027b7c0a fix goja scope object wrappers 2024-03-14 13:42:40 -04:00
Sina Mahmoodi
6013241175 fix memory copy util func 2024-03-14 13:42:40 -04:00
Sina Mahmoodi
e0b96540b7 Add canceler interface 2024-03-14 13:42:40 -04:00
Sina Mahmoodi
4e43718bd0 full struct-based tracing infra
# Conflicts:
#	consensus/beacon/consensus.go
#	consensus/ethash/consensus.go
#	consensus/misc/dao.go
#	core/blockchain.go
#	core/evm.go
#	core/genesis.go
#	core/state/dump.go
#	core/state/state_object.go
#	core/state/statedb.go
#	core/state_transition.go
#	core/vm/evm.go
#	core/vm/instructions.go
#	core/vm/interface.go
#	internal/ethapi/api.go
2024-03-14 12:09:18 -04:00
Sina Mahmoodi
4df6904051 use struct for tracing events
# Conflicts:
#	core/blockchain.go
#	core/state/state_object.go
#	core/state/statedb.go
2024-03-14 11:57:58 -04:00
Sina Mahmoodi
8ec4560e17 refactor onBlockStart params, new skip method 2024-03-14 11:54:59 -04:00
Sina Mahmoodi
b210cc761d remove onBeaconBlockRoot events 2024-03-14 11:54:59 -04:00
Sina Mahmoodi
d17940d2e7 minor fix 2024-03-14 11:54:59 -04:00
Sina Mahmoodi
318dc84314 add config for tracers 2024-03-14 11:54:59 -04:00
Sina Mahmoodi
2264a9c3fe fix mdLogger
Backport of cf6a31514b
2024-02-09 16:08:43 -05:00
Sina Mahmoodi
ee96dd2c03 live tracer err -> warn
Backport of 08cb623c2e
2024-02-09 16:08:28 -05:00
Sina Mahmoodi
97e9a8b315 fix blockchain -> logger circular import
Backport of 03206befb9
2024-02-09 16:07:56 -05:00
Matthieu Vachon
7ff2ae6924 indicate Known block
Backport of 056f229260
2024-02-08 16:04:15 -05:00
Matthieu Vachon
31b3b7dca3 rm OnNewAccount
Backport of 57cd0c30df
2024-02-08 15:57:12 -05:00
Matthieu Vachon
9f71824d8c Backported commits from extended-tracer
- 6c44a594f4
- 188cd4182e
- f3c0a89b57
- 95b50299a5
- 2cc09548bb
2024-02-06 15:36:12 -05:00
Matthieu Vachon
7f8926e716 Backporting extended-tracer branch
We backported branch `extended-tracer` at commit 3078dfe80b back to v1.13.5 of Geth.

To achieve the backport, we did:
- git checkout -b extended-tracer-squashed
- git reset --hard 3078dfe80b
- git reset --mixed fc380f52ef # This was the latest merged commit not from `extended-tracer` branch
- git commit -A -m "<This message>"
- git checkout v1.13.5
- git checkout -b extended-tracer-backport-v1.13.5
- git cherry-pick extended-tracer-squashed
2024-02-06 13:06:08 -05:00
Péter Szilágyi
916d6a441a params: release Geth v1.15.5 2023-11-14 15:02:24 +03:00
Delweng
f265cc24b4
cmd/geth: remove some whitespace in code and comments (#28148)
This changes just removes some whitespace
2023-11-10 13:26:13 +01:00
Marius Kjærstad
49b2c5f43c
build: upgrade -dlgo version to Go 1.21.4 (#28505) 2023-11-10 13:15:06 +01:00
Delweng
ce5a4809fd
ethclient: add empty/nonexist account testcase for eth_getProof RPC (#28482)
Adds testcases for eth_getProof endpoint for the following cases: 

- the account/contract does not exist
- the account/contract exists but is empty.
2023-11-10 12:23:09 +01:00
Wei Tang
2f4833b828
cmd/evm: allow state dump regardless if test passes in statetest (#28484)
This change makes it so that when executing state tess, state is always dumped out if the corresponding flag is set.
2023-11-10 12:21:51 +01:00
rjl493456442
326fa00759
core/rawdb: fsync the index file after each freezer write (#28483)
* core/rawdb: fsync the index and data file after each freezer write

* core/rawdb: fsync the data file in freezer after write
2023-11-10 12:56:39 +02:00
Delweng
e38b9f1830
eth/filters: exit early if topics-filter has more than 4 topics (#28494)
Currently, geth's will return `[]` for any `len(topics) > 4` log filter. The EVM only supports up to four logs, via LOG4 opcode, so larger criterias fail. This change makes the filter query exit early in those cases.
2023-11-10 08:10:03 +01:00
Jim McDonald
f7dde2a96c
ethdb/pebble: add Errorf function to panicLogger (#28491)
cockroachdb/pebble@422dce9 added Errorf to the Logger interface, this change makes it possible to compile geth with that version of pebble by adding the corresponding method to panicLogger.
2023-11-09 15:15:22 +01:00
Martin Holst Swende
b77a9b127c
cmd/geth: more testcases for logging (#28501)
* cmd/geth: more testcases for logging

This adds more edgecases around logging, particularly around handling of different types of nil-values
as concrete types and within interfaces.

Also adds tests with 'reserved' values which breaks json/logfmt formats. The json output is checked in,
but not actively used by any testcase at the moment.

* cmd/geth/testdata: remove timestamps
2023-11-09 10:46:48 +01:00
Delweng
7ea860d665
graphql: type of yParity from Long to BigInt (#28456)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-09 11:36:27 +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
Marius van der Wijden
4d9f3cd5d7
eth: set networkID to chainID by default (#28250)
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-11-07 14:21:46 +01:00
Delweng
f20b334f21
eth/filters: eth_getLogs fast exit for invalid block range (#28386) 2023-11-07 12:41:19 +01:00
Péter Szilágyi
97ae32441e
travis: use newer builder image (#28475) 2023-11-07 13:00:31 +02:00
Péter Szilágyi
51b5ad3da3
.travis: enable cross building to macos arm64 (#28474)
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-11-07 11:35:03 +01:00
Péter Szilágyi
e91cdb49be
ethclient: fix forwarding 1559 gas fields (#28462) 2023-11-03 19:40:37 +02:00
Alvaro Sevilla
b1cec853be
eth/tracers: add position field for callTracer logs (#28389)
Currently, one can use the "withLogs" parameter to include logs in the
callTracer results, which allows the user to see at which trace level
was each log emitted.
This commit adds a position field to the logs which determine
the exact ordering of a call's logs and its subcalls. This would
be useful e.g. for explorers wishing to display the flow of execution.

Co-authored-by: jsvisa <delweng@gmail.com>
2023-11-03 10:28:27 +01: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
rjl493456442
f4ac548619
ethdb/pebble: cap memory table size as maxMemTableSize-1 (#28444) 2023-10-31 18:19:31 +02:00
Mario Vega
285202aae2
cmd/evm: add --run option to blocktest command (#28421)
Co-authored-by: lightclient <lightclient@protonmail.com>
2023-10-31 15:23:51 +01:00
Felix Lange
bc42e88415
core: add basic chain history support in GenerateChain (#28428)
This change improves GenerateChain to support internal chain history access (ChainReader)
for the consensus engine and EVM.

GenerateChain takes a `parent` block and the number of blocks to create. With my changes,
the consensus engine and EVM can now access blocks from `parent` up to the block currently
being generated. This is required to make the BLOCKHASH instruction work, and also needed
to create real clique chains.  Clique uses chain history to figure out if the current signer is in-turn,
for example.

I've also added some more accessors to BlockGen. These are helpful when creating transactions:

- g.Signer returns a signer instance for the current block
- g.Difficulty returns the current block difficulty
- g.Gas returns the remaining gas amount

Another fix in this commit concerns the receipts returned by GenerateChain. The receipts now
have properly derived fields (BlockHash, etc.) and should generally match what would be
returned by the RPC API.
2023-10-31 12:39:25 +01:00
Jakub Freebit
447945e438
core/rawdb: add logging and fix comments around AncientRange function. (#28379)
This adds warning logs when the read does not match the expected count.
We can also remove the size limit since the function documentation explicitly states
that callers should limit the count.
2023-10-31 12:04:45 +01:00
rjl493456442
ea2e66a58e
trie/triedb/pathdb: improve dirty node flushing trigger (#28426)
* trie/triedb/pathdb: improve dirty node flushing trigger

* trie/triedb/pathdb: add tests

* trie/triedb/pathdb: address comment
2023-10-31 11:39:55 +02:00
Martin Holst Swende
233db64cc1
all: make vendored copy of reexec (#28382)
a little copying is better than a little dependency

-- go proverb

We have this dependency on docker, a.k.a moby: a gigantic library, and we only need ~70 LOC,
so here I tried moving it inline instead.

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-10-28 00:14:43 +02:00
Delweng
2d7dba024d
graphql: always set content-type to application/json (#28417)
---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-10-27 16:50:59 +02:00
Guillaume Ballet
4cbca5178a
core, cmd/geth: add --override.* flags to geth init (#28407)
* core, cmd/geth: add --override.* flags to geth init

* also apply overrides before genesis commit with new block

* review feedback
2023-10-27 10:15:14 +08:00