Commit graph

16999 commits

Author SHA1 Message Date
cui
6af374e6aa
accounts/abi: fix unittest code (#34740)
1. should use !reflect.DeepEqual.
2. big.NewInt(0).SetBits([]big.Word{}) work around for DeepEqual when
big.Int is zero, unpack return a []big.Word{}.
2026-05-12 08:50:04 -04:00
cui
91f8e7cd9e
internal/ethapi: add balHash to block results (#34652) 2026-05-12 14:49:33 +02:00
Bosul Mun
726d657a4a
core/txpool/blobpool: add blobTxForPool type (#34882)
This PR introduces a separate transaction pool type for sparse blobpool.

In sparse blobpool, PooledTransactions message delivers transactions without
blobs, partial or full cells are downloaded by Cells message. Blobpool no longer
stores transactions with complete sidecars, and it stores transactions without
blobs, along with the corresponding cells. Because of this, a dedicated type
distinct from types.Transaction is required.

This PR introduces a type called `BlobTxForPool` and stores each sidecar field
independently, in order to bypass the assumption that a sidecar always exists as
a complete unit.

Reintroducing the conversion queue was considered, but was ultimately omitted
because type conversion should be sufficiently fast. With sparse blobpool, blob
-> cell computation would take about ~13ms per blob. Not sure whether this is
fast enough, but otherwise we can add the conversion queue later on the sparse
blobpool branch.
2026-05-12 13:59:33 +02:00
Lessa
ab28bda83e
eth/catalyst: fix getBlobsV3 partial/complete metrics (#34666)
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
In b2843a11d, metrics check len(res) == len(hashes) but res is
pre-allocated with make(), so length is always equal. Partial hit metric
never fires. Count non-nil elements instead.

---------

Co-authored-by: Bosul Mun <bsbs8645@snu.ac.kr>
2026-05-12 12:16:44 +02:00
cui
d446676fc4
core: write head hash to db after snap sync is complete (#34912)
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-12 10:05:39 +08:00
Sina M
c16684c1ee
internal/ethapi: fix withdrawal regression in eth_simulateV1 (#34939)
Fixes the regression caught by
https://hive.ethpandaops.io/#/test/generic/1778481210-e59b7465e1d04f7ed1b0200838584b16?testnumber=137.
engine.AssembleBlock explicitly expects withdrawals to be non-nil for
pre-Shanghai blocks as opposed to FinaliseAndAssemble which stripped off
the withdrawal.
2026-05-11 20:33:43 -04:00
rjl493456442
56d391b601
cmd, core, internal, miner: wrap pre/post-execution (#34812)
This is a refactoring PR to wrap all pre/post-execution system calls as
the exported functions, eliminating the duplicated system calls across
the codebase.

There are a few things unchanged but worths highlight:

- ChainMaker is left as unchanged, a significant rewrite is required
- BeaconRoot in header should be non-nil if Cancun is enabled

---------

Co-authored-by: jwasinger <j-wasinger@hotmail.com>
2026-05-11 16:17:48 -04:00
Daniel Liu
298c83502b
cmd/evm: fix gasUsed in evm run cmd (#34732)
In the --create path, execFunc returns gasLeft as the second return
value, but the rest of the code treats this value as "gas used" (printed
as such, and compared in timedExec). This makes gas reporting incorrect
and can cause benchmark consistency checks to fail.
2026-05-11 21:32:19 +02:00
rayoo
22919cec1b
eth/tracers: fix data race on interruption reason across tracers (#34827)
Every tracer that implements Stop/GetResult held a `reason error` field
that is written by Stop (called from the trace-timeout watchdog
goroutine in api.go) and read by GetResult (called by the RPC handler
main goroutine). These accesses were unsynchronized.
2026-05-11 21:21:31 +02:00
rjl493456442
8b39453122
version: start release 1.17.4 cycle (#34938)
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-11 23:57:06 +08:00
rjl493456442
117e067f0f
version: release go-ethereum v1.17.3 stable (#34937) 2026-05-11 17:19:24 +02:00
Marius van der Wijden
e1047b9c84
core: use uint256 in core.Message (#34934)
Changes core.Message to use Uint256 which is faster

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2026-05-11 22:25:57 +08:00
Richard Creighton
2f11dccca0
cmd/geth: respect --dev=false (#34920)
Passing `--dev=false` currently still enters the dev-mode startup path
because a couple of branches check whether the flag was set, not its
boolean value.

This switches those branches to use `ctx.Bool`, so explicit false does
not start dev mode or emit a dev genesis, while `--dev` keeps its
existing behavior.
2026-05-11 22:08:55 +08:00
rayoo
934a0091fa
triedb/pathdb: fix layer 5 key range in storage iterator traversal test (#34883)
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-11 10:23:58 +08:00
Marius van der Wijden
18becee8cb
appveyor.yml: remove appveyor configuration (#34720)
Removes the appveyor.yml since we moved to github runners.

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2026-05-10 22:54:57 +02:00
rayoo
f63c265092
internal/download: close dst on io.Copy error (#34910)
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-10 13:43:40 +02:00
cui
7facf9c129
core/txpool: use cmp.Compare instead of subtraction (#34918)
This fixes a theoretical overflow condition if an account has an impossibly high nonce.
2026-05-10 13:03:57 +02:00
cui
bcb68d23b3
p2p: handle return false from TCPEndpoint (#34916) 2026-05-10 13:02:46 +02:00
vickkkkkyy
8581125a21
crypto: add hash length check in nocgo VerifySignature (#33839)
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
I was tracing a signature verification issue in a nocgo build and found
that `VerifySignature` doesn't validate hash length. #33104 added the
check to `Sign` and `sigToPub` but missed this one. The cgo path in
`secp256k1/secp256.go` already rejects non-32-byte hashes, so the nocgo
path should do the same — otherwise a wrong-length hash gets passed to
decred's `Verify` and silently gives a bogus result.
2026-05-10 11:49:17 +02:00
Marius Kjærstad
2ba9be9c0e
build: upgrade -dlgo version to Go 1.25.10 (#34911)
New security fix:
https://groups.google.com/g/golang-announce/c/qcCIEXso47M
2026-05-10 11:45:23 +02:00
Richard Creighton
2ca3a6447d
cmd/geth: respect --graphql=false (#34914)
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
Passing `--graphql=false` currently still registers the GraphQL handler
because the startup path checks whether the flag was set, not its
boolean value.

This switches the registration condition to use `ctx.Bool`, so explicit
false disables GraphQL while the default behavior remains unchanged.
2026-05-09 16:07:12 +02:00
cui
b927ff8b53
cmd/devp2p: fix typo in ENR IP printing code (#34909) 2026-05-09 15:59:03 +02:00
cui
1f3989dc70
signer/core: avoid mutating the input (#34908)
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-09 08:51:12 +08:00
Sina M
592209c0ee
.gitea, build: cross-compile windows binaries (#34889)
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-08 15:18:24 +02:00
Miki Noir
0ad890e3af
core/txpool/blobpool: continue on cell proof error in GetBlobs (#34891)
`GetBlobs` returned early when `CellProofsAt` reported
corrupted/out-of-bounds proofs, dropping every blob already collected
and aborting the remaining hashes — a single bad sidecar killed the
whole Engine API batch for consensus clients. Replaced the `return nil,
nil, nil, err` with `log.Error + continue` so the slot stays `nil` per
the sparse-array contract, matching the store/RLP/nil-sidecar branches a
few lines above.
2026-05-08 12:43:31 +02:00
Felix Lange
281dc4c209
p2p/discover: decouple nodeFeed from Table mutex in waitForNodes (#34898)
Fixes #34881

This fixes a hang in `Table.waitForNodes`. It is a replacement for PRs
#34890, #33665 which tried to fix the same issue in a different way.

- #34890 doesn't really fix the issue, just makes it less likely
- #33665 tries to fix it by moving the feed send outside of the lock

I created this PR because I want to keep the synchronous node feed
sending in `Table.nodeAdded`.

---------

Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2026-05-08 11:33:19 +02:00
Delweng
1abbae239d
eth,node: replace the deprecated TypeMux with Feed (#32585)
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
replace the not used event.Typemux to event.Feed

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2026-05-08 10:12:46 +08:00
cui
e71098ba4e
core/state: fix StateDB Reader Error Discard After Commit (#34899)
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-07 18:40:26 -04:00
cui
e1e3eaa381
p2p/discover: copy buffer before sending read errors to unhandled (#34888)
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 fixes an issue where packets send to the `Unhandled` channel
configured on discv4 could be corrupted when the packet buffer gets
reused.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2026-05-07 15:18:04 +02:00
cui
f7b7d4c7e5
eth/tracers/logger: fix exclude address list (#34887)
Fixes the exclusion list of the accessListTracer.

---------

Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
2026-05-07 14:03:32 +02:00
Roshan
c5598fe958
core/txpool: change lock in Pending method of legacy pool to read lock (#32924)
This PR makes a small update to the `Pending()` method in the legacy
pool. By changing the lock from exclusive to read-only, it aims to
improve concurrency performance.

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2026-05-07 10:44:26 +02:00
Bosul Mun
ea1cf7bf5e
eth/protocols/eth: stop serving on unavailable responses (#34787)
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 an alternative PR for
https://github.com/ethereum/go-ethereum/pull/34746.
This PR implements the second approach among the two possible solutions
mentioned in the above PR.

Requests for unavailable items are possible when the peer is following a
different fork from us. However this is not expected to happen
frequently. Considering the amount of complexity added to the codebase,
the simpler approach (this PR) can be preferred.
2026-05-06 15:36:54 +02:00
Jonny Rhea
06c30cc7e1
triedb/pathdb: add AdoptSyncedState for snap/2 completion path (#34874)
This PR adds `AdoptSyncedState()` alongside `Enable()`. It does the same
pathdb bookkeeping (now factored into a shared `resetForReactivation()`
helper), but skips the regeneration. The wiring/calling code lands in
#34626

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2026-05-06 21:08:15 +08:00
Rahman
b92c86deb7
internal/download: don't discard dst.Close error (#34866)
When `io.Copy` succeeds but the buffered `Close` fails (e.g. disk full
on `Flush`), the error was swallowed and verification reported a
misleading hash mismatch instead of the real I/O failure. Keep the
`Close` error when `io.Copy` didn't already produce one.

---------

Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
2026-05-06 15:02:03 +02:00
Marius van der Wijden
aaa2b66285
core: implement eip-7981: Increase Access List Cost (#34755)
based on: https://github.com/ethereum/go-ethereum/pull/34748

spec: https://eips.ethereum.org/EIPS/eip-7981
2026-05-06 12:03:11 +02:00
Marius van der Wijden
4d2af275e1
eth/catalyst: allow reorging the head block to a parent (#34767)
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
Implements https://github.com/ethereum/execution-apis/pull/786/changes
as discussed on standup today

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2026-05-06 09:59:51 +02:00
cui
84949107ce
beacon/engine: fix wrong presize bound (#34860) 2026-05-06 15:18:12 +08:00
Andrii Furmanets
4ff33ba1b6
internal/download: only report stale existing downloads (#34849)
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
## Summary

Fixes #31917.

`geth era-download` now only prints `is stale` when an existing
downloaded file fails checksum verification. Missing files are still
downloaded normally, but no longer get mislabeled as stale.

## Why

`DownloadFile` used `verifyHash` for both missing files and checksum
mismatches, then printed `is stale` for any error. This made first-time
downloads look like corrupt or outdated files.

## Validation

- `make all`
- `go run ./build/ci.go test`
- `go run ./build/ci.go lint`
- `go run ./build/ci.go check_generate`
- `go run ./build/ci.go check_baddeps`

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2026-05-05 22:17:09 +02:00
rayoo
60db25b070
p2p/discover: restore nextTimeout update in UDPv4 resetTimeout loop (#34878)
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 refactor from `for el := plist.Front(); ...; el = el.Next()` to the
new `iterList` iterator in #34743 silently dropped two things needed by
resetTimeout:

1. `nextTimeout = el.Value.(*replyMatcher)` at the top of the loop. This
assignment is what gives `nextTimeout` its documented meaning ("head of
plist when timeout was last reset"), and what makes the early-return
optimization at the top of resetTimeout work. Without it, nextTimeout is
only ever written to nil, so `nextTimeout == plist.Front().Value` is
always false and the optimization is dead.

2. `nextTimeout.errc <- errClockWarp` in the clock-warp branch now reads
a stale or nil pointer. Prior to the refactor, the inner assignment kept
nextTimeout pointing at the current matcher so its errc was the right
channel to receive the errClockWarp signal. After the refactor, on first
entry into the clock-warp branch nextTimeout is nil, which panics the
UDPv4 loop goroutine with a nil pointer deref and takes discv4 down.

Re-assign `nextTimeout = p` at the head of the loop (restoring the
documented invariant) and send the clock-warp error on `p.errc` rather
than the now-stale `nextTimeout.errc`.

The clock-warp branch triggers only when the system clock jumps backward
after a deadline is assigned (deadline - time.Now() >= 2*respTimeout,
i.e. at least ~500ms backward jump), which is why this regression
slipped past CI - it is not exercised by any existing unit test, and
writing one would require plumbing a clock through the loop.
2026-05-05 15:28:28 +02:00
cui
5b837e5786
eth/downloader: use batch index in deliver reconstruct (#34870)
The reconstruct callback indexes parallel response slices (bodies,
receipts). Passing the accept counter used the wrong element when an
earlier header in the same batch hit a stale slot.
2026-05-05 12:41:22 +02:00
TenderDeve
d5edb80438
accounts/abi/bind: re-export event signature errors (#34868)
Re-exports errors in bind package.
---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2026-05-05 11:29:26 +02:00
rayoo
efd6cdcff1
eth/tracers: forward V2 state hooks through mux tracer (#34869)
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 the muxTracer to correctly forward events to v2 state
hooks, i.e. `OnCodeChangeV2` and `OnNonceChangeV2`.
2026-05-04 21:36:26 +02:00
Rahman
f0b21fa110
core/txpool/blobpool: fix gapped queue size cap (#34831)
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
the gapped queue cap was effectively per-sender rather than total — a
sender pool spread across enough distinct addresses could grow
`p.gapped` well past `maxGapped`, defeating the resource bound.

`maxGapped` was being compared against `len(p.gapped)`, which is a
`map[address][]tx` and counts unique senders, not queued txs. Switched
the check to `len(p.gappedSource)` (keyed by tx hash, so its length is
the real total). Also wired up a `blobpool/gapped/count` gauge plus
`promoted`, `evicted`, and `gappedfull` meters so queue size and churn
are actually observable in prod.
2026-05-02 13:29:21 +02:00
rayoo
7155c65abb
internal/ethapi: apply block overrides to header in eth_call (#34842)
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
Apply block overrides to header in eth_call so EIP-1559 fee fields
use the correct overridden basefee.
2026-05-01 20:32:49 +02:00
hero5512
8656efcf5b
ethclient/simulated: disable log indexing by default (#32594)
Disables the recently added log indexer from a simulated backend.
In most cases the log indexer is not required and unindexed search
should be fast enough.
Fixes https://github.com/ethereum/go-ethereum/issues/32552.
2026-05-01 20:27:57 +02:00
cui
d270e211d1
core/state/snapshot: fix condition in iterator traversal test (#34638)
Fixes a condition in a snapshot-related test.
2026-05-01 20:22:48 +02:00
Richard Creighton
41b856d472
ethclient: add maxUsedGas to simulate call results (#34820)
This updates the typed `ethclient` model for `eth_simulateV1` call
results to include `maxUsedGas`, matching the field already returned by
the server-side RPC response.

Follow-up to #32789.
2026-05-01 20:18:14 +02:00
felipe
b9c5fe6d26
eth/tracers: fix evm trace for t8n (#34862)
The mux tracer fanned out every standard hook to its children but never
forwarded OnSystemCall{Start,End}. Tracers that rely on these - like
`logger.jsonLogger`, which uses the start hook to silence its opcode
hook for the duration of a system call - never got the signal when
wrapped behind a mux.

In evm t8n, combining `--trace` with `--opcode-count` (default for geth
with exec specs) produces exactly that wrapping. The first system call
(e.g. `ProcessBeaconBlockRoot`) then fires `OnOpcode` on the json logger
before any `OnTxStart` has run, dereferencing a nil env and crashing
t8n.

Forward both hooks through the mux. The V2 fan-out falls back to V1 for
children that only implement the legacy hook, mirroring the precedence
already used in `core/state_processor.go`.
2026-05-01 16:38:33 +02:00
Guillaume Ballet
a15778c52f
trie: group 2^N binary trie nodes in serialization (#34794)
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 addresses one of the biggest performance issue with binary
tries: storing each internal node individually bloats the index, the
disk, and triggers a lot of write amplifications. To fix this issue,
this PR serializes groups of nodes together.

Because we are still looking for the ideal group size, the "depth" of
the group tree is made a parameter, but that will be removed in the
future, once the perfect size is known.


This is a rebase of #33658

---------

Co-authored-by: Copilot <copilot@github.com>
2026-05-01 15:28:19 +02:00
cui
68646229a0
internal/era/onedb: return false if err (#34816)
Next() function in RawIterator returned true on decompression errors.Now it
returns false on those cases. Redundant error check on cmd/era/main.go is also
removed.

---------

Co-authored-by: Bosul Mun <bsbs8645@snu.ac.kr>
2026-05-01 14:10:41 +02:00