Commit graph

2345 commits

Author SHA1 Message Date
Manav Darji
f090b34cd0
cmd, core, eth: make IsPrague block based instead of block, time both 2025-03-25 23:54:01 +05:30
Manav Darji
1acf5e6eb0
Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
Manav Darji
56065db427
Merge branch 'develop' into manav/upstream_merge_v1.14.11 2025-03-21 15:08:03 +05:30
Krishang Shah
99f3b70580
eth: dial nodes from discv5 (#1492)
* Revert: Revert "eth: dial nodes from discv5 (#30302)"

* eth/protocols/eth: add discovery iterator to protocol (#31185)

We somehow forgot to add this in #30302, so discv5 and DNS have actually
been disabled since then.

Fixes #31168

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-03-21 14:13:27 +05:30
Manav Darji
754cce0629
Merge branch 'develop' into manav/upstream_merge_v1.14.11 2025-03-20 18:31:15 +05:30
Jerry
0e7ce277de
Revert "eth: dial nodes from discv5 (#30302)" (#1489)
This reverts commit 6eb42a6b4f.
2025-03-20 18:30:09 +05:30
jj1980a
d72c039a1a
param: txs announced only (#1467) 2025-03-11 05:47:54 -04:00
Manav Darji
646f6358dd
Merge branch 'develop' into manav/upstream_merge_v1.14.11 2025-02-27 11:18:07 +05:30
Lucca Martins
ca4eb48bd8
Merge remote-tracking branch 'origin/develop' into lmartins/include-heimdal-timeout 2025-02-25 14:54:33 -03:00
Lucca Martins
e2f114b19b
including heimdall timeout on config 2025-02-19 17:15:43 -03:00
Manav Darji
427ae01c2d
Merge tag 'v1.14.11' into manav/upstream_merge_v1.14.11 2025-02-18 18:55:48 +05:30
Lucca Martins
0873515bcf
Merge remote-tracking branch 'origin/upstream_merge_v1.14.8' into lmartins/upstream_merge_v1.14.10 2025-02-11 03:51:43 -03:00
kamuikatsurgi
fc1d1fb01f
Merge develop 2025-02-11 10:22:01 +05:30
kamuikatsurgi
c79edcfcac
Merge develop and add relevant comments 2025-02-07 10:22:16 +05:30
marcello33
44b94ca6d3
POS-2821: solve lint issues 2025-02-06 13:05:46 +01:00
Lucca Martins
26ec762a11
Merge remote-tracking branch 'origin/upstream_merge_v1.14.8' into lmartins/upstream_merge_v1.14.10 2025-02-04 10:35:52 -03:00
Lucca Martins
fc2198bedd
Merge tag 'v1.14.10' into lmartins/upstream_merge_v1.14.10 2025-02-04 07:41:07 -03:00
kamuikatsurgi
2d2dbcc398
Merge develop branch 2025-01-31 10:21:37 +05:30
chloefeal
b42c28dd93
fix: some typos (#1396)
* build(deps): bump golang.org/x/crypto from 0.24.0 to 0.31.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.31.0.
- [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: typo

Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>

* fix: typo

Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>

* fix: typo

Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>

* fix: typo

Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raneet Debnath <35629432+Raneet10@users.noreply.github.com>
2025-01-31 01:02:27 +05:30
Manav Darji
8a1e0ec125
Enforce parallel evm via flag (#1425)
* (feat): implement --parallelevm.enforce to force using block-stm

* core: debug log

* docs: update docs with new flag

* update all config files

* core: modify chain import test to enforce parallel processing
2025-01-30 23:01:27 +05:30
kamuikatsurgi
78513d75a3
Merge develop and remove commented code 2025-01-30 16:15:29 +05:30
kamuikatsurgi
f09f89e1cb
make bor && make all successful 2025-01-22 15:36:07 +05:30
jwasinger
71b32b4d73 core/txpool, eth/catalyst: clear transaction pool in Rollback (#30534)
This adds an API method `DropTransactions` to legacy pool, blob pool and
txpool interface. This method removes all txs currently tracked in the
pools.

It modifies the simulated beacon to use the new method in `Rollback`
which removes previous hacky implementation that also erroneously reset
the gas tip to 1 gwei.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-11-19 14:50:11 +01:00
Marius van der Wijden
9b3cf575cd eth/protocols/eth: add ETH68 protocol handler fuzzers (#30417)
Adds a protocol handler fuzzer to fuzz the ETH68 protocol handlers
2024-11-19 14:50:11 +01:00
Delweng
8a3a697722 eth/tracers: fill the creationMethod in flatCall (#30539)
`flatCallTracer` will now specify the type of a create in the action
via the `creationMethod` field.

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2024-11-19 14:50:11 +01:00
Martin HS
6578b9aac5 all: fix issues with benchmarks (#30667)
This PR fixes some issues with benchmarks

- [x] Removes log output from a log-test
- [x] Avoids a `nil`-defer in `triedb/pathdb`
- [x] Fixes some crashes re tracers
- [x] Refactors a very resource-expensive benchmark for blobpol.
**NOTE**: this rewrite touches live production code (a little bit), as
it makes the validator-function used by the blobpool configurable.
- [x] Switch some benches over to use pebble over leveldb
- [x] reduce mem overhead in the setup-phase of some tests
- [x] Marks some tests with a long setup-phase to be skipped if `-short`
is specified (where long is on the order of tens of seconds). Ideally,
in my opinion, one should be able to run with `-benchtime 10ms -short`
and sanity-check all tests very quickly.
- [x]  Drops some metrics-bechmark which times the speed of `copy`.

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2024-11-19 14:50:11 +01:00
Péter Szilágyi
9bb5194166 eth/catalyst: make engine api test time independent (#30713)
This test depends on a 100ms timer, which fails quite often, messing up
our pipelines. Hook directly into the internal version of getPayload
which has the capacity to wait for the full payload before returning.
This might not be absolutely correct from a test perspective, but it
beats failing ci. The alternative would be to expose the full build hook
into the outside, but it might be a bit overkill for this scenario.
2024-11-19 14:50:11 +01:00
Delweng
b92e17f5a8 eth/tracers: flatCallTracer error compatible with parity (#30497)
Compatible error message in the flat call tracer with parity-style endpoints.

Signed-off-by: jsvisa <delweng@gmail.com>
2024-11-19 14:50:11 +01:00
Péter Szilágyi
83def9b8f5 cmd/utils, eth/ethconfig: remove some ancient leftover flag (#30705)
This is a flag leftover from the swarm era. No need to deprecate it,
it's been useless/dead forever now.
2024-11-19 14:50:11 +01:00
Péter Szilágyi
b7767efed0 core, eth, node: break rawdb -> {leveldb, pebble} dependency (#30689) 2024-11-19 14:50:11 +01:00
Delweng
f3cbacf373 eth/tracers: add disableCode/Storage options for prestateTracer (#30648)
When using the prestateTracer, in some cases users are only concerned
with balances or nonce information, and are not interested in the lengthy
contract code or storage data.

Therefore, this PR introduces two new configuration options in the
`prestateTracerConfig` structure:
- `disableCode`
- `disableStorage`

These options allow users to control whether the tracer returns contract
code and storage data during execution tracing. By setting these
options, users can more flexibly customize their needs and focus on
obtaining information that is more critical and relevant to their
specific use cases.

These options work with the default mode as well as `diffMode: true`.

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
2024-11-19 14:50:11 +01:00
Shude Li
e9e1cb0784 eth/tracers/internal/tracertest: add missing Random to call context (#30652)
Fixes a configuration issue in a test-helper, so that we can do call tracing-tests post-merge
2024-11-19 14:50:11 +01:00
jwasinger
53e3f445ed all: remove TerminalTotalDifficultyPassed (#30609)
rebased https://github.com/ethereum/go-ethereum/pull/29766 . The
downstream branch appears to have been deleted and I don't have perms to
push to that fork.

`TerminalTotalDifficultyPassed` is removed. `TerminalTotalDifficulty`
must now be non-nil, and it is expected that networks are already
merged: we can only import PoW/Clique chains, not produce blocks on
them.

---------

Co-authored-by: stevemilk <wangpeculiar@gmail.com>
2024-11-19 14:50:11 +01:00
Martin HS
d7434facba core/state: move state log mechanism to a separate layer (#30569)
This PR moves the logging/tracing-facilities out of `*state.StateDB`,
in to a wrapping struct which implements `vm.StateDB` instead.

In most places, it is a pretty straight-forward change: 
- First, hoisting the invocations from state objects up to the statedb. 
- Then making the mutation-methods simply return the previous value, so
that the external logging layer could log everything.

Some internal code uses the direct object-accessors to mutate the state,
particularly in testing and in setting up state overrides, which means
that these changes are unobservable for the hooked layer. Thus, configuring
the overrides are not necessarily part of the API we want to publish.

The trickiest part about the layering is that when the selfdestructs are
finally deleted during `Finalise`, there's the possibility that someone
sent some ether to it, which is burnt at that point, and thus needs to
be logged. The hooked layer reaches into the inner layer to figure out
these events.

In package `vm`, the conversion from `state.StateDB + hooks` into a
hooked `vm.StateDB` is performed where needed.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-11-19 14:50:11 +01:00
Martin HS
26e1470393 eth/tracers/js: avoid compiling js bigint when not needed (#30640)
While looking at some mem profiles from `evm` runs, I noticed that
`goja` compilation of the bigint library was present. The bigint library
compilation happens in a package `init`, whenever the package
`eth/tracers/js` is loaded. This PR changes it to load lazily when
needed.

It becomes slightly faster with this change, and slightly less alloc:y. 

Non-scientific benchmark with 100 executions: 
```
time for i in {1..100}; do ./evm --code 6040 run; done;
 ```

current `master`:

```
real    0m6.634s
user    0m5.213s
sys     0m2.277s
```
Without compiling bigint
```
real    0m5.802s
user    0m4.191s
sys     0m1.965s
```
2024-11-19 14:50:11 +01:00
Péter Szilágyi
db03e01577 build, internal, version: break ci.go/version->common dependency (#30638)
This PR tries to break the ci.go to common dependency by moving the
version number out of params.
2024-11-19 14:50:11 +01:00
rjl493456442
6412beedc4 core, trie, triedb: minor changes from snapshot integration (#30599)
This change ports some non-important changes from https://github.com/ethereum/go-ethereum/pull/30159, including interface renaming and some trivial refactorings.
2024-11-19 14:50:11 +01:00
Péter Szilágyi
cfd1489b92 beacon/engine, core/txpool, eth/catalyst: add engine_getBlobsV1 API (#30537) 2024-11-19 14:50:11 +01:00
lightclient
1660698efc beacon/engine,eth/catalyst: hex marshal requests in engine api (#30603)
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-11-19 14:50:11 +01:00
Sina M
e648904ba2 eth/tracers: various fixes (#30540)
Breaking changes:

- The ChainConfig was exposed to tracers via VMContext passed in
`OnTxStart`. This is unnecessary specially looking through the lens of
live tracers as chain config remains the same throughout the lifetime of
the program. It was there so that native API-invoked tracers could
access it. So instead we moved it to the constructor of API tracers.

Non-breaking:

- Change the default config of the tracers to be `{}` instead of nil.
This way an extra nil check can be avoided.

Refactoring:

- Rename `supply` struct to `supplyTracer`.
- Un-export some hook definitions.
2024-11-19 14:50:11 +01:00
Péter Szilágyi
9c054f8ad1 core, eth, ethstats: simplify chain head events (#30601) 2024-11-19 14:50:11 +01:00
Felix Lange
b755cec854 beacon/engine: strip type byte in requests (#30576)
This change brings geth into compliance with the current engine API
specification for the Prague fork. I have moved the assignment of
ExecutionPayloadEnvelope.Requests into BlockToExecutableData to ensure
there is a single place where the type is removed.

While doing so, I noticed that handling of requests in the miner was not
quite correct for the empty payload. It would return `nil` requests for
the empty payload even for blocks after the Prague fork. To fix this, I
have added the emptyRequests field in miner.Payload.
2024-11-19 14:50:11 +01:00
Martin HS
7a625d3a08 build: update to golangci-lint 1.61.0 (#30587)
Changelog: https://golangci-lint.run/product/changelog/#1610 

Removes `exportloopref` (no longer needed), replaces it with
`copyloopvar` which is basically the opposite.

Also adds: 
- `durationcheck`
- `gocheckcompilerdirectives`
- `reassign`
- `mirror`
- `tenv`

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2024-11-19 14:50:11 +01:00
Felix Lange
bee38ebb39 all: implement EIP-7002 & EIP-7251 (#30571)
This is a redo of #29052 based on newer specs. Here we implement EIPs
scheduled for the Prague fork:

- EIP-7002: Execution layer triggerable withdrawals
- EIP-7251: Increase the MAX_EFFECTIVE_BALANCE

Co-authored-by: lightclient <lightclient@protonmail.com>
2024-11-19 14:50:11 +01:00
Shude Li
f1ec974e2f eth/protocols/eth: remove Requests in block body (#30562)
Block no longer has Requests. This PR just removes some code that wasn't removed in #30425.
2024-11-19 14:50:11 +01:00
Martin HS
0205fb9fda eth/catalyst, core/txpool/blobpool: make tests output less logs (#30563)
A couple of tests set the debug level to `TRACE` on stdout,
and all subsequent tests in the same package are also affected
by that, resulting in outputs of tens of megabytes. 

This PR removes such calls from two packages where it was prevalent.
This makes getting a summary of failing tests simpler, and possibly
reduces some strain from the CI pipeline.
2024-11-19 14:50:11 +01:00
easyfold
8f3ae2a61a eth/tracers: do system contract processing prior to parallel-tracing (#30520)
This fixes `debug_traceBlock` methods for JS tracers in that it correctly
applies the beacon block root processing to the state.
2024-11-19 14:50:11 +01:00
Felix Lange
c93656f18e all: implement flat deposit requests encoding (#30425)
This implements recent changes to EIP-7685, EIP-6110, and
execution-apis.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: Shude Li <islishude@gmail.com>
2024-11-19 14:50:11 +01:00
marcello33
9cb6fcac0b
chg: handle edge cases with string blockNumber 2024-11-13 11:33:02 +01:00
marcello33
a4eb8db5bf
fix: lint 2024-11-08 18:33:58 +01:00