Commit graph

16619 commits

Author SHA1 Message Date
Felix Lange
fbbaa3c849
eth/catalyst: fix tests for getPayload change (#33322)
Fixes a test/lint regression introduced by #32754
2025-11-28 15:06:11 +01:00
lightclient
28376aea78
eth/catalyst: check fork timestamps during engine_getPayload (#32754)
This adds checks into getPayload to ensure the correct version is called
for the fork which applies to the payload.

---------

Co-authored-by: jsvisa <delweng@gmail.com>
2025-11-28 14:02:24 +01:00
Felix Lange
a122dbe459
internal/ethapi: return error code -32602 for invalid storage key (#33282)
Some checks are pending
/ Docker Image (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
This was found because other clients are failing RPC tests generated by
Geth. Nethermind and Besu return the correct error code, -32602, in this
situation.
2025-11-28 11:28:31 +01:00
Bhargava Shastry
fed8e09ab0
cmd/evm: add stdin support to blocktest command (#32824)
Enable blocktest to read filenames from stdin when no path argument is
provided, matching the existing statetest behavior. This allows
efficient batch processing of blockchain tests.

Usage:
- Single file: evm blocktest <path>
- Batch mode: find tests/ -name "*.json" | evm blocktest

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-11-28 11:22:36 +01:00
cui
f691d661c4
cmd/utils: fix disabling discovery through config file (#33279)
No matter what value of P2P.DiscoveryV4 or DiscoveryV5 is set in config file,
it will be overwritten by the CLI flag, even if the flag is not set. This fixes it
to apply the flag only if set.
2025-11-28 10:52:21 +01:00
cui
f43228152b
cmd/utils: fix dumpconfig (#33302) 2025-11-28 10:13:01 +01:00
Rizky Ikwan
446fdebdc3
consensus/ethash: fix blob gas error message formatting (#33300)
Fixes error messages to print the actual blob gas value instead of the
pointer address by dereferencing `ExcessBlobGas`, `BlobGasUsed` and
`ParentBeaconRoot`.
2025-11-28 12:14:30 +08:00
ANtutov
b3b46ce435
eth/downloader: remove dead proc counter (#33309)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-28 10:42:22 +08:00
Guillaume Ballet
795a7ab58a
go.mod: bump gnark-crypto to 0.18.1 (#33305)
Fix for https://github.com/ethereum/go-ethereum/pull/33060 which I can't
directly fix in the branch.
2025-11-27 20:43:05 +01:00
dependabot[bot]
aa1a8dacae
cmd/keeper/go.mod: bump github.com/consensys/gnark-crypto from 0.18.0 to 0.18.1 in /cmd/keeper (#33256)
Some checks are pending
/ Docker Image (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
Bumps
[github.com/consensys/gnark-crypto](https://github.com/consensys/gnark-crypto)
from 0.18.0 to 0.18.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/consensys/gnark-crypto/releases">github.com/consensys/gnark-crypto's
releases</a>.</em></p>
<blockquote>
<h2>v0.18.1</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Consensys/gnark-crypto/compare/v0.18.0...v0.18.1">https://github.com/Consensys/gnark-crypto/compare/v0.18.0...v0.18.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Consensys/gnark-crypto/blob/master/CHANGELOG.md">github.com/consensys/gnark-crypto's
changelog</a>.</em></p>
<blockquote>
<h2>[v0.18.1] - 2025-10-28</h2>
<h3>Docs</h3>
<ul>
<li>add CHANGELOG for 0.18.1</li>
</ul>
<h3>Perf</h3>
<ul>
<li>limit memory allocation during Vector deserialization (<a
href="https://redirect.github.com/Consensys/gnark-crypto/issues/759">#759</a>)</li>
</ul>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fb04e95c3b"><code>fb04e95</code></a>
docs: add CHANGELOG for 0.18.1</li>
<li><a
href="0a4d04ae62"><code>0a4d04a</code></a>
perf: limit memory allocation during Vector deserialization (<a
href="https://redirect.github.com/consensys/gnark-crypto/issues/759">#759</a>)</li>
<li>See full diff in <a
href="https://github.com/consensys/gnark-crypto/compare/v0.18.0...v0.18.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/consensys/gnark-crypto&package-manager=go_modules&previous-version=0.18.0&new-version=0.18.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/ethereum/go-ethereum/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-27 14:27:49 +01:00
radik878
8d1b1c20d0
core/txpool/blobpool: auto-start next conversion batch after completion (#33301)
This change fixes a stall in the legacy blob sidecar conversion pipeline
where tasks that arrived during an active batch could remain unprocessed
indefinitely after that batch completed, unless a new external event
arrived. 

The root cause was that the loop did not restart processing in
the case <-done: branch even when txTasks had accumulated work, relying
instead on a future event to retrigger the scheduler. This behavior is
inconsistent with the billy task pipeline, which immediately chains to
the next task via runNextBillyTask() without requiring an external trigger. 

The fix adds a symmetric restart path in `case <-done`: that checks 
`len(txTasks) > 0`, clones the accumulated tasks, clears the queue, and 
launches a new run with a fresh done and interrupt. 

This preserves batching semantics, prevents indefinite blocking of callers 
of convert(), and remains safe during shutdown since the quit path 
still interrupts and awaits the active batch. No public interfaces or logging 
were changed.
2025-11-27 19:43:37 +08:00
David Klank
6426257c0f
eth/tracers/logger: rename WriteTo to Write (#33227)
Some checks are pending
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
2025-11-27 16:05:24 +08:00
Rizky Ikwan
9bab01bee4
consensus/clique: fix blob gas error message formatting (#33296)
Fixes error messages to print the actual blob gas value instead of the
pointer address by dereferencing `ExcessBlobGas`, `BlobGasUsed` and
`ParentBeaconRoot`.
2025-11-27 16:03:21 +08:00
Justin
6452b7ad05
beacon/light: optimize database key assembling (#33292)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-27 10:35:22 +08:00
Guillaume Ballet
7805e203f0
.github/workflows: validate that the directories exist (#33289)
A new pointless fad appeared recently where people just create a fairly
low information tag at the beginning of their github PR titles.
Something like `feat` or other keywords.

This seems to originate from the angular community and to be used for
automation scripts over there. We do not use any of those scripts and if
we did we would be using the github labels, which offer strictly
equivalent functionalities without wasting useful PR title space.

In order for these keywords to fail the validation, I am adding a check
that these directories listed indeed exist in the repository.
2025-11-26 23:36:35 +01:00
Marius van der Wijden
3bbf5f5b6a
core/vm: improve memory resize (#33056)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Looks like (in some very EVM specific tests) we spent a lot of time
resizing memory. If the underlying array is big enough, we can speed it 
up a bit by simply slicing the memory.

goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/vm
cpu: Intel(R) Core(TM) Ultra 7 155U
           │ /tmp/old.txt │              /tmp/new.txt              │
           │    sec/op    │    sec/op     vs base                  │
Resize-14     6.145n ± 9%   1.854n ± 14%  -69.83% (p=0.000 n=10)

           │ /tmp/old.txt │            /tmp/new.txt             │
           │     B/op     │    B/op     vs base                 │
Resize-14      5.000 ± 0%   5.000 ± 0%       ~ (p=1.000 n=10)

           │ /tmp/old.txt │             /tmp/new.txt              │
           │  allocs/op   │ allocs/op   vs base                   │
Resize-14    0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹

From the blocktest benchmark: 

     620ms     10.93s (flat, cum)  9.92% of Total
         .          .     80:func (m *Memory) Resize(size uint64) {
      30ms       60ms     81:	if uint64(m.Len()) < size {
     590ms     10.87s     82:		m.store = append(m.store, make([]byte, size-uint64(m.Len()))...)
         .          .     83:	}
         .          .     84:}

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-11-26 16:50:16 +01:00
Klimov Sergei
c55a12197e
beacon/config: ignore nil values in config file (#33065)
YAML supports leaving out the value, so we should handle this condition
in our limited parser.
2025-11-26 16:19:33 +01:00
Klimov Sergei
3e48e0779c
beacon/config: add ELECTRA, FULU to knownForks (#32674) 2025-11-26 16:15:28 +01:00
Jonny Rhea
689ea10f35
core/vm: implement EIP-8024 (#33095)
EIP-8024: Backward compatible SWAPN, DUPN, EXCHANGE

Introduces additional instructions for manipulating the stack which
allow accessing the stack at higher depths. This is an initial implementation
of the EIP, which is still in Review stage.
2025-11-26 15:58:59 +01:00
Marius van der Wijden
ed4d00fd83
miner: add --miner.maxblobs flag (#33129)
Adds a flag to specify how many blobs a node is willing to include in
their locally build block as specified in
https://eips.ethereum.org/EIPS/eip-7872

I deviated from the EIP in one case, I allowed for specifying 0 as the
minimum blobs/block
2025-11-26 15:53:03 +01:00
oxBoni
1468331f9d
p2p/discover/v5wire: remove redundant bytes clone in WHOAREYOU encoding (#33180)
head.AuthData is assigned later in the function, so the earlier assignment
can safely be removed.
2025-11-26 15:34:11 +01:00
Lucia
3f7cd905b0
accounts/usbwallet: fix double hashing in SignTextWithPassphrase (#33138)
SignTextWithPassphrase calls SignText, which already performs TextHash.
2025-11-26 14:58:15 +01:00
radik878
cf93077fab
rlp: finalize listIterator on parse error to prevent non-advancing loops (#33245)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
The list iterator previously returned true on parse errors without
advancing the input, which could lead to non-advancing infinite loops
for callers that do not check Err() inside the loop; to make iteration
safe while preserving error visibility, Next() now marks the iterator as
finished when readKind fails, returning true for the error step so
existing users that check Err() can handle it, and then false on
subsequent calls, and the function comment was updated to document this
behavior and the need to check Err().
2025-11-26 11:30:05 +01:00
Felföldi Zsolt
62334a9d46
beacon: update beacon light client for fusaka (#33272)
This PR adds the "FULU" beacon chain config entries for all networks and
fixes the select statements that choose the appropriate engine API call
versions (no new version there but the "default" was always the first
version; now it's the latest version so no need to change unless there
is actually a new version).
New beacon checkpoints are also added for mainnet, sepolia and hoodi
(not for holesky because it's not finalizing at the moment).
Note that though unrelated to fusaka, the log indexer checkpoints are
also updated for mainnet (not for the other testnets, mainly because I
only have mainnet synced here on my travel SSD; this should be fine
though because the index is also reverse generated for a year by default
so it does not really affect the indexing time)

Links for the new checkpoints:

https://beaconcha.in/slot/13108192
https://light-sepolia.beaconcha.in/slot/9032384
https://hoodi.beaconcha.in/slot/1825728
2025-11-26 11:07:56 +01:00
rjl493456442
960c87a944
triedb/pathdb: implement iterator of history index (#32981)
This change introduces an iterator for the history index in the pathdb.
It provides sequential access to historical entries, enabling efficient 
scanning and future features built on top of historical state traversal.
2025-11-26 16:07:16 +08:00
Rizky Ikwan
ebf93555b1
consensus/misc: fix blob gas error message formatting (#33275)
Dereference the `header.BlobGasUsed` pointer when formatting the error
message in `VerifyEIP4844Header`.
2025-11-26 16:05:30 +08:00
Bashmunta
b04df226fa
cmd/geth: skip resolver for zero-commitment verkle children (#33265)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-25 20:34:58 +08:00
VolodymyrBg
2a4847a7d1
core/rawdb: fix underflow in freezer inspect for empty ancients (#33203)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-25 10:24:17 +08:00
sashass1315
a6191d8272
core/txpool/blobpool: drain and signal pending conversion tasks on shutdown (#33260) 2025-11-25 10:23:30 +08:00
Rizky Ikwan
5748dd18e7
consensus/beacon: fix blob gas error message formatting (#33201)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-24 22:30:44 +08:00
georgehao
b5c3b32eeb
eth/catalyst: remove the outdated comments of ForkchoiceUpdatedV1 (#33251) 2025-11-24 22:02:13 +08:00
Cedrick AH
495a1d2b1a
core, cmd: removed tablewriter from the dependencies (#33218)
Fix #33212. 

This PR remove `github.com/olekukonko/tablewriter` from dependencies and
use a naive stub implementation. 

`github.com/olekukonko/tablewriter` is used to format database inspection 
output neatly. However, it requires custom adjustments for TinyGo and is 
incompatible with the latest version.

---------

Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
2025-11-24 21:50:48 +08:00
phrwlk
f8e5b53f88
cmd/utils: make datadir.minfreedisk an IntFlag (#33252) 2025-11-24 21:01:00 +08:00
wit liu
f4817b7a53
core: initialize tracer before DAO fork logic (#33214)
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Keeper Build (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled
`StateDB` lacks recording functionality, so it has been replaced with
`tractStateDB` and advanced
2025-11-19 19:00:31 +01:00
maradini77
e0d81d1e99
eth: fix panic in randomDuration when min equals max (#33193)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Fixes a potential panic in `randomDuration` when `min == max` by
handling the edge case explicitly.
2025-11-19 01:54:53 +08:00
David Klank
5e6f7374de
ethapi: deref gasUsed pointer in eth_simulate log (#33192)
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Keeper Build (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled
Show the actual gas used in the block limit error so RPC clients see
useful numbers.
2025-11-15 07:04:21 -07:00
Guillaume Ballet
2a2f106a01
cmd/evm/internal/t8ntool, trie: support for verkle-at-genesis, use UBT, and move the transition tree to its own package (#32445)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
This is broken off of #31730 to only focus on testing networks that
start with verkle at genesis.

The PR has seen a lot of work since its creation, and it now targets
creating and re-executing tests for a binary tree testnet without the
transition (so it starts at genesis). The transition tree has been moved
to its own package. It also replaces verkle with the binary tree for
this specific application.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-11-14 15:25:30 +01:00
Guillaume Ballet
81c5b43029
core/rawdb: delete dead code to avoid more useless AI submissions (#33186)
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-11-14 14:39:36 +01:00
radik878
95273afec4
core/rawdb: return iterator error in findTxInBlockBody (#33188)
The iterator loop in findTxInBlockBody returned the outer-scoped err
when iter.Err() was non-nil, which could incorrectly propagate a nil or
stale error and hide actual RLP decoding issues. This patch returns
iter.Err() as intended by the rlp list iterator API, matching
established patterns elsewhere in the codebase and improving diagnostics
when encountering malformed transaction entries.
2025-11-14 13:55:41 +01:00
oooLowNeoNooo
aa36bcd0aa
graphql: add nil check in Transaction.Type() method (#33184)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Add nil check before calling tx.Type() to prevent panic when transaction
is not found.
2025-11-14 15:16:03 +08:00
phrwlk
488d987fc4
accounts/keystore: clear decrypted key after use (#33090)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-13 16:17:54 +08:00
Bashmunta
fa16c89bfd
core: use scheme-aware empty root in flushAlloc (#33168) 2025-11-13 16:15:44 +08:00
Delweng
f23d506b7d
eth/syncer: advance safe and finalized block (#33038) 2025-11-13 15:06:27 +08:00
Forostovec
eb8f32588b
triedb/pathdb: fix ID assignment in history inspection (#33103) 2025-11-13 14:51:41 +08:00
Marcel
48d708a194
eth/filters: further optimize tx hash map in #32965 (#33108) 2025-11-13 14:48:26 +08:00
Csaba Kiraly
12a389f065
core/txpool/blobpool: fix benchmarkPoolPending (#33161)
Add BlobTxs flag to filter.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2025-11-13 14:32:01 +08:00
oxBoni
3d2a4cb053
core: remove unused peek function in insertIterator (#33155)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-12 15:30:16 +08:00
Michael Kaplan
d8f9801305
rpc: avoid unnecessary RST_STREAM, PING frames sent by client (#33122)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Context from Cloudflare blog:
https://blog.cloudflare.com/go-and-enhance-your-calm/#reading-bodies-in-go-can-be-unintuitive

We were able to reproduce the same issue discussed by Cloudflare in
their recent blog post above using the `ethclient`.
2025-11-11 15:54:36 +01:00
Lucia
7368b34a4b
core/rawdb: capture open file error and fix resource leak (#33147)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-11 16:01:37 +08:00
Matthieu Vachon
5f4cc3f57d
core/state: fixed hooked StateDB handling of OnCodeChangeV2 (#33148)
While updating to latest Geth, I noticed `OnCodeChangeV2` was not
properly handled in `SelfDestruct/6780`, this PR fixes this and bring a
unit test. Let me know if it's deemed more approriate to merge the tests
with the other one.
2025-11-11 14:57:52 +08:00