Commit graph

16342 commits

Author SHA1 Message Date
Csaba Kiraly
a4c9b34730
p2p/discover: add waitForNodes
This improves the latency of lookups in small networks and test setups. When the local node table runs empty, the lookupIterator will trigger refresh to try and fill the table again.

The behaviour of lookup in case of an empty table is changed:
- Previously, lookup waited fixed 1 second before trying to continue the lookup
- Now, lookup on an empty table returns immediately, and a better wait implementation is part of the LookupIterator. It reinitialises the table, and continues the interator as soon as a node becomes available.
2025-09-17 10:27:35 +02:00
Csaba Kiraly
de9fb9722b
revert to using table parameter
using it.lookup.tab inside is unsafe

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2025-09-17 09:04:41 +02:00
Felix Lange
6a7f64e760
core/vm: use go-bigmodexpfix for modexp (#32576)
Some checks are pending
/ Windows Build (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Docker Image (push) Waiting to run
This changes the modexp precompile to use a fork of math/big with some
patches by @GottfriedHerold to improve worst-case performance.
2025-09-16 17:08:04 +02:00
Guillaume Ballet
03b77d1a49
core/stateless: API methods to get execution witness of block
This PR adds a new RPC call, which re-executes a block with stateless
mode activated, so that the witness data are collected and returned.

They are `debug_executionWitnessByHash` which takes in a block hash
and `debug_executionWitness` which takes in a block number.

---------

Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2025-09-16 14:46:28 +02:00
VolodymyrBg
110b4e13c5
core/rawdb: fix typo in TestWriteAncientHeaderChain (#32587) 2025-09-16 20:27:20 +08:00
Csaba Kiraly
3589c0d59b
p2p/discover: expose timeout in lookupFailed
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

# Conflicts:
#	p2p/discover/lookup.go
2025-09-16 14:03:11 +02:00
VolodymyrBg
b340103e9d
core/tracing: remove unnecessary 'copy' field skip in TestAllHooksCalled (#32622)
This test iterated over Hooks fields and skipped a field named copy. The
Hooks struct has no such field, making the condition dead code.
2025-09-16 19:58:37 +08:00
Felix Lange
e48242bb69
cmd/evm/internal/t8ntool: use ApplyTransaction instead of ApplyMessage (#32618)
ApplyTransaction calls the hooks and builds the receipt, so some
duplicated code can be removed from t8ntool. Test cases have been
changed to add the `blockNumber` and `blockHash` in receipts, since
they were previously not filled in.
2025-09-16 10:09:06 +02:00
Guillaume Ballet
b05fe4aa64
cmd/keeper: add the keeper zkvm guest program (#32543)
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
Keeper is a zmvm guest program that runs the block transition.
It relies on the zkvm maker implementing `getInput`. For now, we only
provide a single implementation for the 'ziren' VM.

Why keeper?

In the _Mass Effect_ lore, the keepers are animals (?) who maintain the
citadel. Nothing is known from them, and attempts at tampering with them
have failed, as they self-destruct upon inquiry. They have a secret,
nefarious purpose that is only revealed later in the game series, don't
want any spoilers so I didn't dig deeper. All in all, a good metaphor
for zkvms.

---------

Co-authored-by: weilzkm <140377101+weilzkm@users.noreply.github.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-09-15 19:47:41 +02:00
Mark
89f364f7ed
go.mod: add tool section in module file (#32598)
This removes the tools.go workaround in favor of the official
tool management infrastructure, which was added in Go 1.24.
2025-09-15 18:46:18 +02:00
Felix Lange
6924eeaee0
eth/catalyst: allow fcuV3 for BPO forks (#32615)
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 an issue with the engine API after BPO forks have passed.
2025-09-15 16:26:09 +02:00
radik878
791e9fb23a
rlp: remove duplicate optionalAndTailField test case (#32614) 2025-09-15 16:16:06 +02:00
Marius van der Wijden
df0bd8960c
core/txpool/blobpool: migrate billy to new slot size (#31966)
Implements a migration path for the blobpool slotter

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-09-15 21:34:57 +08:00
Csaba Kiraly
4824942b97
core/txpool/blobpool: filter blob txs with sidecar version (#32577)
As a consequence of moving blob sidecar version migration code around,
we ended up building blocks with a mix of v0 and v1 blob transactions 
(different proof encoding in the sidecar).

This PR makes sure we are not building illegal blocks after Osaka. Blob 
migration is left for another PR.

Related issues and PRs:
- https://github.com/ethereum/go-ethereum/pull/31791
- https://github.com/ethereum/go-ethereum/pull/32347
- https://github.com/ethereum/go-ethereum/pull/31966
- https://github.com/ethereum/go-ethereum/issues/32235

---------

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2025-09-15 20:48:59 +08:00
Galoretka
ec99444804
core/overlay: copy BaseRoot in TransitionState.Copy (#32613)
This change ensures TransitionState.Copy preserves BaseRoot. During a
Verkle transition, ts.BaseRoot is required to construct the overlay MPT
when ts.InTransition() is true. Previously, copies dropped BaseRoot,
risking an invalid zero-hash base trie and inconsistent behavior.
2025-09-15 15:26:16 +08:00
radik878
c2fcc27132
core/rawdb: fix misleading comment in HasTrieNode (#32599)
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-09-15 10:45:50 +08:00
hero5512
a3062390f7
core/filtermaps: use slices.Sort to remove duplicated elements (#32602) 2025-09-15 10:42:14 +08:00
Antonio Viggiano
41f580f209
core/vm: fix typo in CLZ doc (#32604)
Some checks failed
/ Windows Build (push) Has been cancelled
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Docker Image (push) Has been cancelled
Fixes typo in CLZ doc.
2025-09-12 11:06:57 -06:00
Felix Lange
0643427965 p2p/discover: continue 2025-09-12 12:50:07 +02:00
Mobin Mohanan
5d09aa316f
accounts/abi/bind/v2: add Address method to BoundContract (#32559)
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-09-12 12:14:47 +02:00
Felix Lange
68c18ede06
Update lookup.go 2025-09-12 11:34:44 +02:00
Csaba Kiraly
97afa2815b
Revert "p2p/discover: add test for lookup returning immediately"
This reverts commit 3eab4616a6.
2025-09-12 11:29:43 +02:00
Guillaume Ballet
25d6596cd5
.github: remove redundant regexp check for heading dot (#32597) 2025-09-12 11:08:47 +02:00
Csaba Kiraly
3eab4616a6
p2p/discover: add test for lookup returning immediately
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2025-09-12 10:59:29 +02:00
Csaba Kiraly
72d3e881b3
p2p/discover: clarify lookup behavior on empty table
We have changed this behavior, better clarify in comment.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2025-09-12 10:52:53 +02:00
lightclient
8a19582c8d
eth/catalyst: enable newpayloadV4 on BPOs (#32589)
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Fixes an issue I accidentally introduced in #32579. Essentially, because
we gate the engine methods based on particular forks and I did not add
the BPOs as allowed forks to the method.
2025-09-11 22:09:56 +02:00
Felix Lange
8deb682a35
build: upgrade to go 1.25.1 (#32593) 2025-09-11 20:57:18 +02:00
Felix Lange
1c3703c888
.github: run tests with ci.go (#32590)
`ci.go` is the place to add custom build flags, build tags, etc. for the
test run. So we should use it for CI.
2025-09-11 20:15:51 +02:00
Felix Lange
cbf0b5bc92
go.mod, build: require go 1.24 and upgrade linter (#32584)
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-09-11 13:07:04 +02:00
GarmashAlex
92fbbe63c8
ethdb/pebble: set metric namespace correctly (#32563)
Ensure Database.namespace is initialized in pebble.New(...). Without
this, the write-stall metrics registered in onWriteStallBegin/End are
emitted without the intended namespace prefix, while other Pebble
metrics use the provided constructor parameter. This aligns stall
metrics with the rest of the Pebble metric set and fixes inconsistent
metric naming.

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-09-11 16:05:17 +08:00
lightclient
046e2cd7a4
params: add bpo forks to eth_config (#32579)
BPO forks should also be included in eth_config response.
2025-09-11 14:18:11 +08:00
Felix Lange
a9f9e0d589 p2p/discover: add imports in test 2025-09-10 20:10:51 +02:00
Felix Lange
3133fd369a p2p/discover: remove print in test 2025-09-10 20:10:51 +02:00
Felix Lange
3946708935 p2p/discover: fix two bugs in lookup iterator
The lookup would add self into the replyBuffer if returned by another node.
Avoid doing that by marking self as seen.

With the changed initialization behavior of lookup, the lookupIterator needs to yield the
buffer right after creation. This fixes the smallNetConvergence test, where all results
are straight out of the local table.
2025-09-10 20:10:51 +02:00
Felix Lange
cf0503da7c p2p/discover: track missing nodes in test 2025-09-10 20:10:51 +02:00
Felix Lange
721c8de738 p2p/discover: trigger refresh in lookupIterator 2025-09-10 20:10:51 +02:00
Felix Lange
e58e7f7927 p2p/discover: fix bug in lookup 2025-09-10 20:10:51 +02:00
Felix Lange
4ed8f5ee2b p2p/discover: improve iterator 2025-09-10 20:10:51 +02:00
Felix Lange
f4046b0cfb p2p/discover: move wait condition to lookupIterator 2025-09-10 20:10:51 +02:00
Felix Lange
f8e0e8dc55 p2p/discover: add context in waitForNodes 2025-09-10 20:10:51 +02:00
Felix Lange
46e4f0b5c1 p2p/discover: add waitForNodes 2025-09-10 20:10:51 +02:00
Csaba Kiraly
1f7f95d718
p2p/discover: remove delay from discv5 RandomNodes (#32517)
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
Refresh is doing some lookups and thus it could block for some time. We
do not want the initializer of an iterator to block. If there is
something blocking, it should happen when calling Next.

Here, next will start a lookup, which will wait if needed (no nodes),
making sure the iterator's Next is not creating a busy loop.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2025-09-10 19:51:04 +02:00
Zach Brown
b708feb9c3
core/vm: fix comment and remove unused divisor in osakaModexpGas (#32553)
The `divisor` const is not needed in the gas cost calculation in `osakaModexpGas`.
2025-09-10 21:44:18 +08:00
Marius van der Wijden
dd7fe1be4b
core/vm: fix modexp gas calculation (#32568)
fixes a bug in the gas calculation found by oss-fuzz
2025-09-10 21:37:49 +08:00
Marius van der Wijden
d68528cadb
core/txpool: add sanity overflow check (#32544)
Adds a sanity check in the transaction pool

Co-authored-by @rjl493456442
2025-09-10 21:33:15 +08:00
lightclient
586ac9b334
params: use spaces instead of tabs in config description (#32564)
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
The tabs aren't consistently spaced with the other items in the
description. This fixes it.
2025-09-10 15:25:25 +08:00
maskpp
5cc443609f
core/txpool/blobpool: disallow legacy sidecar after osaka (#32534)
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 removes the conversion of legacy sidecars after Osaka and instead rejects them to the pool.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2025-09-09 21:15:47 -06:00
rjl493456442
ca6e2d141b
triedb/pathdb: sync ancient store before journal (#32557)
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 addresses the corrupted path database with log
indicating:
`history head truncation out of range, tail: 122557, head: 212208,
target: 212557`

This is a rare edge case where the in-memory layers, including the write
buffer
in the disk layer, are fully persisted (e.g., written to file), but the
state history
freezer is not properly closed (e.g., Geth is terminated after
journaling but
before freezer.Close). In this situation, the recent state history
writes will be
truncated on the next startup, while the in-memory layers resolve
correctly.
As a result, the state history falls behind the disk layer (including
the write buffer).

In this pull request, the state history freezer is always synced before
journal,
ensuring the state history writes are always persisted before the
others.

Edit: 
It's confirmed that devops team has 10s container termination setting.
It
explains why Geth didn't finish the entire termination without state
history
being closed.

https://github.com/ethpandaops/fusaka-devnets/pull/63/files
2025-09-09 14:39:54 +02:00
VolodymyrBg
5035064421
core/rawdb: improve the test suite for ancient store (#32555)
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-09-09 15:19:50 +08:00
Forostovec
2a3f4cea13
rlp: fix typo in decode test message (#32554)
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-09-09 09:56:53 +08:00