Commit graph

16533 commits

Author SHA1 Message Date
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
Guillaume Ballet
ca91254259
build: add wasm targets for keeper (#33124)
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
[powdr](github.com/powdr-labs/powdr) has tested keeper in their womir
system and managed to get it to work. This PR adds wasm as a keeper
target. There's another plan by the zkevm team to support wasm with wasi
as well, so these PR adds both targets.

These currently uses the `example` tag, as there is no precompile
intefrace defined for either target yet. Nonetheless, this is useful for
testing these zkvms so it makes sense to support these experimental
targets already.
2025-11-11 10:07:32 +08:00
sashass1315
fbd89be047
eth/catalyst: always reset timer after sealing error (#33146)
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 periodic sealing loop failed to reset its timer when sealBlock
returned an error, causing the timer to never fire again and effectively
halting block production in developer periodic mode after the first
failure. This is a bug because the loop relies on the timer to trigger
subsequent sealing attempts, and transient errors (e.g., pool races or
chain rewinds) should not permanently stop the loop. The change moves
timer.Reset after the sealing attempt unconditionally, ensuring the loop
continues ticking and retrying even when sealing fails, which matches
how other periodic timers in the codebase behave and preserves forward
progress.
2025-11-10 18:44:31 +01:00
Tristan-Wilson
7755ee3e4f
consensus/misc/eip4844: expose TargetBlobsPerBlock (#32991)
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Rollups may want to use these to dynamically adjust blobs posted after
BPO forks.
2025-11-10 09:38:28 +01:00
Lucia
ebc7dc9e37
crypto: validate hash length in no cgo Sign (#33104)
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
- Replace hardcoded DigestLength 
- Add hash length validation
2025-11-08 11:25:53 +01:00
Delweng
d2a5dba48f
triedb/pathdb: fix 32-bit integer overflow in history trienode decoder (#33098)
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
failed in 32bit:

```
--- FAIL: TestDecodeSingleCorruptedData (0.00s)
panic: runtime error: slice bounds out of range [:-1501805520] [recovered, repanicked]

goroutine 38872 [running]:
testing.tRunner.func1.2({0x838db20, 0xa355620})
	/opt/actions-runner/_work/_tool/go/1.25.3/x64/src/testing/testing.go:1872 +0x29b
testing.tRunner.func1()
	/opt/actions-runner/_work/_tool/go/1.25.3/x64/src/testing/testing.go:1875 +0x414
panic({0x838db20, 0xa355620})
	/opt/actions-runner/_work/_tool/go/1.25.3/x64/src/runtime/panic.go:783 +0x103
github.com/ethereum/go-ethereum/triedb/pathdb.decodeSingle({0x9e57500, 0x1432, 0x1432}, 0x0)
	/opt/actions-runner/_work/go-ethereum/go-ethereum/triedb/pathdb/history_trienode.go:399 +0x18d6
github.com/ethereum/go-ethereum/triedb/pathdb.TestDecodeSingleCorruptedData(0xa2db9e8)
	/opt/actions-runner/_work/go-ethereum/go-ethereum/triedb/pathdb/history_trienode_test.go:698 +0x180
testing.tRunner(0xa2db9e8, 0x83c86e8)
	/opt/actions-runner/_work/_tool/go/1.25.3/x64/src/testing/testing.go:1934 +0x114
created by testing.(*T).Run in goroutine 1
	/opt/actions-runner/_work/_tool/go/1.25.3/x64/src/testing/testing.go:1997 +0x4b4
FAIL	github.com/ethereum/go-ethereum/triedb/pathdb	41.453s
?   	github.com/ethereum/go-ethereum/version	[no test files]
FAIL
```

Found in
https://github.com/ethereum/go-ethereum/actions/runs/18912701345/job/53990136071?pr=33052
2025-11-07 23:06:15 +01:00
Marius van der Wijden
982235f5e0
core/vm: remove todo (#33120)
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
Removes an unnecessary todo. This case is handled, the comment was an
artifact from Kev's refactor
2025-11-07 21:55:58 +08:00
Rizky Ikwan
7f9b06e7aa
accounts/usbwallet: fix version check in SignTypedMessage (#33113)
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 version check incorrectly used `&&` instead of `||`, causing
versions like v1.0.x through v1.4.x to be allowed when they should be
rejected. These versions don't support EIP-712 signing which was
introduced in firmware v1.5.0.
2025-11-07 08:24:11 +01:00
maskpp
6420ee3592
core/state: fix bug about getting stable LogsHash result. (#33082)
Because the map iteration is unstable, we need to order logs by tx index
and keep the same order with receipts and their logs, so we can still
get the same `LogsHash` across runs.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-11-07 11:00:20 +08:00
Rizky Ikwan
15ff378a89
common: fix size comparison in StorageSize (#33105)
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-06 09:25:41 +08:00
MozirDmitriy
395425902d
core/rawdb: fix readOnly mode for database (#33025)
Some checks failed
/ Keeper Build (push) Has been cancelled
/ 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-11-04 21:09:57 +08:00
maskpp
19aa8020a9
common: introduce IsHexHash and use it (#32998) 2025-11-04 21:09:36 +08:00
Felix Lange
d39af344dc version: begin v1.16.8 release cycle 2025-11-04 13:28:20 +01:00
Felix Lange
07129d21c0 version: release go-ethereum v1.16.7 stable 2025-11-04 13:16:02 +01:00
Marius van der Wijden
653f8d4994
go.mod: update to c-kzg v2.1.5 (#33093)
We unfortunately missed this update for the Geth v1.16.6 release, but it is critical.
2025-11-04 19:48:13 +08:00
Felix Lange
5b77af394e version: begin v1.16.7 release cycle
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2025-11-03 17:47:42 +01:00
Felix Lange
044828e660 version: release go-ethereum v1.16.6 2025-11-03 17:46:19 +01:00
Marius van der Wijden
025072427e
params: set osaka and BPO1 & BPO2 mainnet dates (#33063)
Sets the fusaka, bpo1, bpo2 timestamps for mainnet
see: https://notes.ethereum.org/@bbusa/fusaka-bpo-timeline
2025-11-03 17:41:22 +01:00
rjl493456442
28c59b7a76
core/rawdb: fix db inspector by supporting trienode history (#33087)
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-03 21:11:14 +08: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