Commit graph

17073 commits

Author SHA1 Message Date
Yorick Downe
369521becb
cmd/utils: avoid extra newlines when reading era checksums (#35104)
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 checksum count during EraE import is off by one when `checksums.txt`
ends its last line on a newline, as the pandaops file does. The current
code would result in one empty string after the final `\n`, something
like

```
[]string{
    "line1",
    "line2",
    "line3",
    "",
}
```

Trim off the final `\n`, if it exists: `return
strings.Split(strings.TrimRight(string(b), "\n"), "\n"), nil`

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2026-06-03 11:48:45 -06:00
Guillaume Ballet
f493364590
build, cmd/geth, signer: remove clef (#35097)
`clef` is a great tool, however:

 * It is no longer maintained
 * No one else in the team can pronounce it properly

We are however receiving some slop PRs for it, so I think it's time -
with infinite sadness - to say goodbye.
2026-06-03 16:39:12 +02:00
Sina M
eb429a062a
core/txpool: drop reorged v0 blob sidecars (#35099)
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
With Osaka being a while ago I believe we can drop this transition and
drop the tx instead.
2026-06-03 21:26:18 +08:00
Chase Wright
6b451a4245
internal/ethapi: default block parameter to latest on state methods (#35100)
Make the `Block` parameter optional on the six state-reading methods,
defaulting to `latest` when omitted:

- `eth_getBalance`
- `eth_getCode`
- `eth_getStorageAt`
- `eth_getTransactionCount`
- `eth_getProof`
- `eth_getStorageValues`

This implements the behavior proposed in https://github.com/ethereum/execution-apis/pull/812.

---------

Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
2026-06-03 12:35:12 +02:00
Sina M
80d9ba5d97
internal/era: update to latest ere spec (#34896)
Update the EraE (ere) reader and builder to the latest e2store ere spec
  (https://github.com/eth-clients/e2store-format-specs/pull/16).

  The reader now derives the component layout from the on-disk e2store type
  tags via the dynamic block index, rather than assuming fixed slot positions.
  This makes the optional components (receipts, td, proof) resolvable in any
  supported subset.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2026-06-03 11:52:10 +02:00
Jonny Rhea
f4393173f2
triedb: reconcile stale storage roots in GenerateTrie, add cancel support (#34807)
Rewrites triedb.GenerateTrie as a single partitioned pass that
reconciles stale account.Root fields and rebuilds the trie at the same
time, with 16-way parallelism and crash resume baked in.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2026-06-03 15:08:09 +08:00
Jonny Rhea
e514ede494
rpc: fix flaky otel tests (#35101)
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 response can reach the client before the deferred spanEnd fires, so
call `httpsrv.Close()` before GetSpans is called.
2026-06-02 12:50:57 -05:00
cui
38667bc64e
p2p/nat: server list contains IPv6 servers (#35084)
stun-list.txt includes 10 bracketd IPv6 server, but the dial network is
fixed to "udp4"
2026-06-02 17:13:36 +02:00
Jonny Rhea
19f5fe079b
rpc, internal/telemetry: trace JSON-RPC response writes (#35049)
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 per-call SERVER span ended inside `handleCall()`, so the JSON-RPC
response write happened after the span closed. For large responses like
`engine_getBlobsV*`, that write time was missing from traces.

- Extend the SERVER span past `writeJSON`. 
- For batches, add a top-level `jsonrpc.batch` SERVER span (with `rpc.batch.size`) covering the whole batch including `callBuffer.write`.
- Add `rpc.writeJSON` span around the non-batch response write.
- Add `rpc.writeJSONBatch` span around the batch response write.
- Add `rpc.httpWrite` span around the actual HTTP write, separating JSON encoding from network write.
- Add additional telemetry helpers.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2026-06-02 14:13:06 +02:00
rjl493456442
77a2816468
eth/protocols/snap: introduce snapv2 skeleton (#35098)
This PR is a prerequisite for landing snap v2, the BAL-healing snap sync
algorithm.

It duplicates much of the snap v1 skeleton, which is expected to be
deprecated once v2 is enabled. The code duplication is acceptable as a 
short-term tradeoff, simplifying development and reducing integration 
complexity.
2026-06-02 14:48:26 +08:00
rjl493456442
02dd66dfc0
core/txpool/locals: fix data race (#35096)
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
Supersedes #35060

```
go test -race ./core/txpool/locals/
ok      github.com/ethereum/go-ethereum/core/txpool/locals      1.782s
```
2026-06-02 09:46:11 +08:00
rjl493456442
fdf99d9883
core/rawdb, ethdb, cmd, triedb: manage finalized block-accessList in freezer (#34977)
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 PR implements flat-file storage for finalized block access lists,
specifically:

* The freezer is extended with the notion of tail groups, allowing
different groups within a single freezer instance to maintain
independent tails, while all tables within the same group remain
tail-aligned.

* The freezer can now dynamically attach new tables to an existing
freezer instance, with both the table head and tail initialized to the
freezer's common head.

* A new freezer table, **bals**, has been added to the chain freezer
with its own dedicated tail group, preserving the flexibility to deploy
a tail-pruning policy different from the main chain data group.

Additionally, the BALs in the key-value store will be migrated to the
freezer instance once they are finalized or there are at least 90K block
confirmations on top acting as a "soft finalization". This freezing
policy is same with all chain segment data.
2026-06-01 11:01:42 +08:00
cui
00f7c72ca7
core/txpool/blobpool: blob pool with status queue (#35075) 2026-06-01 10:57:13 +08:00
cui
831ef5a453
node: only delete db ref on close successfully (#35083) 2026-06-01 10:56:38 +08:00
cui
5016e54406
eth/protocols/eth: only track after send is okay (#35086) 2026-06-01 10:56:23 +08:00
cui
ff45d1dd7b
internal: SetCodeTx tx.To must not be nil (#35094) 2026-06-01 10:56:05 +08:00
Marius van der Wijden
b71f750916
core, core/txpool, eth: move subscriptions to constructor (#35048)
Closes https://github.com/ethereum/go-ethereum/issues/20554
It makes it easier to reason about the lifecycle.
2026-06-01 08:13:59 +08:00
Jonny Rhea
046a10e8a7
go.mod: bump go.opentelemetry.io from 1.40.0 to 1.41.0 (#35073)
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
#35016 + cmd/keeper go mod tidy
2026-05-29 22:51:26 +02:00
cui
33711da476
accounts/abi: fix wrong want count for events (#35077) 2026-05-29 22:27:11 +02:00
Felix Lange
b908022511
rpc: always set content-length on HTTP responses (#35072)
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
We recently changed the JSON encoding logic to use an internal `[]byte`
buffer.
This means we can now always set `Content-Length` on the response.
2026-05-29 08:20:01 -05:00
Richard Creighton
7a73ffe8a3
accounts/usbwallet: check ledger versions for typed txs (#35044)
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
Checks the Ledger Ethereum app version before sending typed transactions
that require newer app support.

EIP-2930/EIP-1559 transactions now require Ledger app v1.9.0 or newer,
and EIP-7702 transactions require v1.17.0 or newer. Older apps now
return the same kind of local update error already used for earlier
Ledger feature gates instead of sending an unsupported transaction to
the device.

---------

Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2026-05-29 08:11:42 +02:00
Nikhil
0ef867b292
triedb/pathdb: fix swapped want/got args in journal-root mismatch error (#35067)
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
2026-05-29 08:38:04 +08:00
Guillaume Ballet
61342e9c01
trie/bintrie: record inserted leaves for t8n (#34843)
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
Because the UBT doesn't differentiate slots from accounts, the content
of the tree can not be exported as a `GenesisAlloc`, which means that
`evm t8n` can not intergrate it. We have tried integrating the new
format into execution-specs, but this is very hard to maintain because
the team doesn't see it as a priority and their own repository is seeing
a lot of churn. This PR adds the ability to capture the structure of
what is being inserted in the tree, so that the information isn't lost
and it can be dumped in the t8n context.

---------

Co-authored-by: felipe <fselmo2@gmail.com>
2026-05-28 17:06:47 +02:00
Barnabas Busa
95320ffe69
miner: set slot number for pending block post-Amsterdam (#34792)
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
2026-05-28 10:52:27 +02:00
rayoo
4017efe345
rpc: reject empty batch in BatchCallContext (#34985)
The server already rejects empty batches with -32600. On the client
side, calling BatchCallContext with a zero-length slice on inproc/WS/IPC
transports registers no request IDs but the server still replies with an
error message whose id is null. The dispatch loop has no requestOp to
match it to, so op.resp is never written and op.wait blocks until ctx
deadline.

Short-circuit on len(b) == 0 with the same invalidRequestError the
server uses, so all transports return immediately with -32600.
2026-05-28 10:38:34 +02:00
Marius van der Wijden
9f434c04db
go.mod: update pion/dtls (#35062)
Updates dtls to newest version
2026-05-28 10:16:15 +02:00
cui
10a1982203
eth/protocols/eth: fix track-before-send (#35056)
Track the transaction only after it was sent out
2026-05-28 10:05:40 +02:00
Jonny Rhea
b0df33967c
node, cmd/clef, graphql: disable gzip on engine API (#35057)
Add a disableGzip parameter to NewHTTPHandlerStack and httpConfig.
initAuth sets it true so compression is disabled in the engine api.
Public HTTP RPC behavior is unchanged.
2026-05-28 09:30:08 +02:00
cui
ab20d50dba
log: return TerminalHandler write errors from Handle (#35055)
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
Propagate slog Handle failures when the underlying io.Writer rejects
output.
2026-05-27 12:27:35 -04:00
cui
f4a90d178a
rpc: fix method-name matched before maxMethodNameLength (#35038)
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
2026-05-27 16:32:51 +02:00
cui
9d21f6ebd5
crypto/ecies: correctly return ErrInvalidMessage (#35037) 2026-05-27 16:30:03 +02:00
Guillaume Ballet
14820029c9
cmd/clef, cmd/geth: remove CLI flags that were deprecated for more than a year (#35021)
This is another one of my slop-PRs, aimed at reducing the amount of
future slop PRs by doing it all in one go.

All of the deprecated cli flags have been in that state for over a year.
It's time to remove them, especially since they are ineffective.

Note that I kept the code to report and manage deprecated cli flags, as
I assume we will be deprecating more flags in the future.
2026-05-27 14:58:31 +02:00
ozpool
45698e9cb9
p2p/nat: bump pion/stun to v3 to pull in fixed pion/dtls (#34980)
### Summary

Closes #34621.

`github.com/pion/dtls/v2` is affected by
[CVE-2026-26014](https://nvd.nist.gov/vuln/detail/CVE-2026-26014); the
fix lives in `github.com/pion/dtls/v3`. In this tree, dtls/v2 is pulled
in indirectly via `github.com/pion/stun/v2 v2.0.0` (declared at
`go.mod:53`), which is the only direct consumer — `p2p/nat/stun.go` is
the sole call site.

`github.com/pion/stun/v3` already uses dtls/v3, so bumping `stun`
upgrades the vulnerable dependency without touching `pion/dtls`
directly.

### API check

The v3 surface used by `p2p/nat/stun.go` is byte-identical in shape to
v2:

| Symbol | v2 | v3 |
|---|---|---|
| `Dial` | `func Dial(network, address string) (*Client, error)` | same
|
| `Build` | `func Build(setters ...Setter) (*Message, error)` | same |
| `TransactionID` | `var TransactionID Setter` | same |
| `BindingRequest` | `var BindingRequest = NewType(MethodBinding,
ClassRequest)` | same |
| `Event` | `type Event struct` | same |
| `XORMappedAddress` | `type XORMappedAddress struct { …
GetFrom(*Message) error }` | same |
| `DefaultPort` | `const DefaultPort = 3478` | same |

So the code change is just the import rename plus an alias rename to
keep the local label honest (`stunV2` → `stunV3`).

### Change

`go.mod` / `go.sum`:

- Replace direct `github.com/pion/stun/v2 v2.0.0` with
`github.com/pion/stun/v3 v3.0.1`.
- `go mod tidy` drops every `pion/dtls/v2` and `pion/stun/v2` entry from
`go.sum` and pulls `pion/dtls/v3 v3.0.7`, `pion/stun/v3 v3.0.1`,
`pion/transport/v3 v3.0.8` as the new indirect set.

`p2p/nat/stun.go`:

- Update the import path and rename the alias from `stunV2` to `stunV3`.

### Verification

- `go build ./p2p/nat/` clean.
- `go test ./p2p/nat/ -count=1` passes (26s).
- `grep 'pion/dtls/v2\|pion/stun/v2' go.sum` returns zero matches.

### Notes

- `pion/dtls` is not imported directly anywhere in the tree, so no other
code needs touching.
- `pion/transport/v3` was already in the dependency graph (the `stun/v3`
upgrade just bumps the patch from v3.0.1 → v3.0.8); the v2 transport
drops out cleanly.
2026-05-27 13:38:18 +02:00
lightclient
1a2333650a
eth/catalyst: import new payload if at genesis, regardless of sync status (#32673)
fixes #32672

This is kind of a band aid solution since it fixes the issue by
bypassing the snap sync expectations of an empty db and attempting to
import the new payload if we're at block 1. The next FCU will set the
status to synced.

Will continue looking to better understand how the above issue arises
and find a more thorough solution.

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2026-05-27 12:57:13 +02:00
Minh Vu
c782197d48
graphql: limit request body size (#35034)
Fixes #35033

## Problem

The GraphQL HTTP handler decoded request bodies directly before
executing the query. Unlike the JSON-RPC HTTP path, `/graphql` did not
have an explicit request body limit before JSON decoding.

A single `Decode` also stops after the first JSON value, so the handler
now requires EOF after the GraphQL request object to ensure oversized
trailing request data is not ignored.

## Changes

- Limit GraphQL request bodies to 5 MiB, matching the existing JSON-RPC
default body limit.
- Return `413 Request Entity Too Large` when the limit is exceeded.
- Require EOF after the request JSON object.
- Add regression coverage for oversized query bodies and oversized
trailing request data.
- Fix an existing GraphQL test fixture that had an unintended trailing
quote after the JSON object.

## Validation

- `gofmt -w graphql/service.go graphql/graphql_test.go`
- `go run golang.org/x/tools/cmd/goimports@latest -w graphql/service.go
graphql/graphql_test.go`
- `go test ./graphql -run TestGraphQLHTTPBodyLimit -count=1`
- `go test ./graphql -count=1`
2026-05-27 12:53:34 +02:00
cui
90cd7d1937
eth: should return basefee for the next block as doc says (#35023) 2026-05-27 12:53:03 +02:00
locoholy
ac1fdc5f8f
internal/ethapi: add eth_capabilities RPC method (#33886)
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
There is currently no way for JSON-RPC clients to discover which
historical data a node can serve without probing with trial-and-error
calls and interpreting opaque error messages (`pruned history
unavailable`).

This makes it hard to build robust tooling on top of nodes that prune
their history, for example nodes started with `--history.chain
postmerge`
or with reduced `TransactionHistory`, `LogHistory`, or `StateHistory`
windows.

This PR implements `eth_capabilities` as defined in
ethereum/execution-apis#755. The method takes no parameters and returns
the current head plus six per-resource capability records:
- `state`
- `tx`
- `logs`
- `receipts`
- `blocks`
- `stateproofs`

Closes #33828
2026-05-27 10:15:09 +02:00
vickkkkkyy
ace9c51233
cmd/utils: fix archive mode detection for TransactionHistory override (#33880)
Archive nodes store the full history of transactions in the index. This PR
fixes a bug for users who provided the NoPruning field in a YAML config file.
Now geth correctly stores full transaction history if archive is configured via
YAML.

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2026-05-27 09:03:32 +02:00
Sina M
d902837256
core/vm: global cache for jumpdest bitmaps (#34850)
```
● Global JUMPDEST Cache - engine_newPayload benchmark
  ============================================================
  Commit before: a06558042 (master)
  Commit after:  faef2454f (core/vm: global cache for jumpdest bitmaps)
  Blocks: 1k mainnet (24950066 → 24951065)
  Runs: 3 each, clean ZFS clone per run

                  Before (avg)    With Falcon (avg)   Δ
  Throughput      176.0 MGas/s    190.7 MGas/s        +8.3%
  Mean NP         172.3ms         159.0ms             -7.7%
  p50             162.8ms         150.7ms             -7.4%
  p95             282.4ms         259.8ms             -8.0%
  p99             391.0ms         371.6ms             -5.0%

  Machine: Intel Ultra 7 255H, 62GB DDR5, NVMe (ZFS), governor=performance, turbo=off
  ```

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2026-05-27 09:01:05 +02:00
cui
622cef2d06
eth/protocols/snap: fix error message (#34976)
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
2026-05-26 20:45:14 +08:00
Sina M
5933fa4bbf
.github: cancel CI run for stale PR commits (#34964)
Each commit on a PR kicks off a CI run. Those CI jobs run to the finish
regardless, even when new commits have been pushed which make them stale
and useless. This change attempts to cancel any previously running job
for the same PR.
2026-05-26 14:44:56 +02:00
Richard Creighton
cae4c5f93c
cmd/utils: respect --state.size-tracking=false (#35011)
Passing `--state.size-tracking=false` currently cannot disable state
size tracking when it was enabled by the config file because the CLI
path only turns the config value on.

---------

Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
2026-05-26 20:44:40 +08:00
cui
c6b2a27f85
graphql: end == 0 and begin > 0 should be reject (#35032) 2026-05-26 14:21:07 +02:00
cui
9429725d2d
p2p/discover: waitForNodes hangs on RespCount=0 from peer (#35043)
The first NODES response sets total = min(int(response.RespCount),
totalNodesResponseLimit), With RespCount=0, total=0 but receive become
1; receive == count is never satisfied.
2026-05-26 14:18:47 +02:00
cui
ca1a027fae
core: add slot number (#35036) 2026-05-26 12:27:07 +02:00
cui
8209b9cb05
accounts/abi: forEachUnpack ABI error message arguments swapped (#35046)
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
2026-05-26 10:29:00 +02:00
Sina M
c0fc5e0bda
internal/ethapi: fix base fee too low error code in eth_simulateV1 (#34951)
Fixes the issue discovered in
https://github.com/NethermindEth/nethermind/issues/11412.
2026-05-26 09:36:28 +02:00
Richard Creighton
d3edc58ef7
graphql: handle missing block body in Raw resolver (#35027)
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
Return empty raw bytes when the GraphQL `Block.raw` resolver cannot load
the block body. This matches the nil handling used by the other
block-body-backed resolvers and avoids exposing RLP empty-list bytes as
raw block data.
2026-05-22 13:59:02 +08:00
rayoo
a059a357d1
eth/catalyst: count actually-available blobs in getBlobs (#35028) 2026-05-22 13:58:31 +08:00
felipe
12eabbd76d
cmd/evm/internal/t8ntool: Amsterdam t8n updates; adds BAL and slotNum (#35025)
The changes here enable us to fill tests with Amsterdam using geth EVM
bin.

This will be useful for block builder tests using `testing_buildBlockV1`
endpoint and for filling benchmarking compute and stateful tests as
Python is too slow for benchmark tests.

Tested in
[ethereum/execution-specs](https://github.com/ethereum/execution-specs)
with:

```
uv run fill --clean --fork=Amsterdam tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py --evm-bin=$GETH_EVM_PATH
```
2026-05-22 11:40:09 +08:00