Commit graph

16222 commits

Author SHA1 Message Date
cui
ccf684f1ba
core/vm: refactor to use bitutil.TestBytes (#32434) 2025-08-15 15:10:44 +08:00
Guillaume Ballet
a002a6c03f
cmd/evm: use PathScheme in blockrunner (#32444)
This is a preparatory change for Verkle/binary trees, since they don't
support the hash-based database scheme. This has no impact on the MPT.
2025-08-15 14:58:24 +08:00
Guillaume Ballet
ea3a71792d
trie, core/state: add the transition tree (verkle transition part 2) (#32366)
This add some of the changes that were missing from #31634. It
introduces the `TransitionTrie`, which is a façade pattern between the
current MPT trie and the overlay tree.

---------

Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-08-15 14:34:32 +08:00
cui
2dbb580f51
build: remove unused functions (#32393)
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-08-14 14:47:43 +02:00
cui
e798e26c69
crypto/secp256k1: use ReadBits from common/math (#32430) 2025-08-14 14:32:45 +02:00
levisyin
25cce4dfe4
build: upgrade -dlgo version to Go 1.25.0 (#32412) 2025-08-14 13:24:47 +02:00
Felix Lange
b00b6fe234
.github: upgrade workflows to Go 1.25 (#32425) 2025-08-14 13:07:20 +02:00
cui
2b38daa48c
p2p: refactor to use time.Now().UnixMilli() in golang std lib (#32402) 2025-08-14 16:28:57 +08:00
Marius van der Wijden
3ff99ae52c
eth/syncer: fix typo (#32427)
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
avaibale -> available
2025-08-13 09:12:08 -06:00
Nebojsa Urosevic
51342136fa
eth/tracers: Adds codeHash to prestateTracer's response (#32391)
**Problem:** Including full account code in prestateTracer response
significantly increases response payload size.

**Solution:** Add codeHash field to the response. This will allow
client-side bytecode caching and is a non-breaking change.

**Note:** codeHash for EoAs is excluded to save space.

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2025-08-13 13:51:38 +02:00
cui
f054befc55
rlp: optimize intsize (#32421)
goos: darwin
goarch: arm64
pkg: github.com/ethereum/go-ethereum/rlp
cpu: Apple M4
        │   old.txt   │               new.txt               │
        │   sec/op    │   sec/op     vs base                │
Intsize   2.175n ± 5%   1.050n ± 4%  -51.76% (p=0.000 n=10)
2025-08-13 12:00:54 +02:00
cui
a4d3fb9805
node: remove unused err var (#32398)
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-08-13 15:08:23 +08:00
Klimov Sergei
75fc56f27d
eth: abort requiredBlocks check if peer handler terminated (#32413) 2025-08-13 15:02:50 +08:00
youzichuan
56edd21453
cmd: fix inconsistent function name in comment (#32411)
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
fix inconsistent function name in comment

Signed-off-by: youzichuan <youzichuan6@outlook.com>
2025-08-12 11:37:09 -06:00
cui
43b2aac33c
trie: refactor to use slices.Concat (#32401)
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-08-12 21:47:18 +08:00
Rizky Ikwan
2e9c9b5e98
consensus: fix ambiguous invalid gas limit error (#32405)
## Description

Correct symmetric tolerance in gas limit validation:
Replace ambiguous "+-=" with standard "+/-" in the error message.
Logic rejects when |header − parent| ≥ limit, so allowed range is |Δ| ≤
limit − 1.

No logic or functionality has been modified.
2025-08-12 06:11:18 -06:00
rjl493456442
cbbf686ecc
trie, core: rework tracer and track origin value of dirty nodes (#32306)
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
These changes made in the PR should be highlighted here

The trie tracer is split into two distinct structs: opTracer and prevalueTracer. 
The former is specific to MPT, while the latter is generic and applicable to all
trie implementations.

The original values of dirty nodes are tracked in a NodeSet. This serves
as the foundation for both full archive node implementations and the state live
tracer.
2025-08-11 21:55:38 +08:00
Forostovec
55a471efaf
eth/downloader: skip nil peer in GetHeader (#32369)
The GetHeader function was incorrectly returning an error when
encountering nil peers in the peers list, which contradicted the comment 
"keep retrying if none are yet available". 

Changed the logic to skip nil peers with 'continue' instead of returning
an error, allowing the function to properly iterate through all
available peers and attempt to retrieve the target header from each valid peer.

This ensures the function behaves as intended - trying all available
peers before giving up, rather than failing on the first nil peer encountered.
2025-08-11 21:34:59 +08:00
cui
92106a6b17
accounts/abi, accounts/keystore: use reflect.TypeFor (#32323)
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-08-11 14:24:55 +02:00
sashass1315
2485d096f3
downloader: fix comment (#32382)
The previous comment stated that every 3rd block has a tx and every 5th
has an uncle.
The implementation actually adds one transaction to every second block
and does not add uncles.
Updated the comment to reflect the real behavior to avoid confusion when
reading tests.
2025-08-11 12:48:38 +02:00
cui
6238effeff
miner: remove todo comment (#32389)
see
https://github.com/ethereum/go-ethereum/pull/32372#discussion_r2265885182
2025-08-11 12:05:06 +02:00
cui
40072af04a
core/vm: make types consistent in makeDup (#32378) 2025-08-11 15:00:11 +08:00
MozirDmitriy
18b4ee5972
ethdb/leveldb: check iterator error in Database.DeleteRange (#32384)
Add missing it.Error() check after iteration in Database.DeleteRange to
avoid silently ignoring iterator errors before writing the batch.

Aligns behavior with batch.DeleteRange, which already validates iterator
errors. No other functional changes; existing tests pass (TestLevelDB).
2025-08-11 14:32:27 +08:00
kashitaka
8ba1c791bf
ethclient: fix flaky pending tx test (#32380)
Fixes: https://github.com/ethereum/go-ethereum/issues/32252
2025-08-11 14:29:07 +08:00
Ömer Faruk Irmak
c3ef6c77c2
core/vm: fold EVMInterpreter into EVM (#32352)
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
The separation serves no purpose atm, and the circular dependency that
EVM and EVMInterpreter had was begging for them to be merged.
2025-08-08 00:01:41 +02:00
cui
888b71b3cf
metrics: use atomic.Pointer in runtimeHistogram (#32361)
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
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-08-07 20:03:30 +02:00
radik878
f86870f5da
eth/downloader: fix incomplete code comment (#32354) 2025-08-07 16:31:02 +02:00
cui
4e7bc2bdc8
rlp: use reflect.TypeFor (#32317)
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-08-07 15:58:27 +02:00
cui
bd6797eafa
signer/core/apitypes: simplify reflect []byte creation (#32315)
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-08-07 15:56:25 +02:00
cui
e979438a55
p2p/enode: use atomic.Pointer in LocalNode (#32360) 2025-08-07 15:03:18 +02:00
cui
f9f85d0227
core: use reflect.TypeFor (#32320)
https://github.com/golang/go/issues/60088
2025-08-07 14:53:36 +02:00
cui
2e3971aed1
beacon/merkle: use reflect.TypeFor (#32322) 2025-08-07 14:36:20 +02:00
cui
ec97ac7085
common, common/hexutil: use reflect.TypeFor (#32321) 2025-08-07 14:30:03 +02:00
cui
dfde155541
crypto/kzg4844: use reflect.TypeFor (#32319) 2025-08-07 14:22:11 +02:00
cui
f49f3ec780
rpc: use reflect.TypeFor (#32316)
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-08-07 14:15:54 +02:00
cui
e7189b5987
go.mod: upgraded github.com/golang-jwt/jwt/v4 v4.5.1 => v4.5.2 (#32356)
https://pkg.go.dev/vuln/GO-2025-3553
2025-08-07 17:42:22 +09:00
cui
792de5d2e3
core/filtermaps: remove unnecessary nil check and add cv2 lock (#32309)
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
/ Linux Build (push) Waiting to run
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
2025-08-06 12:57:43 +02:00
Minhyuk Kim
59405c40d3
eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348)
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 makes 2 changes to how
[EIP-7825](https://github.com/ethereum/go-ethereum/pull/31824) behaves.

When `eth_estimateGas` or `eth_createAccessList` is called without any
gas limit in the payload, geth will choose the block's gas limit or the
`RPCGasCap`, which can be larger than the `maxTxGas`.

When this happens for `estimateGas`, the gas estimation just errors out
and ends, when it should continue doing binary search to find the lowest
possible gas limit.

This PR will: 
- Add a check to see if `hi` is larger than `maxTxGas` and cap it to
`maxTxGas` if it's larger. And add a special case handling for gas
estimation execute when it errs with `ErrGasLimitTooHigh`

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-08-05 19:51:16 +08:00
maskpp
e9dca3b181
eth/catalyst: avoid load the same blob tx multi times (#32190)
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
- If all the `vhashes` are in the same `sidecar`, then it will load the
same blob tx many times. This PR aims to upgrade this.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-08-05 13:07:45 +08:00
Guillaume Ballet
cf50026466
core/state: introduce the TransitionState object (verkle transition part 1) (#31634)
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 is the first part of #31532 

It maintains a series of conversion maker which are to be updated by the
conversion code (in a follow-up PR, this is a breakdown of a larger PR
to make things easier to review). They can be used in this way:

- During the conversion, by storing the conversion markers when the
block has been processed. This is meant to be written in a function that
isn't currently present, hence [this
TODO](https://github.com/ethereum/go-ethereum/pull/31634/files#diff-89272f61e115723833d498a0acbe59fa2286e3dc7276a676a7f7816f21e248b7R384).

Part of  https://github.com/ethereum/go-ethereum/issues/31583

---------

Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-08-05 09:34:12 +08:00
rjl493456442
073e7ec4b0
version: begin v1.16.3 release cycle (#32345)
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-08-04 16:24:38 +02:00
rjl493456442
dd1ebac117
version: release v1.16.2 (#32343) 2025-08-04 21:59:08 +08:00
Felföldi Zsolt
5ebd8032b9
beacon/params, core/filtermaps: update checkpoints (#32336)
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 updates checkpoints for blsync and filtermaps.
2025-08-04 09:19:33 +08:00
VolodymyrBg
5572f2ed22
rlp/rlpgen: implement package renaming support (#31148)
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
This adds support for importing types from multiple identically-named
packages.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-08-01 18:30:48 +02:00
Ceyhun Onur
038ff766ff
eth/filters: fix error when blockHash is used with fromBlock/toBlock (#31877)
This introduces an error when the filter has both `blockHash` and
`fromBlock`/`toBlock`, since these are mutually exclusive. Seems the
tests were actually returning `not found` error, which went undetected
since there was no check on the actual returned error in the test.
2025-08-01 17:14:30 +02:00
Tomás Andróil
9c58810e71
eth: fix typos and outdated comments (#32324) 2025-08-01 20:00:00 +08:00
lmittmann
17d65e9451
core/vm: add configurable jumpdest analysis cache (#32143)
This adds a method on vm.EVM to set the jumpdest cache implementation.
It can be used to maintain an analysis cache across VM invocations, to improve
performance by skipping the analysis for already known contracts.

---------

Co-authored-by: lmittmann <lmittmann@users.noreply.github.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-08-01 13:57:38 +02:00
rjl493456442
23da91f73b
trie: reduce the memory allocation in trie hashing (#31902)
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 pull request optimizes trie hashing by reducing memory allocation
overhead. Specifically:

- define a fullNodeEncoder pool to reuse encoders and avoid memory
allocations.

- simplify the encoding logic for shortNode and fullNode by getting rid
of the Go interfaces.
2025-08-01 10:23:23 +08:00
Felix Lange
d4a3bf1b23
cmd/devp2p/internal/v4test: add test for ENRRequest (#32303)
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 adds a cross-client protocol test for a recently discovered bug in Nethermind.
2025-07-31 12:13:36 +02:00
cui
4d9d72806c
accounts/abi: precompile regex (#32301)
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-07-31 09:53:31 +08:00