Commit graph

16505 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
a98894eb48 Fix formatting: remove extra blank lines
Co-authored-by: MariusVanDerWijden <16664698+MariusVanDerWijden@users.noreply.github.com>
2025-11-03 10:17:47 +00:00
copilot-swe-agent[bot]
33e24f6aff Refine release notes format to match established style
Co-authored-by: MariusVanDerWijden <16664698+MariusVanDerWijden@users.noreply.github.com>
2025-11-03 10:16:41 +00:00
copilot-swe-agent[bot]
eb2b1a4b6a Draft release notes for v1.16.6
Co-authored-by: MariusVanDerWijden <16664698+MariusVanDerWijden@users.noreply.github.com>
2025-11-03 10:15:32 +00:00
copilot-swe-agent[bot]
dde3c588c6 Initial plan 2025-11-03 10:10:01 +00:00
maradini77
18a902799e
common: fix duration comparison in PrettyAge (#33064)
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
This pull request updates `PrettyAge.String` so that the age formatter
now treats exact unit boundaries (like a full day or week) as that unit
instead of spilling into smaller components, keeping duration output
aligned with human expectations.
2025-11-01 13:17:45 +08:00
hero5512
e6d34c1fee
eth/tracers: fix prestateTracer for EIP-6780 SELFDESTRUCT (#33050)
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
fix https://github.com/ethereum/go-ethereum/issues/33049
2025-10-31 18:14:52 +01:00
wit liu
243407a3aa
eth/downloader: fix incorrect waitgroup in test XTestDelivery (#33047)
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
2025-10-30 15:39:02 +08:00
Coder
ccacbd1e37
common: simplify FileExist helper (#32969)
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
2025-10-30 09:20:07 +08:00
Delweng
5dd0fe2f53
p2p: cleanup v4 if v5 failed (#33005)
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
Clean the previous resource (v4) if the latter (v5) failed.
2025-10-29 10:34:19 +01:00
Austin Larson
ae37b4928c
accounts/abi/bind/v2: fix error assertion in test (#33041) 2025-10-29 14:59:45 +08:00
Guillaume Ballet
739f6f46a2
.github: add 32-bit CI targets (#32911)
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 adds two new CI targets. One is for building all supported keeper
executables, the other is for running unit tests on 32-bit Linux.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-10-28 13:56:44 +01:00
anim001k
59d08c66ff
internal/jsre: pass correct args to setTimeout/setInterval callbacks (#32936)
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
## Description
- Summary: Correct the JS timer callback argument forwarding to match
standard JS semantics.
- What changed: In `internal/jsre/jsre.go`, the callback is now invoked
with only the arguments after the callback and delay.
- Why: Previously, the callback received the function and delay as
parameters, causing unexpected behavior and logic bugs for consumers.
2025-10-28 12:34:14 +01:00
Delweng
b1db341f7e
core: refine condition for using legacy chain freezer directory (#33032) 2025-10-28 13:53:42 +08:00
cui
33dbd64a23
core/types: optimize modernSigner.Equal (#32971)
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
Equal is called every time the transaction sender is accessed,
even when the sender is cached, so it is worth optimizing.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-10-27 16:04:06 +01:00
Delweng
447b5f7e19
core: don't modify the shared chainId between tests (#33020)
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-10-27 16:53:26 +08:00
cui
078a5ecb7d
core/state: improve accessList copy (#33024)
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
2025-10-26 16:13:59 +08:00
Rizky Ikwan
7fb91f3cd5
rpc: remove unused vars (#33012) 2025-10-26 16:13:04 +08:00
rjl493456442
cfa3b96103
core/rawdb, triedb/pathdb: re-structure the trienode history header (#32907)
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 this PR, several changes have been made:

(a) restructure the trienode history header section

Previously, the offsets of the key and value sections were recorded before 
encoding data into these sections. As a result, these offsets referred to the
start position of each chunk rather than the end position.

This caused an issue where the end position of the last chunk was
unknown, making it incompatible with the freezer partial-read APIs. 
With this update, all offsets now refer to the end position, and the 
start position of the first chunk is always 0.

(b) Enable partial freezer read for trienode data retrieval

The partial freezer read feature is now utilized in trienode data
retrieval, improving efficiency.
2025-10-25 16:16:16 +08:00
Felix Lange
17e5222997
build: fix keeper build (#33018)
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
At the time keeper support was added into ci.go, we were using a go.work
file to make ./cmd/keeper accessible from within the main go-ethereum
module. The workspace file has since been removed, so we need to build
keeper from within its own module instead.
2025-10-24 18:25:54 +02:00
Guillaume Ballet
074d7b79c1
.gitea/workflows, build: add release build for keeper (#32632) 2025-10-24 17:19:25 +02:00
hero5512
53c85da796
eth/tracers: fix crasher in TraceCall with BlockOverrides (#33015)
fix https://github.com/ethereum/go-ethereum/issues/33014

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2025-10-24 17:04:09 +02:00
Delweng
0413af40f6
rpc: fix a flaky test of the websocket (#33002)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Found in
https://github.com/ethereum/go-ethereum/actions/runs/17803828253/job/50611300621?pr=32585

```
--- FAIL: TestClientCancelWebsocket (0.33s)
panic: read tcp 127.0.0.1:36048->127.0.0.1:38643: read: connection reset by peer [recovered, repanicked]

goroutine 15 [running]:
testing.tRunner.func1.2({0x98dd20, 0xc0005b0100})
	/opt/actions-runner/_work/_tool/go/1.25.1/x64/src/testing/testing.go:1872 +0x237
testing.tRunner.func1()
	/opt/actions-runner/_work/_tool/go/1.25.1/x64/src/testing/testing.go:1875 +0x35b
panic({0x98dd20?, 0xc0005b0100?})
	/opt/actions-runner/_work/_tool/go/1.25.1/x64/src/runtime/panic.go:783 +0x132
github.com/ethereum/go-ethereum/rpc.httpTestClient(0xc0001dc1c0?, {0x9d5e40, 0x2}, 0xc0002bc1c0)
	/opt/actions-runner/_work/go-ethereum/go-ethereum/rpc/client_test.go:932 +0x2b1
github.com/ethereum/go-ethereum/rpc.testClientCancel({0x9d5e40, 0x2}, 0xc0001dc1c0)
	/opt/actions-runner/_work/go-ethereum/go-ethereum/rpc/client_test.go:356 +0x15f
github.com/ethereum/go-ethereum/rpc.TestClientCancelWebsocket(0xc0001dc1c0?)
	/opt/actions-runner/_work/go-ethereum/go-ethereum/rpc/client_test.go:319 +0x25
testing.tRunner(0xc0001dc1c0, 0xa07370)
	/opt/actions-runner/_work/_tool/go/1.25.1/x64/src/testing/testing.go:1934 +0xea
created by testing.(*T).Run in goroutine 1
	/opt/actions-runner/_work/_tool/go/1.25.1/x64/src/testing/testing.go:1997 +0x465
FAIL	github.com/ethereum/go-ethereum/rpc	0.371s
```

In `testClientCancel` we wrap the server listener in `flakeyListener`,
which schedules an unconditional close of every accepted connection
after a random delay, if the random delay is zero then the timer fires
immediately, and then the http client paniced of connection reset by
peer.

Here we add a minimum 10ms to ensure the timeout won't fire immediately.

Signed-off-by: jsvisa <delweng@gmail.com>
2025-10-23 20:58:33 +08:00
Guillaume Ballet
f1be21501f
crypto: implement ziren keccak state (#32996)
The #32816 was only using the keccak precompile for some minor task.
This PR implements a keccak state, which is what is used for hashing the
tree.
2025-10-23 14:02:13 +02:00
maskpp
030cd2d155
cmd/utils: use IsHexAddress method (#32997)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Using the `IsHexAddress` method will result in no gaps in the
verification logic, making it simpler.
2025-10-23 11:56:47 +02:00
Delweng
2bb3d9a330
p2p: silence on listener shutdown (#33001)
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-10-23 10:44:54 +02:00
Delweng
116c916753
cmd/devp2p: distinguish the jwt in devp2p and geth (#32972)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
This PR fixes some docs for the devp2p suite and uses the CLI library's required value instead of manually checking if required flags are passed.
2025-10-22 10:24:40 -06:00
Delweng
3b8075234e
core/state: fix the flaky TestSizeTracker (#32993) 2025-10-22 22:35:26 +08:00
cui
6608a2aafd
core/types: remove unused ErrInvalidTxType var (#32989)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
The var `ErrInvalidTxType` is never used in the code base.
2025-10-21 09:49:43 -06:00
lightclient
407d9faf71
cmd/geth: add flag to set genesis (#32844)
This PR is an alternative to #32556.

Instead of trying to be smart and reuse `geth init`, we can introduce a
new flag `--genesis` that loads the `genesis.json` from file into the
`Genesis` object in the same path that the other network flags currently
work in.

Question: is something like `--genesis` enough to start deprecating
`geth init`?

--

```console
$ geth --datadir data --hoodi
..
INFO [10-06|22:37:11.202]  - BPO2:                        @1762955544
..
$ geth --datadir data --genesis genesis.json
..
INFO [10-06|22:37:27.988]  - BPO2:                       @1862955544
..
```

Pull the genesis [from the
specs](https://raw.githubusercontent.com/eth-clients/hoodi/refs/heads/main/metadata/genesis.json)
and modify one of the BPO timestamps to simulate a shadow fork.

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-10-21 22:10:45 +08:00
rjl493456442
0a8b820725
triedb/pathdb: make batch with pre-allocated size (#32914)
In this PR, the database batch for writing the history index data is
pre-allocated.

It's observed that database batch repeatedly grows the size of the
mega-batch,
causing significant memory allocation pressure. This approach can
effectively
mitigate the overhead.
2025-10-21 13:11:36 +02:00
rjl493456442
79b6a56d3a
core/state: prevent SetCode hook if contract code is not changed (#32980)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
This PR prevents the SetCode hook from being called when the contract
code
remains unchanged.

This situation can occur in the following cases:
- The deployed runtime code has zero length
- An EIP-7702 authorization attempt tries to unset a non-delegated
account
- An EIP-7702 authorization attempt tries to delegate to the same
account
2025-10-21 16:03:56 +08:00
Kyrin
d73bfeb3d9
core/txpool: Initialize journal writer for tx tracker (#32921)
Previously, the journal writer is nil until the first time rejournal
(default 1h), which means during this period, txs submitted to this node
are not written into journal file (transactions.rlp). If this node is
shutdown before the first time rejournal, then txs in pending or queue
will get lost.

Here, this PR initializes the journal writer soon after launch to solve
this issue.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-10-21 15:41:38 +08:00
Marius van der Wijden
b81f03e8ff
params: enable osaka on dev mode (#32917)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
enables the osaka fork on dev mode

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2025-10-20 17:24:07 +02:00
Guillaume Ballet
b1809d13d1
cmd/keeper: use the ziren keccak precompile (#32816)
Uses the go module's `replace` directive to delegate keccak computation
to precompiles.

This is still in draft because it needs more testing. Also, it relies on
a PR that I created, that hasn't been merged yet.

_Note that this PR doesn't implement the stateful keccak state
structure, and it reverts to the current behavior. This is a bit silly
since this is what is used in the tree root computation. The runtime
doesn't currently export the sponge. I will see if I can fix that in a
further PR, but it is going to take more time. In the meantime, this is
a useful first step_
2025-10-20 11:52:02 +02:00
jwasinger
b6a4ac9961
core/vm: don't call SetCode after contract creation if initcode didn't return anything (#32916)
The code change is a noop here, and the tracing hook shouldn't be
invoked if the account code doesn't actually change.
2025-10-20 11:51:29 +02:00
maskpp
cfb311148c
eth/filters: avoid rebuild the hash map multi times (#32965)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-10-20 16:18:17 +08:00
cui
69df6bb8d5
core/types: prealloc map in HashDifference as in TxDifference (#32946) 2025-10-20 10:35:14 +08:00
hero5512
11c0fb98af
triedb/pathdb: fix index out of range panic in decodeSingle (#32937)
Fixes TestCorruptedKeySection flaky test failure.
https://github.com/ethereum/go-ethereum/actions/runs/18600235182/job/53037084761?pr=32920
2025-10-20 10:29:46 +08:00
Bosul Mun
88576c52e2
eth/fetcher: remove dangling peers from alternates (#32947)
This PR removes dangling peers in `alternates` map

In the current code, a dropped peer is removed from alternates for only
the specific transaction hash it was requesting. If that peer is listed
as an alternate for other transaction hashes, those entries still stick
around in alternates/announced even though that peer already got
dropped.
2025-10-20 10:26:55 +08:00
Bosul Mun
a9e66262af
eth/fetcher: add metrics for tracking slow peers (#32964)
This PR introduces two new metrics to monitor slow peers
- One tracks the number of slow peers.
- The other measures the time it takes for those peers to become
"unfrozen"

These metrics help with monitoring and evaluating the need for future
optimization of the transaction fetcher and peer management, for example i
n peer scoring and prioritization.

Additionally, this PR moves the fetcher metrics into a separate file, 
`eth/fetcher/metrics.go`.
2025-10-20 10:10:58 +08:00
CertiK
0ec63272bf
cmd/utils: use maximum uint64 value for receipt chain insertion (#32934)
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled
2025-10-18 19:54:56 +08:00
rjl493456442
342285b139
eth, internal: add blob conversion for SendRawTransactionSync (#32930)
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled
2025-10-17 13:34:35 +08:00
ucwong
0a2c21acd5
eth/ethconfig : fix eth generate config (#32929) 2025-10-17 10:35:44 +08:00
Youssef Azzaoui
b373d797d8
core/state: state copy bugfixes with Verkle Trees (#31696)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
This change addresses critical issues in the state object duplication
process specific to Verkle trie implementations. Without these
modifications, updates to state objects fail to propagate correctly
through the trie structure after a statedb copy operation, leading to
inaccuracies in the computation of the state root hash.

---------

Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2025-10-16 19:19:44 +02:00
aodhgan
ff54ca02de
internal/ethapi: add eth_SendRawTransactionSync (#32830)
New RPC method eth_sendRawTransactionSync(rawTx, timeoutMs?) that
submits a signed tx and blocks until a receipt is available or a timeout
elapses.

Two CLI flags to tune server-side limits:

--rpc.txsync.defaulttimeout (default wait window)

--rpc.txsync.maxtimeout (upper bound; requests are clamped)

closes https://github.com/ethereum/go-ethereum/issues/32094

---------

Co-authored-by: aodhgan <gawnieg@gmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2025-10-16 17:34:47 +02:00
hero5512
c37bd67019
ethclient: add support for eth_simulateV1 (#32856)
Adds ethclient support for the eth_simulateV1 RPC method, which allows
simulating transactions on top of a base state without making changes to
the blockchain.

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2025-10-16 17:32:55 +02:00
Galoretka
5c535074ac
cmd/geth: log current key in expandVerkle instead of keylist[0] (#32689)
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
Fix logging in the verkle dump path to report the actual key being
processed.
Previously, the loop always logged keylist[0], which misled users when
expanding multiple keys and made debugging harder. This change aligns
the
log with the key passed to root.Get, improving traceability and
diagnostics.
2025-10-16 13:49:41 +02:00
Felix Lange
367b5fbe42 version: begin v1.16.6 release cycle 2025-10-16 09:59:52 +02:00
Felix Lange
32ccb548d3 version: release go-ethereum v1.16.5 stable 2025-10-16 09:58:47 +02:00
Felix Lange
7c107c2691
p2p/discover: remove hot-spin in table refresh trigger (#32912)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
This fixes a regression introduced in #32518. In that PR, we removed the
slowdown logic that would throttle lookups when the table runs empty.
Said logic was originally added in #20389.

Usually it's fine, but there exist pathological cases, such as hive
tests, where the node can only discover one other node, so it can only
ever query that node and won't get any results. In cases like these, we
need to throttle the creation of lookups to avoid crazy CPU usage.
2025-10-15 11:51:33 +02:00