internal: remove eth_{compile,getWork,submitWork} from console#31856
Merged
Conversation
jwasinger
approved these changes
May 19, 2025
rjl493456442
added a commit
that referenced
this pull request
Jul 1, 2025
Similar to #31856, remove the not availabe shh, swarm modules in the console. --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com>
howjmay
pushed a commit
to iotaledger/go-ethereum
that referenced
this pull request
Aug 27, 2025
…eum#31856) The `compile` and `eth_getWork` `eth_submitWork` apis were not available anymore, so try to remove them
howjmay
pushed a commit
to iotaledger/go-ethereum
that referenced
this pull request
Aug 27, 2025
…32073) Similar to ethereum#31856, remove the not availabe shh, swarm modules in the console. --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com>
gzliudan
pushed a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 1, 2025
…2073 Similar to ethereum#31856, remove the not availabe shh, swarm modules in the console. --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com>
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Sep 1, 2025
Merged
19 tasks
gzliudan
added a commit
to XinFinOrg/XDPoSChain
that referenced
this pull request
Sep 3, 2025
…2073 (#1407) Similar to ethereum#31856, remove the not availabe shh, swarm modules in the console. --------- Co-authored-by: Zhou <DanialZhouMAX@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com>
gzliudan
added a commit
to XinFinOrg/XDPoSChain
that referenced
this pull request
Sep 3, 2025
gballet
pushed a commit
to gballet/go-ethereum
that referenced
this pull request
Sep 11, 2025
…eum#31856) The `compile` and `eth_getWork` `eth_submitWork` apis were not available anymore, so try to remove them
gballet
pushed a commit
to gballet/go-ethereum
that referenced
this pull request
Sep 11, 2025
…32073) Similar to ethereum#31856, remove the not availabe shh, swarm modules in the console. --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com>
pratikspatil024
added a commit
to 0xPolygon/bor
that referenced
this pull request
Oct 29, 2025
* version: begin v1.15.12 release cycle
* go.mod: update pebble to v1.1.5 to reduce clutter in go.sum (#31541)
```
go get github.com/cockroachdb/pebble@v1.1.5
go mod tidy
```
Co-authored-by: lightclient <lightclient@protonmail.com>
* cmd/utils: don't allow network ID override if a preset network is specified (#31630)
* beacon/blsync: fix requests encoding in engine_newPayloadV4 (#31775)
This fixes an issue where blocks containing CL requests triggered an
error in the engine API. The encoding of requests used base64 instead of
hex.
* p2p: add metrics for inbound connection errors (#31652)
Add metics detailing reasons we reject inbound connections for, and
reasons these connections fail during the handshake.
* internal/web3ext: remove the legacy backtraceAt method (#31783)
The function `BacktraceAt` has been removed in #28187 . But the API
end-point `debug_backtraceAt` is not removed from the file
`internal/web3ext/web3ext.go`.
* core, ethdb: introduce database sync function (#31703)
This pull request introduces a SyncKeyValue function to the
ethdb.KeyValueStore
interface, providing the ability to forcibly flush all previous writes
to disk.
This functionality is critical for go-ethereum, which internally uses
two independent
database engines: a key-value store (such as Pebble, LevelDB, or
memoryDB for
testing) and a flat-file–based freezer. To ensure write-order
consistency between
these engines, the key-value store must be explicitly synced before
writing to the
freezer and vice versa.
Fixes
- https://github.com/ethereum/go-ethereum/issues/31405
- https://github.com/ethereum/go-ethereum/issues/29819
* cmd/geth, internal: fix flaky console tests (#31784)
This pull request bumps the timeout for flaky console tests on appveyor.
* core/types: delete unused test variable (#31776)
Delete the unused `Account.PrivateKey` variable.
* core, triedb/pathdb: bail out error if write state history fails (#31781)
This PR fixes an issue that could lead to data corruption.
Writing the state history may fail due to insufficient disk space or
other potential errors. With this change, the entire state insertion
will be aborted instead of silently ignoring the error.
Without this fix, state transitions would continue while the associated
state history is lost. After a restart, the resulting gap would be detected,
making recovery impossible.
* core: implement in-block prefetcher (#31557)
This pull request enhances the block prefetcher by executing transactions
in parallel to warm the cache alongside the main block processor.
Unlike the original prefetcher, which only executes the next block and
is limited to chain syncing, the new implementation can be applied to any
block. This makes it useful not only during chain sync but also for regular
block insertion after the initial sync.
---------
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* all: create global hasher pool (#31769)
This PR creates a global hasher pool that can be used by all packages.
It also removes a bunch of the package local pools.
It also updates a few locations to use available hashers or the global
hashing pool to reduce allocations all over the codebase.
This change should reduce global allocation count by ~1%
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core/types: reduce allocations in tx.EffectiveGasTip (#31598)
This PR introduces an allocation-free version of the
Transaction.EffectiveGasTip method to improve performance by reducing
memory allocations.
## Changes
- Added a new `EffectiveGasTipInto` method that accepts a destination
parameter to avoid memory allocations
- Refactored the existing `EffectiveGasTip` method to use the new
allocation-free implementation
- Updated related methods (`EffectiveGasTipValue`, `EffectiveGasTipCmp`,
`EffectiveGasTipIntCmp`) to use the allocation-free approach
- Added tests and benchmarks to verify correctness and measure
performance improvements
## Motivation
In high-transaction-volume environments, the `EffectiveGasTip` method is
called frequently. Reducing memory allocations in this method decreases
garbage collection pressure and improves overall system performance.
## Benchmark Results
As-Is
BenchmarkEffectiveGasTip/Original-10 42089140 27.45 ns/op 8 B/op 1
allocs/op
To-Be
BenchmarkEffectiveGasTip/IntoMethod-10 72353263 16.73 ns/op 0 B/op 0
allocs/op
## Summary of Improvements
- **Performance**: ~39% faster execution (27.45 ns/op → 16.73 ns/op)
- **Memory**: Eliminated all allocations (8 B/op → 0 B/op)
- **Allocation count**: Reduced from 1 to 0 allocations per operation
This optimization follows the same pattern successfully applied to other
methods in the codebase, maintaining API compatibility while improving
performance.
## Safety & Compatibility
This optimization has no side effects or adverse impacts because:
- It maintains functional equivalence as confirmed by comprehensive
tests
- It preserves API compatibility with existing callers
- It follows clear memory ownership patterns with the destination
parameter
- It maintains thread safety by only modifying the caller-provided
destination parameter
This optimization follows the same pattern successfully applied to other
methods in the codebase, providing better performance without
compromising stability or correctness.
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
* metrics: add chain/mgasps to track gas usage rate (#31753)
This adds a metric called `chain/mgasps`, which records how many million
gas per second are being used during block insertion.
The value is calculated as `usedGas * 1000 / elapsed`, and it's updated
in the `insertStats.report` method. Also cleaned up the log output to
reuse the same value instead of recalculating it.
Useful for monitoring block processing throughput.
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* ethdb/pebble: expose stall counter of pebble (#31782)
This pull request adds a more Pebble metrics, tracking the amount of
write stalls with specific reasons
* core/state: fix incorrect description of function behavior (#31809)
* accounts/abi/abigen: remove unnecessary test files (#31804)
fix #31793: resolve conflict markers in structs-abi.go.txt
* crypto/kzg4844: use package github.com/crate-crypto/go-eth-kzg (#31806)
I saw in https://github.com/ethereum/go-ethereum/pull/31378 introduced
github.com/crate-crypto/go-eth-kzg to calculate the kzg hash, and
github.com/crate-crypto/go-kzg-4844 was only used in the test files, so
propose to drop it with go-eth-kzg instead
* eth: fix returned blockContext for empty blocks in stateAtTransaction (#31768)
Co-authored-by: lightclient <lightclient@protonmail.com>
* core: use unix time to check fork readiness (#31800)
* eth/catalyst: refactor engine api checks (#31182)
This PR contains three refactors:
- refactor the latest fork check that we use quite extensively
- refactor the nil checks in NewPayloads
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
* cmd/utils: always record preimages in dev mode (#31821)
Fix a todo: force-enable this in --dev mode
---------
Co-authored-by: jwasinger <j-wasinger@hotmail.com>
* p2p/enode: add support for naming iterator sources (#31779)
This adds support for naming the source iterators of FairMix, like so:
mix.AddSource(enode.WithSourceName("mySource", iter))
The source that produced the latest node is returned by the new NodeSource method.
* core/state, core/vm: update stateless gas costs to follow the verkle-gen-7 testnet (#31014)
Adding values to the witness introduces a new class of issues for
computing gas: if there is not enough gas to cover adding an item to the
witness, then the item should not be added to the witness.
The problem happens when several items are added together, and that
process runs out of gas. The witness gas computation needs a way to
signal that not enough gas was provided. These values can not be
hardcoded, however, as they are context dependent, i.e. two calls to the
same function with the same parameters can give two different results.
The approach is to return both the gas that was actually consumed, and
the gas that was necessary. If the values don't match, then a witness
update OOG'd. The caller should then charge the `consumed` value
(remaining gas will be 0) and error out.
Why not return a boolean instead of the wanted value? Because when
several items are touched, we want to distinguish which item lacked gas.
---------
Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
* AUTHORS, .mailmap: update name and email attribution (#31624)
* cmd/geth, internal/era/eradl: add era1 downloader tool (#31823)
This adds a geth subcommand for downloading era1 files and placing them into
the correct location. The tool can be used even while geth is already running
on the datadir. Downloads are checked against a hard-coded list of checksums
for mainnet and sepolia.
```
./geth download-era --server $SERVER --block 333333
./geth download-era --server $SERVER --block 333333-444444
./geth download-era --server $SERVER --epoch 0-10
./geth download-era --server $SERVER --all
```
The implementation reuses the file downloader we already had for
fetching build tools. I've done some refactoring on it to make sure it
can support the new use case, and there are some changes to the build
here as well.
* build: upgrade -dlgo version to Go 1.24.3 (#31774)
New security fix: https://groups.google.com/g/golang-announce/c/UZoIkUT367A
* cmd/utils: remove deprecated LES flags (#31838)
They were not widely used in users setups.
* core, triedb/pathdb: final integration (snapshot integration pt 5) (#30661)
In this pull request, snapshot generation in pathdb has been ported from
the legacy state snapshot implementation. Additionally, when running in
path mode, legacy state snapshot data is now managed by the pathdb
based snapshot logic.
Note: Existing snapshot data will be re-generated, regardless of whether
it was previously fully constructed.
* eth/protocols/eth: implement eth/69 (#29158)
This PR implements eth/69. This protocol version drops the bloom filter
from receipts messages, reducing the amount of data needed for a sync
by ~530GB (2.3B txs * 256 byte) uncompressed. Compressed this will
be reduced to ~100GB
The new version also changes the Status message and introduces the
BlockRangeUpdate message to relay information about the available history
range.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* eth: use headers in debug.GetModifiedAccountsBy* (#31765)
Small optimization in debug_getModifiedAccountsBy* to avoid fetching block body.
* cmd/devp2p/internal/ethtest: tests for BlockRangeUpdate (#31843)
I added a test for BlockRangeUpdate in #29158 but forgot to enable it.
Here I'm adding two more tests for it. Also applied a small refactoring
to combine calls to `dial()` and `peer()` into a single function, since
these two calls are duplicated in each test.
* core: don't emit the warning of log indexing if the db was not initialized (#31845)
* trie: use common.Hash as the key in secKeyCache map (#31786)
* cmd/utils: remove duplicate code for influxDB tags (#31854)
remove duplicate code
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
* internal: remove eth_{compile,getWork,submitWork} from console (#31856)
The `compile` and `eth_getWork` `eth_submitWork` apis were not available
anymore, so try to remove them
* internal/reexec: fix broken link to Docker/Moby in comment (#31859)
Hey team—noticed a dead link, replaced it with a working URL
https://github.com/moby/moby/blob/master/pkg/reexec/reexec.go - old link
https://github.com/moby/moby/blob/master/pkg/reexec/reexec_deprecated.go
- new link
* README: update broken JSON-RPC API documentation link (#31860)
I've updated the broken link to point to the current official Ethereum
JSON-RPC API documentation at
https://ethereum.org/en/developers/docs/apis/json-rpc/. This is the
correct and up-to-date location for the Ethereum Execution Layer APIs
documentation. The link should now work properly.
* core/txpool/legacypool: fix flaky test TestAllowedTxSize #30975 (#31836)
Some tests involving transactions near the txMaxSize limit were flaky.
This was due to ECDSA signatures occasionally having leading zeros,
which are omitted during RLP encoding — making the final transaction
size 1 byte smaller than expected.
To address this, a new helper function pricedDataTransactionWithFixedSignature
was added. It ensures both r and s are exactly 32 bytes (i.e., no leading zeros),
producing transactions with deterministic size.
* eth/tracers/native: add erc7562 tracer (#31006)
This PR introduces a new native tracer for AA bundlers. Bundlers participating in the alternative
mempool will need to validate userops. This tracer will return sufficient information for them to
decide whether griefing is possible. Resolves #30546
---------
Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
* core/state: reduce allocation in updateStateObject (#31861)
Optimize updateStateObject to reduce an allocation.
* eth/catalyst: move witness methods from engine api (#31867)
No functional changes, just moves the witness methods into its own file
* eth/tracers: Improve test coverage for toWord (#31846)
* core/txpool: add explicit max blob count limit (#31837)
Fixes #31792.
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
* build: Update EEST to v4.5.0 (#31880)
We deleted outdated pectra-devnet-6@v1.0.0 release by mistake, so this
PR updates the referenced EEST release to the correct latest version.
@s1na I removed the TODO comment because I think this solves it, unless
it meant something else.
---------
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
* internal/era: update link to documentation (#31879)
Updated reference URL in accumulator.go comment to point to the correct
location of the historical-hashes-accumulator documentation in the
Ethereum portal network specs
* crypto: use pure Go signature implementation in tinygo (#31878)
tinygo is having problems compiling the C implementation
* consensus: remove clique RPC APIs (#31875)
* .gitea: add initial workflow file (#31885)
* .gitea: update release build actions (#31886)
Trying to make the docker build work.
* core/state: fix copy of storageChange (#31874)
Missing field origvalue when copying storageChange.
* .gitea: add cron build script (#31890)
Also swaps the push build scripts and adds environment output.
* internal/build: add support for Github Actions CI environment (#31891)
This adds support for the Github actions environment in the build tool.
Information from environment variables, like the build number and
branch/tag name, is used to make decisions about uploads and package
filenames.
* core: remove unused queued import status (#31870)
* core/vm: fix bls benchmark (#31896)
Fixes #31893
* triedb/pathdb: introduce lookup structure to optimize state access (#30971)
This pull request introduces a mechanism to improve state lookup
efficiency in pathdb by maintaining a lookup structure that eliminates
unnecessary iteration over diff layers.
The core idea is to track a mutation history for each dirty state entry
residing in the diff layers. This history records the state roots of all layers
in which the entry was modified, sorted from oldest to newest.
During state lookup, this mutation history is queried to find the most
recent layer whose state root either matches the target root or is a
descendant of it. This allows us to quickly identify the layer containing
the relevant data, avoiding the need to iterate through all diff layers from
top to bottom.
Besides, the overhead for state lookup is constant, no matter how many
diff layers are retained in the pathdb, which unlocks the potential to hold
more diff layers.
Of course, maintaining this lookup structure introduces some overhead.
For each state transition, we need to:
(a) update the mutation records for the modified state entries, and
(b) remove stale mutation records associated with outdated layers.
On our benchmark machine, it will introduce around 1ms overhead which is
acceptable.
* .gitea: adjust cron schedule (#31915)
This should make the scheduled build actually run.
* .gitea: add env to scheduled builds (#31918)
* .gitea: port more builds from travis and fix PPA env (#31919)
* .gitea: fix secrets passing (#31920)
* .gitea: fix apt update (#31921)
* .gitea: fix archive uploads and run PPA upload on release push (#31922)
* .gitea: fix arm64 build (#31923)
* .gitea: run release build on tag push (#31924)
* cmd/geth, cmd/utils: log prefunded account/key in ephemeral development mode (#31898)
This PR modifies the disclaimer/banner that is printed when starting up
Geth in dev mode:
* if the client is spun up in ephemeral dev mode with a keystore
override, the address of the first (prefunded) account is printed.
* if the client is spun up in ephemeral mode without a keystore
override, the genesis allocation contains a single static prefunded EOA
account. It's address and private key are logged.
* the banner is printed at the end of client initialization to make it
more prominent. Previously, it was logged towards the beginning of
client initialization and subsequent logging from startup filled the
terminal, pushing it out of view of the user.
Other change is that we now use a static prefunded dev account instead
of generating a random one when instantiating a new dev mode chain.
This is an example of what the banner looks like:
```
WARN [05-28|23:05:16.475] You are running Geth in --dev mode. Please note the following:
WARN [05-28|23:05:16.475]
WARN [05-28|23:05:16.475] 1. This mode is only intended for fast, iterative development without assumptions on
WARN [05-28|23:05:16.475] security or persistence.
WARN [05-28|23:05:16.475] 2. The database is created in memory unless specified otherwise. Therefore, shutting down
WARN [05-28|23:05:16.475] your computer or losing power will wipe your entire block data and chain state for
WARN [05-28|23:05:16.475] your dev environment.
WARN [05-28|23:05:16.475] 3. A random, pre-allocated developer account will be available and unlocked as
WARN [05-28|23:05:16.475] eth.coinbase, which can be used for testing. The random dev account is temporary,
WARN [05-28|23:05:16.475] stored on a ramdisk, and will be lost if your machine is restarted.
WARN [05-28|23:05:16.475] 4. Mining is enabled by default. However, the client will only seal blocks if transactions
WARN [05-28|23:05:16.475] are pending in the mempool. The miner's minimum accepted gas price is 1.
WARN [05-28|23:05:16.475] 5. Networking is disabled; there is no listen-address, the maximum number of peers is set
WARN [05-28|23:05:16.475] to 0, and discovery is disabled.
WARN [05-28|23:05:16.475]
WARN [05-28|23:05:16.475]
WARN [05-28|23:05:16.475] Running in ephemeral mode. The following account has been prefunded in the genesis:
WARN [05-28|23:05:16.475]
WARN [05-28|23:05:16.475] Account
WARN [05-28|23:05:16.475] ------------------
WARN [05-28|23:05:16.475] 0x71562b71999873db5b286df957af199ec94617f7 (10^49 ETH)
WARN [05-28|23:05:16.475]
WARN [05-28|23:05:16.475] Private Key
WARN [05-28|23:05:16.475] ------------------
WARN [05-28|23:05:16.475] 0xb71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291
WARN [05-28|23:05:16.475]
```
closes #31796
---------
Co-authored-by: jwasinger <j-wasinger@hotmail.com>
* .travis.yml: remove master branch push builds (#31927)
Release artefact building has been migrated to another system (Gitea),
so we can finally stop using Travis CI. However, in order to have a
fail-safe for the release, I'm leaving the config in and it will still
trigger builds on Travis for tagged releases. That way, if our new
system fails to work for the next release, we will still have the option
of using Travis.
* go.mod: bump flock package version (#31909)
The newer version has a stub implementation for unsupported targets,
which allows us to compile to more exotic targets.
* .gitea: modify scheduled workflow times (#31946)
* eth: return null for not-found in BlockByNumberOrHash (#31949)
This changes the API backend to return null for not-found blocks. This behavior
is required by the RPC When `BlockByNumberOrHash` always returned an error
for this case ever since being added in https://github.com/ethereum/go-ethereum/pull/19491.
The backend method has a couple of call sites, and all of them handle a `nil`
block result because `BlockByNumber` returns `nil` for not-found.
The only case where this makes a real difference is for `eth_getBlockReceipts`,
which was changed in #31361 to actually forward the error from `BlockByNumberOrHash`
to the caller.
* core/rawdb: integrate eradb backend for RPC (#31604)
This implements a backing store for chain history based on era1 files.
The new store is integrated with the freezer. Queries for blocks and receipts
below the current freezer tail are handled by the era store.
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
* core/filtermaps: remove filter base row cache, add group read (#31852)
This PR changes the database access of the base part of filter rows that
are stored in groups of 32 adjacent maps for improved database storage
size and data access efficiency.
Before this grouped storage was introduced, filter rows were not cached
because the access pattern of either the index rendering or the search
does not really benefit from caching. Also no mutex was necessary for
filter row access. Storing adjacent rows in groups complicated the
situation as a search typically required reading all or most of adjacent
rows of a group, so in order to implement the single row read operation
without having to read the entire group up to 32 times, a cache for the
base row groups was added. This also introduced data race issues for
concurrenct read/write in the same group which was avoided by locking
the `indexLock` mutex. Unfortunately this also led to slowed down or
temporarily blocked search operations when indexing was in progress.
This PR returns to the original concept of uncached, no-mutex filter map
access by increasing read efficiency in a better way; similiarly to
write operations that already operate on groups of filter maps, now
`getFilterMapRow` is also replaced by `getFilterMapRows` that accepts a
single `rowIndex` and a list of `mapIndices`. It slightly complicates
`singleMatcherInstance.getMatchesForLayer` which now has to collect
groups of map indices accessed in the same row, but in exchange it
guarantees maximum read efficiency while avoiding read/write mutex
interference.
Note: a follow-up refactoring is WIP that further changes the database
access scheme by prodiving an immutable index view to the matcher, makes
the whole indexer more straightforward with no callbacks, and entirely
removes the concept of matcher syncing with `validBlocks` and the
resulting multiple retry logic in `eth/filters/filter.go`. This might
take a bit longer to finish though and in the meantime this change could
hopefully already solve the blocked request issues.
* eth/catalyst: change warning to error for 'too many bad block attempts' (#31940)
This situation was failing quietly for me recently when I had a partial
data corruption issue. Changing the log level to Error would increase
visibility for me.
* eth/filters: fix pruned history error for genesis block (#31941)
Fixes an issue where querying logs for block ranges starting from 0 would fail with an irrelevant
error on a pruned node. Now the correct "history is pruned" error will be returned.
* metrics: disable CPU metrics on tinygo (#31953)
* eth/catalyst: use atomics instead of locks (#31955)
* accounts/abi: error when packing negative values in unsigned types (#31790)
This is an alternative approach to
https://github.com/ethereum/go-ethereum/pull/31607 , that doesn't break
backwards-compatibility with abigen.
Note that this does change the behavior of `Argument.Pack`: previously,
packing negative values for a `uint` parameter would cause them to be
represented in signed binary representation via two's complement. Now,
it will fail explicitly in this case.
However, I don't see a reason to support this functionality. The ABI
already explicitly supports signed integers. There's no reason that a
smart contract author would choose to store signed values in a `uint`
afaict.
---------
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
* cmd/utils: update SepoliaFlag usage (#31961)
The Sepolia testnet has transitioned to pos following The Merge.
* eth/downloader: fix missing receipt (#31952)
This fixes a regression introduced by #29158 where receipts of empty blocks
were stored into the database as an empty byte array, instead of an RLP empty list.
Fixes #31938
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* core/vm: implement EIP 7823 - Set upper bounds for MODEXP (#31818)
* crypto/kzg4844: avoid copying blobs for marshaling (#31911)
LLVM is not able to handle large arrays on stack
* eth, p2p: improve dial speed by pre-fetching dial candidates (#31944)
This PR improves the speed of Disc/v4 and Disc/v5 based discovery by
adding a prefetch buffer to discovery sources, eliminating slowdowns
due to timeouts and rate mismatch between the two processes.
Since we now want to filter the discv4 nodes iterator, it is being removed
from the default discovery mix in p2p.Server. To keep backwards-compatibility,
the default unfiltered discovery iterator will be utilized by the server when
no protocol-specific discovery is configured.
---------
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
* cmd/geth: fix era1 download location to match store (#31951)
This changes the era1 downloader to place the files into the correct
location where geth will actually use them. Also adds integration with
the new --datadir.era flag.
* core/vm: implement EIP 7883 - ModExp Gas Cost Increase (#31606)
https://eips.ethereum.org/EIPS/eip-7883
---------
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
* eth/catalyst: implement getBlobsV2 (#31791)
Implements `engine_getBlobsV2` which is needed for PeerDAS.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* ethdb/pebble: adjust the number of memory tables (#31970)
This pull request adjusts the number of allowed memory tables in Pebble.
Pebble allows configuring an arbitrary number of memory tables to hold
unflushed data. When the current memtable becomes full, it is scheduled
for flushing, and a new memtable is allocated to accept subsequent
writes. However, if too many memtables accumulate and are waiting to be
flushed, subsequent writes will stall.
Originally, only two memtables were configured, each with a size of 512
MB for Ethereum mainnet. While this setup works well under normal
conditions, it becomes problematic under heavy write loads. In such scenarios,
flushing is only triggered when more than 512 MB of data is pending, which may
not be responsive enough. Even worse, if compactions are running
concurrently, flushing memtables can become slow due to the heavy IO
overhead, leading to write stalls across the system.
This pull request tries to mitigate the performance degradation by having
more memory tables but with a smaller size. In this case, the pending
writes can be flushed more smoothly and responsively.
* eth: initialize blobTxPool (#31992)
Fixes a regression introduced in #31791, see
https://github.com/ethereum/go-ethereum/pull/31791#issuecomment-2955554641
* cmd/workload: introduce transaction-trace test (#31288)
This pull request introduces a new test suite in workload framework, for
transaction tracing.
**test generation**
`go run . tracegen --trace-tests trace-test.json http://host:8545`
and you can choose to store the trace result in a specific folder
`go run . tracegen --trace-tests trace-test.json --trace-output
./trace-result http://host:8545`
**test run**
`./workload test -run Trace/Transaction --trace-invalid ./trace-invalid
http://host:8545`
The mismatched trace result will be saved in the specific folder for
further investigation.
* params: enable osaka fork in MergedTestChainConfig (#31993)
* eth/filters: add timestamp to derived logs (#31887)
The block timestamp field is now added to the logs returned
by eth_getLogs.
* core/vm, cmd/evm: remove EOF (#32000)
With EOF removed from the Osaka fork, and no longer being tested, the
implementation will now just be bitrotting. I'm opting to remove it so
it doesn't get in the way of other changes.
* crypto/kzg4844: remove kzg initialization (#32017)
This fixes a regression in the state tests where we always initialized
the KZG library. This was added to test some stuff in #31791
* metrics: add chain/gas for cumulative gas usage (#32004)
This is a followup to #31753.
A cumulative counter is more useful when we need to measure / aggregate
the metric over a longer period of time. It also means we won't miss data,
e.g. our prometheus scrapes every 30 seconds, and so may miss a transient
spike in the pre-aggregated mgas/s.
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* trie: no need to store preimage if not enabled (#32012)
As the preimage will only be stored if `t.preimages != nil`, so no need
to save them into local cache if not enabled. This will reduce the memory
wasted to copy the bytes
---------
Signed-off-by: jsvisa <delweng@gmail.com>
* metrics: remove use of reflect in metrics registration code (#31962)
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* core/vm: implement updates to modexp gas cost changes in EIP-7883 (#32015)
Implements the updated gas cost changes introduced in
https://github.com/ethereum/EIPs/commit/5cdd75157d78522bde8dc58977717c14cd7f2789
* Makefile: add make evm (#32029)
* eth/tracers: flag for empty acounts in prestateTracer (#31855)
This PR introduces a flag that enables returning of newly created state
objects in the prestateTracer.
**Rationale**
Having this information is useful because local execution can more
easily distinguish between newly created objects and system contracts.
---------
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* crypto/bn256: default to gnark (#32024)
* go.mod: update gnark-crypto to v0.18.0 (#32034)
mainly to pull in https://github.com/Consensys/gnark-crypto/pull/693
* tracers/prestate: always remove empty accounts from pre-state (#31427)
The prestateTracer had the intention of excluding accounts that were
empty prior to execution from the prestate. This was being done only for
created contracts. This PR makes it so all such empty accounts are
excluded. This behavior is configurable using the `includeEmpty: true`
flag introduced in #31855.
---------
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* node: fix data race on httpConfig.prefix (#32047)
This fixes a data race when accessing the `httpConfig.prefix` field.
This field can be modified while the server is running through
`enableRPC`. The fix is storing the prefix in the handler, which is
accessed through the atomic pointer.
alternative to #32035
fixes https://github.com/ethereum/go-ethereum/issues/32019
* Revert "crypto/bn256: default to gnark (#32024)"
This reverts commit e0cf89ecfaa29b40dc548eec16e071242b40eedd.
* fix: skip storage entries with missing preimage keys (#32051)
When `GetKey` is called, a missing preimage can cause the function to return a `nil`
key. This, in turn, makes `account.Storage` persist an incorrect value.
* ethdb/pebble: lower the compaction debt (#31988)
This pull request reduces the threshold for triggering compaction at
level0, leading to less compaction debt. This change is helpful in the
case of heavy write-load, mitigating the case of heavy write stalls
caused by compaction.
closes https://github.com/ethereum/go-ethereum/issues/31830
* accounts: fix data race when closing manager (#31982)
Fixes a data race on the `wallets` slice when closing account Manager.
At the moment, there is a data race between a go-routine calling the
Manager's `Close` function and the background go-routine handling most
operations on the `Manager`. The `Manager`'s `wallets` field is accessed
without proper synchronization.
By moving the closing of wallets from the `Close()` function into the
background thread, this issue can be resolved.
* go.mod: bump golang.org/x/net from 0.36.0 to 0.38.0 (#31658)
* crypto/bn256: fix gnark deserialisation (#32055)
fixes the gnark deserialisation
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* tests/fuzzers: added bn marshaling fuzzers (#32053)
Adds marshaling fuzzing for G1 and G2 to oss-fuzz.
Also aligns the behavior of the google library to that of gnark and
cloudflare, which only ever read the first 64 / 128 bytes of the input,
regardless of how long the input is
* build: upgrade -dlgo version to Go 1.24.4 (#31978)
* eth/catalyst: fetch header on forkchoiceUpdated (#31928)
closes https://github.com/ethereum/go-ethereum/issues/31254
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* all: reuse the global hash buffer (#31839)
As https://github.com/ethereum/go-ethereum/pull/31769 defined a global
hash pool, so we can reuse it, and also remove the unnecessary
KeccakState buffering
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* crypto/bn256/cloudflare: pull in upstream fix for R27 and R29 usage (#32057)
Pulls in https://github.com/cloudflare/bn256/pull/48 to remove usage of
R27 and R29 [which are reserved](https://go.dev/doc/asm#arm64).
* eth,core: terminate the downloader immediately when shutdown signal is received (#32062)
Closes https://github.com/ethereum/go-ethereum/issues/32058
* core/rawdb: don't decode the full block body in ReadTransaction (#32027)
Reading a single transaction out of a block shouldn't need decoding the
entire body
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core: simplify effectiveTip calculation (#31771)
Since we have the effective gas price in the message, we can compute tip by
simply subtracting the basefee. No need to recompute the effective price.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* core: consolidate BlockChain constructor options (#31925)
In this pull request, the original `CacheConfig` has been renamed to `BlockChainConfig`.
Over time, more fields have been added to `CacheConfig` to support
blockchain configuration. Such as `ChainHistoryMode`, which clearly extends
beyond just caching concerns.
Additionally, adding new parameters to the blockchain constructor has
become increasingly complicated, since it’s initialized across multiple
places in the codebase. A natural solution is to consolidate these arguments
into a dedicated configuration struct.
As a result, the existing `CacheConfig` has been redefined as `BlockChainConfig`.
Some parameters, such as `VmConfig`, `TxLookupLimit`, and `ChainOverrides`
have been moved into `BlockChainConfig`. Besides, a few fields in `BlockChainConfig`
were renamed, specifically:
- `TrieCleanNoPrefetch` -> `NoPrefetch`
- `TrieDirtyDisabled` -> `ArchiveMode`
Notably, this change won't affect the command line flags or the toml
configuration file. It's just an internal refactoring and fully backward-compatible.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* .gitea: touch cron workflow files
* trie: delete secKeyCacheOwner (#31785)
The optimization tried to defer allocating the cache map until it was used for the
first time. It's a relic from earlier times, when tries were copied often. This seems
unnecessary now, so we can just create the map when the trie is created.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* .gitea: show environment in release-ppa.yml
* crypto/bn256/gnark: align marshaling behavior (#32065)
Aligns the marshaling behavior of gnark to google and cloudflare
Co-authored-by: kevaundray <kevtheappdev@gmail.com>
* crypto/bn256: add documentation on subgroup checks for G2 (#32066)
This PR improves the IsOnCurve methods for BN254 G2 points by:
* Clarifying its behavior the docstring, making it explicit that it
verifies both the point being on the curve and in the correct subgroup.
* Adding an in-line comment explaining the subgroup membership check
(c.Mul(Order)).
* Minor wording adjustments for readability and consistency.
* ethdb: Implement DeleteRange in batch (#31947)
implement #31945
---------
Co-authored-by: prpeh <prpeh@proton.me>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core/state: expose the state reader stats (#31998)
This pull request introduces a mechanism to expose statistics from the
state reader, specifically related to cache utilization during state prefetching.
To improve state access performance, a pair of state readers is constructed
with a shared local cache. One reader to execute transactions ahead of time
to warm up the cache. The other reader is used by the actual chain processing
logic, which can benefit from the prefetched states.
This PR adds visibility into how effective the cache is by exposing relevant
usage statistics.
---------
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com>
* core/state: improve the prefetcher concurrency allowance (#32071)
Improve the prefetcher concurrency allowance.
* core/state: fix prefetch on single core CPU (#32075)
We need at least one prefetch goroutine. SetLimit(0) would block
prefetch.
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
* triedb/pathdb, eth: use double-buffer mechanism in pathdb (#30464)
Previously, PathDB used a single buffer to aggregate database writes,
which needed to be flushed atomically. However, flushing large amounts
of data (e.g., 256MB) caused significant overhead, often blocking the
system for around 3 seconds during the flush.
To mitigate this overhead and reduce performance spikes, a double-buffer
mechanism is introduced. When the active buffer fills up, it is marked
as frozen and a background flushing process is triggered. Meanwhile, a
new buffer is allocated for incoming writes, allowing operations to
continue uninterrupted.
This approach reduces system blocking times and provides flexibility in
adjusting buffer parameters for improved performance.
* eth: quick canceling block inserting when debug_setHead is invoked (#32067)
If Geth is engaged in a long-run block synchronization, such as a full
syncing over a large number of blocks, invoking `debug_setHead` will
cause `downloader.Cancel` to wait for all fetchers to stop first.
This can be time-consuming, particularly for the block processing
thread.
To address this, we manually call `blockchain.StopInsert` to interrupt
the blocking processing thread and allow it to exit immediately, and
after that call `blockchain.ResumeInsert` to resume the block
downloading process.
Additionally, we add a sanity check for the input block number of
`debug_setHead` to ensure its validity.
---------
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* cmd/clef: update readme (#32070)
Replaced the outdated and broken link to the Web3 Secret Storage
Definition with the current official URL from ethereum.org in the Clef
README. This ensures users have access to up-to-date and accurate
documentation for the keystore file format.
* eth/tracers: prestate lookup EIP7702 delegation account (#32080)
Implement https://github.com/ethereum/go-ethereum/issues/32078
Parse and lookup the delegation account if EIP7702 is enabled.
---------
Signed-off-by: jsvisa <delweng@gmail.com>
* cmd/geth: era-download logic fix (#32081)
Downloading from a range was failing because it would return and error
early with an error misinterpreting "start-end".
---------
Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* miner: default gaslimit 45M (#32087)
We believe it is safe to raise the gaslimit to 45M before the Fusaka
fork. So this PR changes the default to 45M.
* core/rawdb, triedb/pathdb: implement history indexer (#31156)
This pull request is part-1 for shipping the core part of archive node
in PBSS mode.
* cmd/geth, triedb: add pathdb state verification (#32086)
This pull request ports the snapshot iteration logic from the legacy
implementation.
* core, consensus/beacon: defer trie resolution (#31725)
Previously, the account trie for a given state root was resolved immediately
when the stateDB was created, implying that the trie was always required
by the stateDB.
However, this assumption no longer holds, especially for path archive nodes,
where historical states can be accessed even if the corresponding trie data
does not exist.
* cmd/utils: fix formatting for beacon flag errors to fit Fatalf form (#32090)
Noticed that the errors for the blsync flags were not formatted
correctly for `Fatalf(..)`.
* eth, triedb/pathdb: permit write buffer allowance in PBSS archive mode (#32091)
This pull request fixes a flaw in PBSS archive mode that significantly
degrades performance when the mode is enabled.
Originally, in hash mode, the dirty trie cache is completely disabled
when archive mode is active, in order to disable the in-memory garbage
collection mechanism. However, the internal logic in path mode differs
significantly, and the dirty trie node cache is essential for maintaining
chain insertion performance. Therefore, the cache is now retained in
path mode.
* core, eth, triedb: serve historical states over RPC (#31161)
This is the part-2 for archive node over path mode, which ultimately
ships the functionality to serve the historical states
* triedb/pathdb: fix journal resolution in pathdb (#32097)
This pull request fixes a flaw in the PBSS state iterator, which
could return empty account or storage data.
In PBSS, multiple in-memory diff layers and a write buffer are
maintained. These layers are persisted to the database and reloaded after
node restarts. However, since the state data is encoded using RLP, the
distinction between nil and an empty byte slice is lost during the encode/decode
process. As a result, invalid state values such as `[]byte{}` can appear in PBSS
and ultimately be returned by the state iterator.
Checkout
https://github.com/ethereum/go-ethereum/blob/master/triedb/pathdb/iterator_fast.go#L270
for more iterator details.
It's a long-term existent issue and now be activated since the snapshot
integration.
The error `err="range contains deletion"` will occur when Geth tries to
serve other
peers with SNAP protocol request.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* all: incorporate state history indexing status into eth_syncing response (#32099)
This pull request tracks the state indexing progress in eth_syncing
RPC response, i.e. we will return non-null syncing status until indexing
has finished.
* version: release go-ethereum v1.16.0 stable
* version: begin v1.16.1 release cycle
* .gitea: trigger PPA upload on tag
* .travis.yml: remove travis configuration
* all: replace override.prague with osaka (#32093)
replace `--override.prague` with `--override.osaka`
Signed-off-by: jsvisa <delweng@gmail.com>
* node: do not double-wrap KV stores (#32089)
For no apparent reason, KV stores were getting wrapped in `nofreezedb`
first and then in `freezerdb`.
* eth: correct tracer initialization in BlockchainConfig (#32107)
core.BlockChainConfig.VmConfig is not a pointer, so setting the Tracer
on the `vmConfig` object after it was passed to options does *not* apply
it to options.VmConfig
This fixes the issue by setting the value directly inside the `options`
object and removing the confusing `vmConfig` variable to prevent further
mistakes.
* .gitea: switch release builds to static linking (#32118)
This is to avoid compatibility issues with mismatched glibc versions
between the builder and deployment target.
Fixes #32102
* .gitea: fix 386 upload
* .gitea: disable cron schedule
* triedb: reset state indexer after snap synced (#32104)
Fix the issue after initial snap sync with `gcmode=archive` enabled.
```
NewPayload: inserting block failed error="history indexing is out of order, last: null, requested: 1"
```
---------
Signed-off-by: Delweng <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* eth/filters: add address limit to filters (#31876)
The address filter was never checked against a maximum limit, which can
be somewhat abusive for API nodes. This PR adds a limit similar to
topics
## Description (AI generated)
This pull request introduces a new validation to enforce a maximum limit
on the number of addresses allowed in filter criteria for Ethereum logs.
It includes updates to the `FilterAPI` and `EventSystem` logic, as well
as corresponding test cases to ensure the new constraint is properly
enforced.
### Core functionality changes:
* **Validation for maximum addresses in filter criteria**:
- Added a new constant, `maxAddresses`, set to 100, to define the
maximum allowable addresses in a filter.
- Introduced a new error, `errExceedMaxAddresses`, to handle cases where
the number of addresses exceeds the limit.
- Updated the `GetLogs` method in `FilterAPI` to validate the number of
addresses against `maxAddresses`.
- Modified the `UnmarshalJSON` method to return an error if the number
of addresses in the input JSON exceeds `maxAddresses`.
- Added similar validation to the `SubscribeLogs` method in
`EventSystem`.
### Test updates:
* **New test cases for address limit validation**:
- Added a test in `TestUnmarshalJSONNewFilterArgs` to verify that
exceeding the maximum number of addresses triggers the
`errExceedMaxAddresses` error.
- Updated `TestInvalidLogFilterCreation` to include a test case for an
invalid filter with more than `maxAddresses` addresses.
- Updated `TestInvalidGetLogsRequest` to test for invalid log requests
with excessive addresses.
These changes ensure that the system enforces a reasonable limit on the
number of addresses in filter criteria, improving robustness and
preventing potential performance issues.
---------
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* Fix log indexer noise after debug_setHead operations (#31934)
## Summary
This PR resolves Issue #31929 by reducing log noise generated by the log
indexer after `debug_setHead` operations.
## Problem Description
When `debug_setHead` is called to rewind the blockchain, blocks are
removed from the database. However, the log indexer's `ChainView`
objects may still hold references to these deleted blocks. When
`extendNonCanonical()` attempts to access these missing headers, it
results in:
1. **Repeated ERROR logs**: `Header not found number=X hash=0x...`
2. **Log noise** that can mask other important errors
3. **User confusion** about whether this indicates a real problem
## Root Cause Analysis
The issue occurs because:
- `debug_setHead` removes blocks from the blockchain database
- Log indexer's `ChainView` may still reference deleted block hashes
- `extendNonCanonical()` in `core/filtermaps/chain_view.go` tries to
fetch these missing headers
- The existing `return false` logic properly handles the error, but logs
at ERROR level
## Solution
This is a **logging improvement only** - no functional logic changes:
### Changes Made
1. **Log level**: Changed from `ERROR` to `DEBUG`
2. **Log message**: Enhanced with descriptive context about chain view
extension
3. **Comments**: Added explanation for when this situation occurs
4. **Behavior**: Maintains existing error handling (`return false` was
already present)
### Code Changes
```go
// Before
log.Error("Header not found", "number", number, "hash", hash)
return false
// After
// Header not found - this can happen after debug_setHead operations
// where blocks have been deleted. Return false to indicate the chain view
// is no longer valid rather than logging repeated errors.
log.Debug("Header not found during chain view extension", "number", number, "hash", hash)
return false
```
## Testing
### Automated Tests
- ✅ All existing filtermaps tests pass: `go test ./core/filtermaps -v`
- ✅ No regressions in related functionality
### Manual Verification
1. **Before fix**: Started geth in dev mode, generated blocks, called
`debug_setHead(3)` → **5 repeated ERROR logs**
2. **After fix**: Same scenario → **4 DEBUG logs, no ERROR noise**
### Test Environment
```bash
# Setup test environment
rm -rf ./dev-test-data
./build/bin/geth --dev --datadir ./dev-test-data --http --http.api debug,eth,net,web3 --verbosity 4
# Generate test blocks and trigger issue
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_setHead","params":["0x3"],"id":1}' http://localhost:8545
```
## Related Issues
- Fixes #31929
## Additional Context
This issue was reported as spurious error messages appearing after
`debug_setHead` operations. The investigation revealed that while the
error handling was functionally correct, the ERROR log level was
inappropriate for this expected scenario in development/debugging
workflows.
The fix maintains full compatibility while significantly improving the
debugging experience for developers using `debug_setHead`.
---------
Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com>
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* core/filtermaps: clean up log format of unindexing message (#32123)
Sorry for not fully fixed in https://github.com/ethereum/go-ethereum/pull/31761, now the log
format of unindexing message is cleaned up, to make it consistent with the indexing message.
* eth/catalyst: fix the log message in newPayloadV4 (#32125)
It should be `newPayloadV4 must only be called for prague payloads` for
the V4 payload error
* internal/ethapi: prealloc map for the txpool api (#32110)
use `make(map, len(txpool))` to prealloc the map for the txpool content,
to avoid the map growing in the loop.
* ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021)
Towards https://github.com/ethereum/go-ethereum/issues/26974
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* internal: remove unused shh and swarm modules from console (#32073)
Similar to https://github.com/ethereum/go-ethereum/pull/31856, remove
the not availabe shh, swarm modules in the console.
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core/filtermaps: define APIs for map, epoch calculation (#31659)
This pull request refines the filtermap implementation, defining key
APIs for map and
epoch calculations to improve readability.
This pull request doesn't change any logic, it's a pure cleanup.
---------
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* core/types: blockTimestamp in logs is hex-encoded (#32129)
closes #32120
* core/rawdb, triedb/pathdb: fix two inaccurate comments (#32130)
* eth/catalyst: fix edge case in simulated backend (#31871)
geth cmd: `geth --dev --dev.period 5`
call: `debug.setHead` to rollback several blocks.
If the `debug.setHead` call is delayed, it will trigger a panic with a
small probability, due to using the null point of
`fcResponse.PayloadID`.
---------
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* accounts/abi: generate TryPack* methods for abigen v2 bindings (#31692)
1. Fix the error return format.
**todo**: ~~`bindtype` needs more complex logic to fix it.~~
`
if err != nil {
return nil, err
}
if err == nil {
return obj, nil
}
`
2. ~~Return pointer type object to avoid copying the whole struct
content.~~
3. Give the panic decision to the user.
4. Fix empty line at the end of function.
**TODO**: ~~fix some related test cases.~~
---------
Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
* version: release go-ethereum v1.16.1 stable
* Fix build issues
* Fix tests
* Fixed tests
* Fix CI
* core: Fix tests
* eth: Fix tests
* internal: Fix tests
* devp2p: Set LatestBlock and LatestBlockHash in test
* integration tests: Refactor NewBlockChain init
* eth/filters: Add blockTimestamp to test expected logs
* eth/filters: Update MockDatabase impl according to the new interface
* integration tests: Refactor NewBlockchain init
* eth/protocols: Update tests to support protocol 69
* tracers: Fix genesis for erc7562 tracer tests
* eth/tracers: Remove duplicated ApplyTransactionWithEVM call
* p2p: Remove remaining protocol 67 definitions
* p2p: Fix eth/69 handshake in tests
* eth/tracers: Set proper genesis for 7702/delegate test
* fix upstream merge tests (#1707)
* core: add get all receipts by hash helper
* chore: bump cosmos-sdk (#1704)
* eth/protocols/eth: include state-sync tx receipt in eth/69 response
* core: remove GetAllReceiptsByHash function
* core/rawdb: remove GetAllReceiptsByHash
* core: track cache hit/miss for bor receipts
* eth/protocols/eth: exclude state-sync in receipt root calculations
* eth/protocols/eth: club bor receipt with all tx receipts for a block
* eth/protocols/eth: exclude state-sync receipts in root hash calculation
* core: extract and save bor receipts during sync
* fix TestPrestateTracer and skip TestBroadcastMalformedBlock69
* fix TestGetModifiedAccounts
* fix lint
* feat: bump kurtosis and migrate to pos-workflows (#1706)
* remove unused lint annotation
* core: assign empty values for missing state-sync receipts
* core: write bor receipts in kv db
* core: check for empty receipts while writing in kv db
* internal, eth: disable snap sync momentarily (#1696)
* eth/core: add logs for debugging
* params: version bump to v2.2.10-beta
* disable snapsync on default eth configs
* feat: remove matic-cli e2e-tests (#1709)
* fix filter tests / temp disable TestValidatorsBlockProduction
* temp disable TestMiningAfterLocking
* core: Key-Value Priority Read on BorReceipts (#1699)
* Key Value Read Priority on BorReceipts
* simplify code
* Revert "internal, eth: disable snap sync momentarily (#1696)"
This reverts commit f3844811cda1c9c4c23f3e167f0f6a5e78742963.
* eth: syncmode default to snap
* Revert "eth: syncmode default to snap"
This reverts commit 2c735b22b27c8436f8c9b070ed44a2c63f0f83db.
* params: version bump to v2.2.10-beta2
* chore: make function comments match function names (#1650)
Signed-off-by: stellrust <gohunter@foxmail.com>
* eth/protocols: add nil check for tx before calling GetOptions (#1656)
* chore: make function comments match function names (#1658)
Signed-off-by: jishudashu <979260390@qq.com>
* core/state: use mutex for access list r/w operations
* core: catch panic in block-stm processing
* use mutex for access list r/w operations
* consistent comment for skipped tests
* params: version bump to v2.2.10
* Improving fail handling from reorgs (#1677)
* proper error handling for blockchain instantiation
* nil check on ethstats
* nil check over ourTD
* fix: dbcmd (#1714)
* return if etherbase is empty
* chore: set disableFreeze to true
---------
Signed-off-by: stellrust <gohunter@foxmail.com>
Signed-off-by: jishudashu <979260390@qq.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Krishang Shah <109511742+kamuikatsurgi@users.noreply.github.com>
Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>
Co-authored-by: Lucca Martins <lucca_martins30@yahoo.com.br>
Co-authored-by: stellrust <gohunter@foxmail.com>
Co-authored-by: Yuan-Yao Sung <sungyuanyao@gmail.com>
Co-authored-by: jishudashu <979260390@qq.com>
* BlockByNumberOrHash return error if block not found
* downloader: Change test to use protocol 69
* p2p: Add block propagation handlers for eth/69
* tests: Enable TestMiningAfterLocking
* tests: Enable TestBroadcastMalformedBlock69
* Revert "fix upstream merge tests (#1707)" (#1725)
This reverts commit 9b117f35050138fad21ad713db61b43a5476e86d.
* fix filter tests / temp disable TestValidatorsBlockProduction
* tests: Enable TestValidatorsBlockProduction
* disable snapsync on default eth configs
* remove unused lint annotation
* fix lint
* fix TestGetModifiedAccounts
* fix TestPrestateTracer and skip TestBroadcastMalformedBlock69
* Enable TestBroadcastMalformedBlock69
* Fix tests
* Fix tests
* Fix tests
* Disable snap sync tests temporarily
* Disable snap sync tests temporarily
* Prefetch witness
* Fix parallel execution
* Up depndencies
* Fix tests
* fix: TestSimulateV1 basefee-non-validation case (#1789)
* fix(eth/downloader/whitelist): decrement chain meter on failure (#1771)
* Decrement chain meter instead of peer meter
* Decrement chain meter instead of peer meter
* chore: bump kurtosis-pos (#1805)
* chore: bump kurtosis-pos
* chore: bump to 1.1.16
* core, internal/ethapi: derive cumulative gas for bor receipts (#1806)
* core/types: derive cumulative gas for bor receipt
* internal/ethapi: update testdata with non empty cumulative gas
* core/types: small fix
* core: derive cumulative gas used and persist in db for bor receipts
* Remove TODOs
* eth, core: handle state-sync data in eth/69 messages
This PR adds the ability to send state-sync transaction receipts (or bor receipts in short) in eth/69 protocol (which is newly added from upstream). This will allow nodes using snap sync to persist the state-sync transaction receipts (as there's no execution involved in snap sync and hence they're not generated locally).
This PR changes the implementation of 2 p2p messages:
- GetReceiptsMsg (code: 0x0f): Fetches bor receipts for requested blocks and include them in the final encoded message
- ReceiptsMsg (code: 0x10): Accepts the bor receipts from incoming p2p packet. They are excluded from receipt root (in header) and hence this needs to be taken care of while handling incoming receipts.
* eth: handle integer underflow for reporting total delay in block tracking
Avoid wraparound of total delay values when logging due to integer underflow. Switch to using int64 instead of uint64. The log initially assumed that current time would always be ahead of header's block time which is not true anymore (as blocks can be announced early) breaking this assumption.
* remove bloom filter from bor logs (#1811)
* Disabling mine for stateless client (#1814)
* disabling mine
* disable pip-66 integration test
* fix message
* Enable custom HTTP Modules in dev-mode (#1589)
* cli: Don't force HTTP modules in dev-mode
The HTTP modules were forced to a specific list in dev mode, thus
disabling the user's choice of active modules.
* state: Don't log prefetcher error when terminated
This is useless, it's not an actual error.
* Fix selfdestruct for parallel execution
* Added unit test for parallel evm selfdestruct
* Merge pull request #1823 from 0xPolygon/lmartins/kv-check-on-write
Backfill StateSync Command Improvements
* core: Use `TriesInMemory` from config (#1590)
* core: Use `TriesInMemory` from config
The config setting got mistakenly removed in this PR https://github.com/maticnetwork/bor/pull/1300/files
* eth/fetcher: Fix race condition in tests
The `tester.fetcher` is already started in `newTester`
* eth/fetcher: Fix race condition in test
The bool was modified in a goroutine, read in another.
* bump version
* Port mining optimizations for veblop (#1783)
* feat: disabling gogc override
* internal/cli: add GC variables in config
* core,eth,internal/cli,triedb/pathdb: add maxdifflayers to config
* consensus/bor: fix header timestamp when time is in the past
When the calculated header timestamp based on parent time and producer delay
falls in the past, ensure we add the full producer delay to the current time
rather than just setting it to current time. This prevents immediate timeout
issues in the commit interrupt mechanism where blocks would be interrupted
immediately due to negative time delays.
Previously, when header.Time < now, we would set header.Time = now, which
could still result in timing issues during block building. Now we properly
calculate header.Time = now + CalcProducerDelay() to ensure adequate time
for block building operations.
* consensus/bor,internal/cli,params: add header timestamp fix when in past
* perf(core/blockstm): optimize HasReadDep for small input sizes
Add performance optimization to HasReadDep function based on production metrics
showing ~3M calls with median size of 15. For small inputs (<=512 elements),
use direct nested loop comparison instead of map allocation to improve performance
due to better cache locality and avoiding allocation overhead.
Additionally:
- Replace map[Key]bool with map[Key]struct{} to reduce memory usage
- Add Prometheus metrics to track function calls and input sizes
- Add detailed comments explaining the optimization rationale
The cutoff of 512 was determined through benchmarking and captures >50% of
production calls, providing significant performance improvement for the
common case while maintaining O(n+m) complexity for larger inputs.
* core: add hasReadDepCallCounter and readsMapSizeHist metrics
* eth.internal/cli,triedb: fix lint
* core,eth,internal/cli,triedb/pathdb: rm maxdifflayers config
* core: add dagBuildTimer
* Revert "consensus/bor,internal/cli,params: add header timestamp fix when in past"
This reverts commit 76f6ac5afef4309ec18184cf07618fc25cefff55.
* triedb/pathdb: rm invalid comment
* internal/cli: rm unused function
---------
Co-authored-by: John Hilliard <praetoriansentry@gmail.com>
* fix txs count in segment import report (#1831)
* Remove incorrect modification to `prepare()` (#1832)
* fix receipts and logs on stateless node (#1833)
* Cutomizable block time in block producer (#1817)
* Cutomizable block time in block producer
* minor fix
* Fix test
* Refactor
* Add tests
* Stateless Pruning (#1828)
* pruning refactor and freeze disable
* block pruner
* lint
* minor fixes
* update pruner
* include witness producers on pruning
* Info logs
* improve logs
* increase block prune interval
* fix receipts and logs on stateless node
* genesis protection
* remove genesis from tests
* meaningful info logs
* fix block pruner cursor key
---------
Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Delweng <delweng@gmail.com>
Signed-off-by: stellrust <gohunter@foxmail.com>
Signed-off-by: jishudashu <979260390@qq.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Alex Zaytsev <hazzik@gmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: jwasinger <j-wasinger@hotmail.com>
Co-authored-by: Csaba Kiraly <cskiraly@users.noreply.github.com>
Co-authored-by: JukLee0ira <meebookmonkey@163.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: maskpp <maskpp266@gmail.com>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Satoshi Is Here <39875249+SatoshiIsHere@users.noreply.github.com>
Co-authored-by: Marcel <153717436+MonkeyMarcel@users.noreply.github.com>
Co-authored-by: Klimov Sergey <klmff@proton.me>
Co-authored-by: SHADOW <g1siddharthr@gmail.com>
Co-authored-by: wellna <wellnanasa@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Co-authored-by: Charlotte <69423184+tqpcharlie@users.noreply.github.com>
Co-authored-by: Marius Kjærstad <sandakersmann@users.noreply.github.com>
Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
Co-authored-by: Zhou <DanialZhouMAX@gmail.com>
Co-authored-by: James Niken <danylonepritvoreniy@gmail.com>
Co-authored-by: VolodymyrBg <aqdrgg19@gmail.com>
Co-authored-by: steven <wangpeculiar@gmail.com>
Co-authored-by: shahafn <shahaflol@gmail.com>
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: Merkel Tranjes <140164174+rnkrtt@users.noreply.github.com>
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: buddho <galaxystroller@gmail.com>
Co-authored-by: Arya Nair <aryaajitnair@gmail.com>
Co-authored-by: Felföldi Zsolt <zsfelfoldi@gmail.com>
Co-authored-by: William Morriss <wjmelements@gmail.com>
Co-authored-by: Lunor <73783151+lunargon@users.noreply.github.com>
Co-authored-by: Joe Chen <jiajuncjoe@gmail.com>
Co-authored-by: Sean Liao <sean.liao@circle.com>
Co-authored-by: shazam8253 <54690736+shazam8253@users.noreply.github.com>
Co-authored-by: Nebojsa Urosevic <nebojsa94@users.noreply.github.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: cz <wylbzc4928@gmail.com>
Co-authored-by: Herbert …
oleg-ssvlabs
added a commit
to compose-network/op-geth
that referenced
this pull request
Dec 1, 2025
* all: incorporate state history indexing status into eth_syncing response (#32099)
This pull request tracks the state indexing progress in eth_syncing
RPC response, i.e. we will return non-null syncing status until indexing
has finished.
* version: release go-ethereum v1.16.0 stable
* version: begin v1.16.1 release cycle
* .gitea: trigger PPA upload on tag
* .travis.yml: remove travis configuration
* all: replace override.prague with osaka (#32093)
replace `--override.prague` with `--override.osaka`
Signed-off-by: jsvisa <delweng@gmail.com>
* node: do not double-wrap KV stores (#32089)
For no apparent reason, KV stores were getting wrapped in `nofreezedb`
first and then in `freezerdb`.
* eth: correct tracer initialization in BlockchainConfig (#32107)
core.BlockChainConfig.VmConfig is not a pointer, so setting the Tracer
on the `vmConfig` object after it was passed to options does *not* apply
it to options.VmConfig
This fixes the issue by setting the value directly inside the `options`
object and removing the confusing `vmConfig` variable to prevent further
mistakes.
* .gitea: switch release builds to static linking (#32118)
This is to avoid compatibility issues with mismatched glibc versions
between the builder and deployment target.
Fixes #32102
* .gitea: fix 386 upload
* .gitea: disable cron schedule
* triedb: reset state indexer after snap synced (#32104)
Fix the issue after initial snap sync with `gcmode=archive` enabled.
```
NewPayload: inserting block failed error="history indexing is out of order, last: null, requested: 1"
```
---------
Signed-off-by: Delweng <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* eth/filters: add address limit to filters (#31876)
The address filter was never checked against a maximum limit, which can
be somewhat abusive for API nodes. This PR adds a limit similar to
topics
## Description (AI generated)
This pull request introduces a new validation to enforce a maximum limit
on the number of addresses allowed in filter criteria for Ethereum logs.
It includes updates to the `FilterAPI` and `EventSystem` logic, as well
as corresponding test cases to ensure the new constraint is properly
enforced.
### Core functionality changes:
* **Validation for maximum addresses in filter criteria**:
- Added a new constant, `maxAddresses`, set to 100, to define the
maximum allowable addresses in a filter.
- Introduced a new error, `errExceedMaxAddresses`, to handle cases where
the number of addresses exceeds the limit.
- Updated the `GetLogs` method in `FilterAPI` to validate the number of
addresses against `maxAddresses`.
- Modified the `UnmarshalJSON` method to return an error if the number
of addresses in the input JSON exceeds `maxAddresses`.
- Added similar validation to the `SubscribeLogs` method in
`EventSystem`.
### Test updates:
* **New test cases for address limit validation**:
- Added a test in `TestUnmarshalJSONNewFilterArgs` to verify that
exceeding the maximum number of addresses triggers the
`errExceedMaxAddresses` error.
- Updated `TestInvalidLogFilterCreation` to include a test case for an
invalid filter with more than `maxAddresses` addresses.
- Updated `TestInvalidGetLogsRequest` to test for invalid log requests
with excessive addresses.
These changes ensure that the system enforces a reasonable limit on the
number of addresses in filter criteria, improving robustness and
preventing potential performance issues.
---------
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* Fix log indexer noise after debug_setHead operations (#31934)
## Summary
This PR resolves Issue #31929 by reducing log noise generated by the log
indexer after `debug_setHead` operations.
## Problem Description
When `debug_setHead` is called to rewind the blockchain, blocks are
removed from the database. However, the log indexer's `ChainView`
objects may still hold references to these deleted blocks. When
`extendNonCanonical()` attempts to access these missing headers, it
results in:
1. **Repeated ERROR logs**: `Header not found number=X hash=0x...`
2. **Log noise** that can mask other important errors
3. **User confusion** about whether this indicates a real problem
## Root Cause Analysis
The issue occurs because:
- `debug_setHead` removes blocks from the blockchain database
- Log indexer's `ChainView` may still reference deleted block hashes
- `extendNonCanonical()` in `core/filtermaps/chain_view.go` tries to
fetch these missing headers
- The existing `return false` logic properly handles the error, but logs
at ERROR level
## Solution
This is a **logging improvement only** - no functional logic changes:
### Changes Made
1. **Log level**: Changed from `ERROR` to `DEBUG`
2. **Log message**: Enhanced with descriptive context about chain view
extension
3. **Comments**: Added explanation for when this situation occurs
4. **Behavior**: Maintains existing error handling (`return false` was
already present)
### Code Changes
```go
// Before
log.Error("Header not found", "number", number, "hash", hash)
return false
// After
// Header not found - this can happen after debug_setHead operations
// where blocks have been deleted. Return false to indicate the chain view
// is no longer valid rather than logging repeated errors.
log.Debug("Header not found during chain view extension", "number", number, "hash", hash)
return false
```
## Testing
### Automated Tests
- ✅ All existing filtermaps tests pass: `go test ./core/filtermaps -v`
- ✅ No regressions in related functionality
### Manual Verification
1. **Before fix**: Started geth in dev mode, generated blocks, called
`debug_setHead(3)` → **5 repeated ERROR logs**
2. **After fix**: Same scenario → **4 DEBUG logs, no ERROR noise**
### Test Environment
```bash
# Setup test environment
rm -rf ./dev-test-data
./build/bin/geth --dev --datadir ./dev-test-data --http --http.api debug,eth,net,web3 --verbosity 4
# Generate test blocks and trigger issue
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_setHead","params":["0x3"],"id":1}' http://localhost:8545
```
## Related Issues
- Fixes #31929
## Additional Context
This issue was reported as spurious error messages appearing after
`debug_setHead` operations. The investigation revealed that while the
error handling was functionally correct, the ERROR log level was
inappropriate for this expected scenario in development/debugging
workflows.
The fix maintains full compatibility while significantly improving the
debugging experience for developers using `debug_setHead`.
---------
Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com>
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* core/filtermaps: clean up log format of unindexing message (#32123)
Sorry for not fully fixed in https://github.com/ethereum/go-ethereum/pull/31761, now the log
format of unindexing message is cleaned up, to make it consistent with the indexing message.
* eth/catalyst: fix the log message in newPayloadV4 (#32125)
It should be `newPayloadV4 must only be called for prague payloads` for
the V4 payload error
* internal/ethapi: prealloc map for the txpool api (#32110)
use `make(map, len(txpool))` to prealloc the map for the txpool content,
to avoid the map growing in the loop.
* ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021)
Towards https://github.com/ethereum/go-ethereum/issues/26974
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* internal: remove unused shh and swarm modules from console (#32073)
Similar to https://github.com/ethereum/go-ethereum/pull/31856, remove
the not availabe shh, swarm modules in the console.
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core/filtermaps: define APIs for map, epoch calculation (#31659)
This pull request refines the filtermap implementation, defining key
APIs for map and
epoch calculations to improve readability.
This pull request doesn't change any logic, it's a pure cleanup.
---------
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* core/types: blockTimestamp in logs is hex-encoded (#32129)
closes #32120
* core/rawdb, triedb/pathdb: fix two inaccurate comments (#32130)
* eth/catalyst: fix edge case in simulated backend (#31871)
geth cmd: `geth --dev --dev.period 5`
call: `debug.setHead` to rollback several blocks.
If the `debug.setHead` call is delayed, it will trigger a panic with a
small probability, due to using the null point of
`fcResponse.PayloadID`.
---------
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* accounts/abi: generate TryPack* methods for abigen v2 bindings (#31692)
1. Fix the error return format.
**todo**: ~~`bindtype` needs more complex logic to fix it.~~
`
if err != nil {
return nil, err
}
if err == nil {
return obj, nil
}
`
2. ~~Return pointer type object to avoid copying the whole struct
content.~~
3. Give the panic decision to the user.
4. Fix empty line at the end of function.
**TODO**: ~~fix some related test cases.~~
---------
Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
* version: release go-ethereum v1.16.1 stable
* version: begin v1.16.2 release cycle
* beacon/blsync: update logs for blsync (Fixes #31968 ) (#32046)
Small update for logs when syncing with blsync. Downgrades the "latest
filled block is not available" to warn.
Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com>
* cmd/workload: rework tracegen to run tracing at block level (#32092)
This PR changes the trace test to block level, aiming for better
execution performance.
---------
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* core/state: add GetStateAndCommittedState (#31585)
Improves the SSTORE gas calculation a bit. Previously we would pull up
the state object twice. This is okay for existing objects, since they
are cached, however non-existing objects are not cached, thus we needed
to go through all 128 diff layers as well as the disk layer twice, just
for the gas calculation
```
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/vm
cpu: AMD Ryzen 9 5900X 12-Core Processor
│ /tmp/old.txt │ /tmp/new.txt │
│ sec/op │ sec/op vs base │
Interpreter-24 1118.0n ± 2% 602.8n ± 1% -46.09% (p=0.000 n=10)
```
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* cmd/utils, internal/debug: hide the deprecated flags (#32128)
Some of the flags were deprecated, so try to hide them in the help
message. And move the `--vmodule` and `--logjson` flags to the
DeprecatedCategory.
* .gitea: add windows build (experimental)
* cmd/utils: show full deprecated flags (#32141)
This is a follow up PR after #32128 , Seems I've missed to add
--txlookuplimit as hidden. In hte meanwhile, I also add the other
deprecated flags into the output of `show-deprecated-flags`
* cmd/utils: update flag description of gcmode (#32145)
* .gitea: add workflow_dispatch for release build
* .gitea: update PATH
* .gitea: set PATH
* gitea: try with cmd
* gitea: set PATH in script
* .gitea: fix typo in windows workflow
* core/vm: move nil-check out of the interpreter loop (#32068)
Moves the jumptable nil check our of the interpreter loop.
Benchmarks show a 2-10% improvement.
* core/vm: implement EIP-7939 - CLZ opcode (#31989)
https://eips.ethereum.org/EIPS/eip-7939
---------
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>
Co-authored-by: Felix Lange <fjl@twurst.com>
* core/txpool/blobpool: lower log level for warnings (#32142)
- Change the log level to `warning`, during syncing blocks, the `final
== nil` is normal.
- Change to log tx hash.
* .github, internal/flags: improve actions test runs (#32150)
This change enables more tests to run on GitHub actions. First, it
removes the `-short` flag passed to `go test`, unskipping some longer
running tests. We also enable the full consensus tests to run by
enabling submodules during git clone.
The EF now operates org wide runners with the `self-hosted-ghr` label.
These are auto-scaling runners which should ideally allow us to process
any amount of testing load we throw at them. The new runners have `HOME`
configured differently from the actual user home directory, so our
internal test for resolving `~` had to be adapted to work in this scenario.
* consensus/misc/eip4844: implement EIP-7918 (#31965)
https://eips.ethereum.org/EIPS/eip-7918
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* core/vm: implement EIP-7951 - precompile for secp256r1 (#31991)
https://github.com/ethereum/EIPs/pull/9833
Based on #27540, #30043
---------
Co-authored-by: Ulaş Erdoğan <uerdogan2001@hotmail.com>
* cmd, eth/catalyst: exit geth only if exitWhenSynced is specified (#32149)
This pull request modifies the behavior of `--synctarget` to terminate
the node only when `--exitWhenSynced` is explicitly specified.
* eth/catalyst: abort dev mode block commit if shut down is triggered (#32166)
alternate approach to https://github.com/ethereum/go-ethereum/pull/31328
suggested by @MariusVanDerWijden . This prevents Geth from outputting a
lot of logs when trying to commit on-demand dev mode blocks while the
client is shutting down.
The issue is hard to reproduce, but I've seen it myself and it is
annoying when it happens. I think this is a reasonable simple solution,
and we can revisit if we find that the output is still too large (i.e.
there is a large delay between initiating shut down and the simulated
beacon receiving the signal, while in this loop).
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* miner, core, core/txpool: implement EIP 7825 - TX Gas Limit Cap (#31824)
Implements EIP-7825
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
* core/vm: update gas cost of CLZ to five (#32172)
https://github.com/ethereum/EIPs/commit/a794de3fcf71bb8c71e8bafdba11f63133ce4516
* core,miner: implement EIP-7934 - RLP Execution Block Size Limit (#31990)
This PR adds a block validation check for the maximum block size, as required by
EIP-7934, and also applies a slightly lower size limit during block building.
---------
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* cmd/utils: add the missing check for the HoodiFlag in blsync (#32179)
Hoodi network flag should be exclusive to other network flags for both blysnc standalone and integrated mode.
* cmd/clef: update Safe API documentation links in changelog (#32136)
This PR updates the outdated documentation URL from docs.gnosis.io to
the new official docs.safe.global domain. The change reflects the
rebranding from Gnosis Safe to Safe and ensures that users are directed
to the current API documentation for transaction service reference.
* core/types: add block-level access list structures with encoding/decoding (#31948)
This adds the SSZ types from the
[EIP-7928](https://eips.ethereum.org/EIPS/eip-7928) and also adds
encoder/decoder generation using https://github.com/ferranbt/fastssz.
The fastssz dependency is updated because the generation will not work
properly with the master branch version due to a bug in fastssz.
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* eth/downloader: fix ancient limit in snap sync (#32188)
This pull request fixes an issue in disabling direct-ancient mode in
snap sync.
Specifically, if `origin >= frozen && origin != 0`, it implies a part of
chain data has been written into the key-value store, all the following
writes into ancient store scheduled by downloader will be rejected
with error
`ERROR[07-10|03:46:57.924] Error importing chain data to ancients
err="can't add block 1166 hash: the append operation is out-order: have
1166 want 0"`.
This issue is detected by the https://github.com/ethpandaops/kurtosis-sync-test,
which initiates the first snap sync cycle without the finalized header and
implicitly disables the direct-ancient mode. A few seconds later the second
snap sync cycle is initiated with the finalized information and direct-ancient mode
is enabled incorrectly.
* .github: remove karalabe from CODEOWNERS
* cmd/geth: update vcheck testdata, add docs on generating signatures (#32121)
Fixed typo in security release URL by replacing:
Old: https://blog.ethereum.org/2020/11/12/geth_security_release/
New: https://blog.ethereum.org/2020/11/12/geth-security-release/
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
* signer/core/apitypes: require blob txs to have tx.to set (#32197)
Check the `to` address before building the blob tx.
---------
Co-authored-by: jwasinger <j-wasinger@hotmail.com>
* accounts/keystore: update links to documenation (#32194)
---
**Description:**
- Replaced outdated GitHub wiki links with the official Ethereum
documentation for Web3 Secret Storage.
- Updated references in `keystore.go` and `passphrase.go` for improved
accuracy and reliability.
---
* ethclient/gethclient: remove race condition in tests (#32206)
alternative to https://github.com/ethereum/go-ethereum/pull/32200
The race condition is not happening yet, since there is only a single
call to `newTestBackend`, but there might be more in the future
* params: EIP-7892 - Blob Parameter Only Hardforks (#32193)
This is a resubmit of https://github.com/ethereum/go-ethereum/pull/31820
against the `master` branch.
---------
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* eth/fetcher: fix announcement drop logic (#32210)
This PR fixes an issue in the tx_fetcher DoS prevention logic where the
code keeps the overflow amount (`want - maxTxAnnounces`) instead of the
allowed amount (`maxTxAnnounces - used`). The specific changes are:
- Correct slice indexing in the announcement drop logic
- Extend the overflow test case to cover the inversion scenario
* miner: set sidecar version when recomputing proofs (#32199)
- If the block number is `osaka` fork and needs to recompute some `blob
proofs` to `cell proofs`, here also needs to set version to `1`.
* all: fix outdated ethereum wiki json-rpc json-rpc doc links (#32209)
Replace outdated wiki reference with ethereum.org
documentation links
* core/types: fix CellProofsAt method (#32198)
* triedb/pathdb: introduce file-based state journal (#32060)
Introduce file-based state journal in path database, fixing
the Pebble restriction when the journal size exceeds 4GB.
---------
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core/rawdb: change the mechanism to schedule freezer sync (#32135)
This pull request slightly improves the freezer fsync mechanism by scheduling
the Sync operation based on the number of uncommitted items and original
time interval.
Originally, freezer.Sync was triggered every 30 seconds, which worked well during
active chain synchronization. However, once the initial state sync is complete,
the fixed interval causes Sync to be scheduled too frequently.
To address this, the scheduling logic has been improved to consider both the time
interval and the number of uncommitted items. This additional condition helps
avoid unnecessary Sync operations when the chain is idle.
* eth/protocols/snap, p2p/discover: improve zero time checks (#32214)
* all: update dead wiki links (#32215)
---
**Description:**
- Replaced outdated GitHub wiki links with current, official
documentation URLs.
- Removed links that redirect or are no longer relevant.
- Ensured all references point to up-to-date and reliable sources.
---
* core/rawdb: reduce allocations in rawdb.ReadHeaderNumber (#31913)
This is something interesting I came across during my benchmarks, we
spent ~3.8% of all allocations allocating the header number on the heap.
```
(pprof) list GetHeaderByHash
Total: 38197204475
ROUTINE ======================== github.com/ethereum/go-ethereum/core.(*BlockChain).GetHeaderByHash in github.com/ethereum/go-ethereum/core/blockchain_reader.go
0 5786566117 (flat, cum) 15.15% of Total
. . 79:func (bc *BlockChain) GetHeaderByHash(hash common.Hash) *types.Header {
. 5786566117 80: return bc.hc.GetHeaderByHash(hash)
. . 81:}
. . 82:
. . 83:// GetHeaderByNumber retrieves a block header from the database by number,
. . 84:// caching it (associated with its hash) if found.
. . 85:func (bc *BlockChain) GetHeaderByNumber(number uint64) *types.Header {
ROUTINE ======================== github.com/ethereum/go-ethereum/core.(*HeaderChain).GetHeaderByHash in github.com/ethereum/go-ethereum/core/headerchain.go
0 5786566117 (flat, cum) 15.15% of Total
. . 404:func (hc *HeaderChain) GetHeaderByHash(hash common.Hash) *types.Header {
. 1471264309 405: number := hc.GetBlockNumber(hash)
. . 406: if number == nil {
. . 407: return nil
. . 408: }
. 4315301808 409: return hc.GetHeader(hash, *number)
. . 410:}
. . 411:
. . 412:// HasHeader checks if a block header is present in the database or not.
. . 413:// In theory, if header is present in the database, all relative components
. . 414:// like td and hash->number should be present too.
(pprof) list GetBlockNumber
Total: 38197204475
ROUTINE ======================== github.com/ethereum/go-ethereum/core.(*HeaderChain).GetBlockNumber in github.com/ethereum/go-ethereum/core/headerchain.go
94438817 1471264309 (flat, cum) 3.85% of Total
. . 100:func (hc *HeaderChain) GetBlockNumber(hash common.Hash) *uint64 {
94438817 94438817 101: if cached, ok := hc.numberCache.Get(hash); ok {
. . 102: return &cached
. . 103: }
. 1376270828 104: number := rawdb.ReadHeaderNumber(hc.chainDb, hash)
. . 105: if number != nil {
. 554664 106: hc.numberCache.Add(hash, *number)
. . 107: }
. . 108: return number
. . 109:}
. . 110:
. . 111:type headerWriteResult struct {
(pprof) list ReadHeaderNumber
Total: 38197204475
ROUTINE ======================== github.com/ethereum/go-ethereum/core/rawdb.ReadHeaderNumber in github.com/ethereum/go-ethereum/core/rawdb/accessors_chain.go
204606513 1376270828 (flat, cum) 3.60% of Total
. . 146:func ReadHeaderNumber(db ethdb.KeyValueReader, hash common.Hash) *uint64 {
109577863 1281242178 147: data, _ := db.Get(headerNumberKey(hash))
. . 148: if len(data) != 8 {
. . 149: return nil
. . 150: }
95028650 95028650 151: number := binary.BigEndian.Uint64(data)
. . 152: return &number
. . 153:}
. . 154:
. . 155:// WriteHeaderNumber stores the hash->number mapping.
. . 156:func WriteHeaderNumber(db ethdb.KeyValueWriter, hash common.Hash, number uint64) {
```
Opening this to discuss the idea, I know that rawdb.EmptyNumber is not a
great name for the variable, open to suggestions
* trie: avoid spawning goroutines for empty children (#32220)
* eth/downloader: improve nil pointer protection (#32222)
Fix #32221
---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* account/abi/bind/v2: fix TestDeploymentWithOverrides (#32212)
The root cause of the flaky test was a nonce conflict caused by async
contract deployments.
This solution defines a custom deployer with automatic nonce management.
* eth/tracers: apply block header overrides correctly (#32183)
Fixes #32175.
This fixes the scenario where the blockhash opcode would return 0x0
during RPC simulations when using BlockOverrides with a future block
number. The root cause was that BlockOverrides.Apply() only modified the
vm.BlockContext, but GetHashFn() depends on the actual
types.Header.Number to resolve valid historical block hashes. This
caused a mismatch and resulted in incorrect behavior during trace and
call simulations.
---------
Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
* triedb/pathdb: avoid duplicate metadata reads (#32226)
* eth/protocols/snap: fix negative eta in state progress logging (#32225)
* triedb/pathdb: improve the performance of parse index block (#32219)
The implementation of `parseIndexBlock` used a reverse loop with slice
appends to build the restart points, which was less cache-friendly and
involved unnecessary allocations and operations. In this PR we change
the implementation to read and validate the restart points in one single
forward loop.
Here is the benchmark test:
```bash
go test -benchmem -bench=BenchmarkParseIndexBlock ./triedb/pathdb/
```
The result as below:
```
benchmark old ns/op new ns/op delta
BenchmarkParseIndexBlock-8 52.9 37.5 -29.05%
```
about 29% improvements
---------
Signed-off-by: jsvisa <delweng@gmail.com>
* all: define constructor for BlobSidecar (#32213)
The main purpose of this change is to enforce the version setting when
constructing the blobSidecar, avoiding creating sidecar with wrong/default
version tag.
* params: update tx gas limit cap (#32230)
Updates the tx gas limit cap to the new parameter (2^24)
https://github.com/ethereum/EIPs/pull/9986/files
* core/txpool/blobpool: remove unused `txValidationFn` from BlobPool (#32237)
This PR removes the now‑unused `txValidationFn` field from BlobPool.
It became obsolete after a PR https://github.com/ethereum/go-ethereum/pull/31202
was merged.
Resolves https://github.com/ethereum/go-ethereum/issues/32236
* triedb/pathdb: fix incorrect address length in history searching (#32248)
We should use account length to check address, else OOB maybe occured
Signed-off-by: jsvisa <delweng@gmail.com>
* core/vm: triple modexp cost post-cancun (#32231)
https://github.com/ethereum/EIPs/pull/9969/files
* core, params: add limit for max blobs in blob transaction (#32246)
[EIP-7594](https://eips.ethereum.org/EIPS/eip-7594) defines a limit of
max 6 blobs per transaction. We need to enforce this limit during block
processing.
> Additionally, a limit of 6 blobs per transaction is introduced.
Clients MUST enforce this limit when validating blob transactions at
submission time, when received from the network, and during block
production and processing.
* superchain: skip celo mainnet genesis processing (#646)
* superchain: skip celo mainnet genesis processing
* superchain: add GetChain tests
* superchain: add clarifying comments for celo exclusion
* build: update tests to fusaka-devnet-3 (#32251)
* core/types: minimize this invalid intermediate state (#32241)
* core/rawdb: downgrade log level in chain freezer (#32253)
* triedb/pathdb: use binary.append to eliminate the tmp scratch slice (#32250)
`binary.AppendUvarint` offers better performance than using append
directly, because it avoids unnecessary memory allocation and copying.
In our case, it can increase the performance by +35.8% for the
`blockWriter.append` function:
```
benchmark old ns/op new ns/op delta
BenchmarkBlockWriterAppend-8 5.97 3.83 -35.80%
```
---------
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* p2p/rlpx: optimize XOR operation using bitutil.XORBytes (#32217)
Replace manual byte-by-byte XOR implementation with the optimized
bitutil.XORBytes function. This improves performance by using word-sized
operations on supported architectures while maintaining the same
functionality. The optimized version processes data in bulk rather than
one byte at a time
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* eth/gasestimator: fix potential overflow (#32255)
Improve binary search, preventing the potential overflow in certain L2 cases
* triedb/pathdb: fix an deadlock in history indexer (#32260)
Seems the `signal.result` was not sent back in shorten case, this will
cause a deadlock.
---------
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* eth/protocols/snap: add healing and syncing metrics (#32258)
Adds the heal time and snap sync time to grafana
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core: replace the empty fmt.Errorf with errors.New (#32274)
The `errors.new` function does not require string formatting, so its
performance is better than that of `fmt.Errorf`.
* eth/catalyst: fix error message in ExecuteStatelessPayloadV4 (#32269)
Correct the error message in the ExecuteStatelessPayloadV4 function to
reference newPayloadV4 and the Prague fork, instead of incorrectly
referencing newPayloadV3 and Cancun.
This improves clarity during debugging and aligns the error message with
the actual function and fork being validated. No logic is changed.
---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* cmd, eth, internal: introduce debug_sync (#32177)
Alternative implementation of https://github.com/ethereum/go-ethereum/pull/32159
* all: replace fmt.Errorf with errors.New (#32286)
The errors.new function does not require string formatting, so its
performance is better than that of fmt.Errorf.
* downloader: fix typos, grammar and formatting (#32288)
* ethclient/simulated: Fix flaky rollback test (#32280)
This PR addresses a flakiness in the rollback test discussed in
https://github.com/ethereum/go-ethereum/issues/32252
I found `nonce` collision caused transactions occasionally fail to send.
I tried to change error message in the failed test like:
```
if err = client.SendTransaction(ctx, signedTx); err != nil {
t.Fatalf("failed to send transaction: %v, nonce: %d", err, signedTx.Nonce())
}
```
and I occasionally got test failure with this message:
```
=== CONT TestFlakyFunction/Run_#100
rollback_test.go:44: failed to send transaction: already known, nonce: 0
--- FAIL: TestFlakyFunction/Run_#100 (0.07s)
```
Although `nonces` are obtained via `PendingNonceAt`, we observed that,
in rare cases (approximately 1 in 1000), two transactions from the same
sender end up with the same nonce. This likely happens because `tx0` has
not yet propagated to the transaction pool before `tx1` requests its
nonce. When the test succeeds, `tx0` and `tx1` have nonces `0` and `1`,
respectively. However, in rare failures, both transactions end up with
nonce `0`.
We modified the test to explicitly assign nonces to each transaction. By
controlling the nonce values manually, we eliminated the race condition
and ensured consistent behavior. After several thousand runs, the
flakiness was no longer reproducible in my local environment.
Reduced internal polling interval in `pendingStateHasTx()` to speed up
test execution without impacting stability. It reduces test time for
`TestTransactionRollbackBehavior` from about 7 seconds to 2 seconds.
* core/state: preallocate capacity for logs list (#32291)
Improvement: preallocate capacity for `logs` at first to avoid
reallocating multi times.
* core/state: improve PrettyPrint function (#32293)
* core/types: expose sigHash as Hash for SetCodeAuthorization (#32298)
* common/hexutil: replace customized bit sizer with bit.Uintsize (#32304)
* accounts/abi: precompile regex (#32301)
* cmd/devp2p/internal/v4test: add test for ENRRequest (#32303)
This adds a cross-client protocol test for a recently discovered bug in Nethermind.
* trie: reduce the memory allocation in trie hashing (#31902)
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.
* 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>
* eth: fix typos and outdated comments (#32324)
* 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.
* rlp/rlpgen: implement package renaming support (#31148)
This adds support for importing types from multiple identically-named
packages.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* beacon/params, core/filtermaps: update checkpoints (#32336)
This PR updates checkpoints for blsync and filtermaps.
* version: release v1.16.2 (#32343)
* version: begin v1.16.3 release cycle (#32345)
* core/state: introduce the TransitionState object (verkle transition part 1) (#31634)
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>
* eth/catalyst: avoid load the same blob tx multi times (#32190)
- 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>
* eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348)
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>
* core/filtermaps: remove unnecessary nil check and add cv2 lock (#32309)
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* go.mod: upgraded github.com/golang-jwt/jwt/v4 v4.5.1 => v4.5.2 (#32356)
https://pkg.go.dev/vuln/GO-2025-3553
* rpc: use reflect.TypeFor (#32316)
* crypto/kzg4844: use reflect.TypeFor (#32319)
* common, common/hexutil: use reflect.TypeFor (#32321)
* beacon/merkle: use reflect.TypeFor (#32322)
* core: use reflect.TypeFor (#32320)
https://github.com/golang/go/issues/60088
* p2p/enode: use atomic.Pointer in LocalNode (#32360)
* signer/core/apitypes: simplify reflect []byte creation (#32315)
Co-authored-by: Felix Lange <fjl@twurst.com>
* rlp: use reflect.TypeFor (#32317)
Co-authored-by: Felix Lange <fjl@twurst.com>
* eth/downloader: fix incomplete code comment (#32354)
* metrics: use atomic.Pointer in runtimeHistogram (#32361)
Co-authored-by: Felix Lange <fjl@twurst.com>
* core/vm: fold EVMInterpreter into EVM (#32352)
The separation serves no purpose atm, and the circular dependency that
EVM and EVMInterpreter had was begging for them to be merged.
* ethclient: fix flaky pending tx test (#32380)
Fixes: https://github.com/ethereum/go-ethereum/issues/32252
* 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).
* core/vm: make types consistent in makeDup (#32378)
* miner: remove todo comment (#32389)
see
https://github.com/ethereum/go-ethereum/pull/32372#discussion_r2265885182
* 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.
* accounts/abi, accounts/keystore: use reflect.TypeFor (#32323)
Co-authored-by: Felix Lange <fjl@twurst.com>
* 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.
* trie, core: rework tracer and track origin value of dirty nodes (#32306)
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.
* 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.
* metrics: Block Basefee (#658)
* basefee metric
* Handle nil basefee for before london hf
* Update forkdiff
* trie: refactor to use slices.Concat (#32401)
* cmd: fix inconsistent function name in comment (#32411)
fix inconsistent function name in comment
Signed-off-by: youzichuan <youzichuan6@outlook.com>
* eth: abort `requiredBlocks` check if peer handler terminated (#32413)
* node: remove unused err var (#32398)
* 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)
* 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>
* eth/syncer: fix typo (#32427)
avaibale -> available
* p2p: refactor to use time.Now().UnixMilli() in golang std lib (#32402)
* .github: upgrade workflows to Go 1.25 (#32425)
* build: upgrade -dlgo version to Go 1.25.0 (#32412)
* crypto/secp256k1: use ReadBits from common/math (#32430)
* build: remove unused functions (#32393)
* catalyst/api: centralize OPStack validation into helper functions (#592)
* catalyist/api: centralize OPStack validation into helper functions
located in a seperate file for a cleaner diff to upstream
* add test coverage for optimism validation checks
return unadorned errors from helper and allow caller to wrap
* lint
* use engine.InvalidPayloadAttributes.With() for all failed optimism FCU checks
* typos
* fix: only check optimism payload attributes if they are not nil
* combine conditions
* move test
* combine checks
* add check on withdrawals root from canyon to isthmus
* lint
* 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>
* 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.
* core/vm: refactor to use bitutil.TestBytes (#32434)
* crypto/bn256: refactor to use bitutil.TestBytes (#32435)
* consensus/misc/eip4844: use blob parameters of current header (#32424)
This changes the implementation to resolve the blob parameters according
to the current header timestamp. This matters for EIP-7918, where we
would previously resolve the UpdateFraction according to the parent
header fork, leading to a confusing situation at the fork transition
block.
---------
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
* rlp: remove workaround for Value.Bytes (#32433)
As of Go 1.19, it is permitted to call Bytes() on a reflect.Value
representing an adressable byte array. So we can remove our workaround,
undoing #22924.
https://go.dev/doc/go1.19#reflectpkgreflect
> The method [Value.Bytes](https://go.dev/pkg/reflect/#Value.Bytes) now
accepts addressable arrays in addition to slices.
* core/vm: fix EIP-7823 modexp input length check (#32363)
The order of the checks was wrong which would have allowed a call to
modexp with `baseLen == 0 && modLen == 0` post fusaka.
Also handles an edge case where base/mod/exp length >= 2**64
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* metrics: add tinygo build flag for CPU time (#32454)
* core/rawdb: add non-unix alternative for tablewriter (#32455)
Continuation of https://github.com/ethereum/go-ethereum/issues/32022
tablewriter assumes unix or windows, which may not be the case for
embedded targets.
For v0.0.5 of tablewriter, it is noted in table.go: "The protocols were
written in pure Go and works on windows and unix systems"
---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* eth/syncer: stop ticker to prevent resource leak (#32443)
* core/rawdb: enhance database key construction (#32431)
* rpc: add SetWebsocketReadLimit in Server (#32279)
Exposing the public method to setReadLimits for Websocket RPC to
prevent OOM.
Current, Geth Server is using a default 32MB max read limit (message
size) for websocket, which is prune to being attacked for OOM. Any one
can easily launch a client to send a bunch of concurrent large request
to cause the node to crash for OOM. One example of such script that can
easily crash a Geth node running websocket server is like this:
https://gist.githubusercontent.com/DeltaXV/b64d221e342e9c1ec6c99c1ab8201544/raw/ec830979ac9a707d98f40dfcc0ce918fc8fb9057/poc.go
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* CODEOWNERS: add gballet as the owner of trie package (#32466)
* ethclient/gethclient: use common.Hash to debug_traceTransaction (#32404)
* graphql: add query depth limit to prevent DoS attacks (#32344)
## Summary
This PR addresses a DoS vulnerability in the GraphQL service by
implementing a maximum query depth limit. While #26026 introduced
timeout handling, it didn't fully mitigate the attack vector where
deeply nested queries can still consume excessive CPU and memory
resources before the timeout is reached.
## Changes
- Added `maxQueryDepth` constant (set to 20) to limit the maximum
nesting depth of GraphQL queries
- Applied the depth limit using `graphql.MaxDepth()` option when parsing
the schema
- Added test case `TestGraphQLMaxDepth` to verify that queries exceeding
the depth limit are properly rejected
## Security Impact
Without query depth limits, malicious actors could craft deeply nested
queries that:
- Consume excessive CPU cycles during query parsing and execution
- Allocate large amounts of memory for nested result structures
- Potentially cause service degradation or outages even with timeout
protection
This fix complements the existing timeout mechanism by preventing
resource-intensive queries from being executed in the first place.
## Testing
Added `TestGraphQLMaxDepth` which verifies that queries with nesting
depth > 20 are rejected with a `MaxDepthExceeded` error.
## References
- Original issue: #26026
- Related security best practices:
https://www.howtographql.com/advanced/4-security/
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* p2p: update MaxPeers comment (#32414)
* eth/catalyst: return methods by reflect (#32300)
Return the exposed methods in `ConsensusAPI` by reflection.
* internal/ethapi, miner: fix GetBlockReceipts for pending (#32461)
* trie, core/state: introduce trie Prefetch for optimizing preload (#32134)
This pull introduces a `Prefetch` operation in the trie to prefetch trie
nodes in parallel. It is used by the `triePrefetcher` to accelerate state
loading and improve overall chain processing performance.
* beacon/engine,eth/catalyst: Fix engine API checks and exec payload creation (#662)
* p2p: using math.MaxInt32 from go std lib (#32357)
Co-authored-by: Felix Lange <fjl@twurst.com>
* rlp: refactor to use maths.ReadBits (#32432)
* fixes missing protection of nil pointer dereference in scwallet (#32186)
Fixes #32181
Signed-off-by: kapil <kapilsareen584@gmail.com>
* accounts/usbwallet: correct version comparison logic (#32417)
## Description
This PR fixes a bug in the Ledger hardware wallet version validation
logic for EIP-155 transaction signing. The original condition
incorrectly allowed older versions that don't support EIP-155 such as
0.9.9 and 0.1.5 to proceed.
* p2p: remove todo comment, as it's unnecessary (#32397)
as metioned in https://github.com/ethereum/go-ethereum/pull/32351, I
think this comment is unnecessary.
* core/types: reduce allocations for transaction comparison (#31912)
This PR should reduce overall allocations of a running node by ~10
percent. Since most allocations are coming from the re-heaping of the
transaction pool.
```
(pprof) list EffectiveGasTipCmp
Total: 38197204475
ROUTINE ======================== github.com/ethereum/go-ethereum/core/types.(*Transaction).EffectiveGasTipCmp in github.com/ethereum/go-ethereum/core/types/transaction.go
0 3766837369 (flat, cum) 9.86% of Total
. . 386:func (tx *Transaction) EffectiveGasTipCmp(other *Transaction, baseFee *big.Int) int {
. . 387: if baseFee == nil {
. . 388: return tx.GasTipCapCmp(other)
. . 389: }
. . 390: // Use more efficient internal method.
. . 391: txTip, otherTip := new(big.Int), new(big.Int)
. 1796172553 392: tx.calcEffectiveGasTip(txTip, baseFee)
. 1970664816 393: other.calcEffectiveGasTip(otherTip, baseFee)
. . 394: return txTip.Cmp(otherTip)
. . 395:}
. . 396:
. . 397:// EffectiveGasTipIntCmp compares the effective gasTipCap of a transaction to the given gasTipCap.
. . 398:func (tx *Transaction) EffectiveGasTipIntCmp(other *big.Int, baseFee *big.Int) int {
```
This PR reduces the allocations for comparing two transactions from 2 to
0:
```
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/types
cpu: Intel(R) Core(TM) Ultra 7 155U
│ /tmp/old.txt │ /tmp/new.txt │
│ sec/op │ sec/op vs base │
EffectiveGasTipCmp/Original-14 64.67n ± 2% 25.13n ± 9% -61.13% (p=0.000 n=10)
│ /tmp/old.txt │ /tmp/new.txt │
│ B/op │ B/op vs base │
EffectiveGasTipCmp/Original-14 16.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
│ /tmp/old.txt │ /tmp/new.txt │
│ allocs/op │ allocs/op vs base │
EffectiveGasTipCmp/Original-14 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
```
It also speeds up the process by ~60%
There are two minor caveats with this PR:
- We change the API for `EffectiveGasTipCmp` and `EffectiveGasTipIntCmp`
(which are probably not used by much)
- We slightly change the behavior of `tx.EffectiveGasTip` when it
returns an error. It would previously return a negative number on error,
now it does not (since uint256 does not allow for negative numbers)
---------
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com>
* triedb/pathdb: improve err message in historical state reader (#32477)
Fixes https://github.com/ethereum/go-ethereum/issues/32474
* core, miner, trie: add metrics tracking state trie depth (#32388)
Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
* p2p/discover: add discv5 invalid findnodes result test cases (#32481)
Supersedes #32470.
### What
- snap: shorten stall watchdog in `eth/protocols/snap/sync_test.go` from
1m to 10s.
- discover/v5: consolidate FINDNODE negative tests into a single
table-driven test:
- `TestUDPv5_findnodeCall_InvalidNodes` covers:
- invalid IP (unspecified `0.0.0.0`) → ignored
- low UDP port (`<=1024`) → ignored
### Why
- Addresses TODOs:
- “Make tests smaller” (reduce long 1m timeout).
- “check invalid IPs”; also cover low port per `verifyResponseNode`
rules (UDP must be >1024).
### How it’s validated
- Test-only changes; no production code touched.
- Local runs:
- `go test ./p2p/discover -count=1 -timeout=300s` → ok
- `go test ./eth/protocols/snap -count=1 -timeout=600s` → ok
- Lint:
- `go run build/ci.go lint` → 0 issues on modified files.
### Notes
- The test harness uses `enode.ValidSchemesForTesting` (which includes
the “null” scheme), so records signed with `enode.SignNull` are
signature-valid; failures here are due to IP/port validation in
`verifyResponseNode` and `netutil.CheckRelayAddr`.
- Tests are written as a single table-driven function for clarity; no
helpers or environment switching.
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
* node: fix vhosts for adminAPI (#32488)
* core,trie: fix typo in TransitionTrie (#32491)
Change `NewTransitionTree` to the correct `NewTransitionTrie`.
Signed-off-by: pxwanglu <pxwanglu@icloud.com>
* .github/workflows: naive PR format checker (#32480)
Full disclosure: this has been generated by AI. The goal is to have a
quick check that the PR format is correct, before we merge it. This is
to avoid the periodical case when someone forgets to add a milestone or
check the title matches our preferred format.
* p2p: use slices.Clone (#32428)
Replaces a helper method with slices.Clone
* eth/protocols/eth: Handle DepositTx Receipts
* eth: Catch nil chainViews in backend filter maps update
* params: fix history serve window for verkle test (#32127)
Fixes the history serve window parameter for the
test function `getContractStoredBlockHash`.
Fixes #32458.
* eth/tracers: add missing teardown in TestTraceChain (#32472)
The TestTraceChain function was missing a defer backend.teardown() call,
which is required to properly release blockchain resources after test
completion.
---------
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* internal/web3ext: remove deprecated method debug_seedHash (#32495)
The corresponding function was removed in #27178
* triedb/pathdb: rename history to state history (#32498)
This is a internal refactoring PR, renaming the history to stateHistory.
It's a pre-requisite PR for merging trienode history, avoid the name
conflict.
* build: add support for ubuntu 25.04 (#31666)
* cmd: fix typo in comment (#32501)
The function name in the comment should be `writeErrors` instead of
`writeQueries`.
Signed-off-by: tzchenxixi <tzchenxixi@icloud.com>
* eth/tracers: fix supply tracer uncle accounting (#31882)
Uncle rewards were being omitted in the supply tracer due
to a bug. This PR fixes that.
---------
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* triedb/pathdb: refactor state history write (#32497)
This pull request refactors the internal implementation in path database
a bit, specifically:
- purge the state index data in batch
- simplify the logic of state history construction and index, make it more readable
* rpc: refactor read limit test (#32494)
closes #32240 #32232
The main cause for the time out is the slow json encoding of large data.
In #32240 they tried to resolve the issue by reducing the size of the
test. However as Felix pointed out, the test is still kind of confusing.
I've refactored the test so it is more understandable and have reduced
the amount of data needed to be json encoded. I think it is still
important to ensure that the default read limit is not active, so I have
retained one large (~32 MB) test case, but it's at least smaller than
the existing ~64 MB test case.
* eth: replace hardcoded sleep with polling loop in snap sync test (#32499)
Replace hardcoded 5-second sleep with polling loop that actively checks
snap sync state. This approach is already used in other project tests
(like account_cache_test.go) and provides better reliability by:
- Reducing flaky behavior on slower systems
- Finishing early when sync completes quickly
- Using 1-second timeout with 100ms polling intervals
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
* internal/ethapi: fix precompile override for eth_estimateGas (#31795)
Fix and close https://github.com/ethereum/go-ethereum/issues/31719.
---------
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* accounts/abi: fix panic when check event with log has empty or nil topics (#32503)
When the log has empty or nil topics, the generated bindings code will
panic when accessing `log.Topics[0]`, add a check to avoid it.
* core, internal, miner, signer: convert legacy sidecar in Osaka fork (#32347)
This pull request implements #32235 , constructing blob sidecar in new
format (cell proof)
if the Osaka has been activated.
Apart from that, it introduces a pre-conversion step in the blob pool
before adding the txs.
This mechanism is essential for handling the remote **legacy** blob txs
from the network.
One thing is still missing and probably is worthy being highlighted
here: the blobpool may
contain several legacy blob txs before the Osaka and these txs should be
converted once
Osaka is activated. While the `GetBlob` API in blobpool is capable for
generating cell proofs
at the runtime, converting legacy txs at one time is much cheaper
overall.
---------
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
Co-authored-by: lightclient <lightclient@protonmail.com>
* eth/tracers: fix testcase 7702_delegate (#32349)
Fixes a prestateTracer test case covering 7702 delegation.
---------
Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* node: fix problematic function name in comment (#32510)
fix problematic function name in comment
Signed-off-by: slicesequal <slicesequal@outlook.com>
* eth: stabilize tx relay peer selection (#31714)
When maxPeers was just above some perfect square, and a few peers
dropped for some reason, we changed the peer selection function.
When new peers were acquired, we changed again.
This PR improves the selection function, in two ways. First, it will always select
sqrt(peers) to broadcast to. Second, the selection now uses siphash with a secret
key, to guard against information leaks about tx source.
---------
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
* core: improve error context in state processor for Prague EIPs (#32509)
Add better error context for EIP-6110, EIP-7002, and EIP-7251 processing
in state processor to improve debugging capabilities.
* all: fix problematic function name in comment (#32513)
Fix problematic function name in comment.
Do my best to correct them all with a script to avoid spamming PRs.
* triedb/pathdb, core: keep root->id mappings after truncation (#32502)
This pull request preserves the root->ID mappings in the path database
even after the associated state histories are truncated, regardless of
whether the truncation occurs at the head or the tail.
The motivation is to support an additional history type, trienode history.
Since the root->ID mappings are shared between two history instances,
they must not be removed by either one.
As a consequence, the root->ID mappings remain in the database even
after the corresponding histories are pruned. While these mappings may
become dangling, it is safe and cheap to keep them.
Additionally, this pull request enhances validation during historical
reader construction, ensuring that only canonical historical state will be
served.
* README: add twitter badge to documentation (#32516)
* core/rawdb: inspect database in parallel (#32506)
`db inspect` on the full database currently takes **30min+**, because
the db iterate was run in one thread, propose to split the key-space to
256 sub range, and assign them to the worker pool to speed up.
After the change, the time of running `db inspect --workers 16` reduced
to **10min**(the keyspace is not evenly distributed).
---------
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* all: improve ETA calculation across all progress indicators (#32521)
### Summary
Fixes long-standing ETA calculation errors in progress indicators that
have been present since February 2021. The current implementation
produces increasingly inaccurate estimates due to integer division
precision loss.
### Problem
https://github.com/ethereum/go-ethereum/blob/3aeccadd04aee2d18bdb77826f86b1ca000d3b67/triedb/pathdb/history_indexer.go#L541-L553
The ETA calculation has two critical issues:
1. **Integer division precision loss**: `speed` is calculated as
`uint64`
2. **Off-by-one**: `speed` uses `+ 1`(2 times) to avoid division by
zero, however it makes mistake in the final calculation
This results in wildly inaccurate time estimates that don't improve as
progress continues.
### Example
Current output during state history indexing:
```
lvl=info msg="Indexing state history" processed=16858580 left=41802252 elapsed=18h22m59.848s eta=11h36m42.252s
```
**Expected calculation:**
- Speed: 16858580 ÷ 66179848ms = 0.255 blocks/ms
- ETA: 41802252 ÷ 0.255 = ~45.6 hours
**Current buggy calculation:**
- Speed: rounds to 1 block/ms
- ETA: 41802252 ÷ 1 = ~11.6 hours ❌
### Solution
- Created centralized `CalculateETA()` function in common package
- Replaced all 8 duplicate code copies across the codebase
### Testing
Verified accurate ETA calculations during archive node reindexing with
significantly improved time estimates.
* core/stateless: only report leaf depth in witness stats (#32507)
Filtering for leaf nodes was missing from #32388, which means that even
the root done was reported, which made little sense for the bloatnet
data processing we want to do.
* trie/bintrie: add eip7864 binary trees and run its tests (#32365)
Implement the binary tree as specified in [eip-7864](https://eips.ethereum.org/EIPS/eip-7864).
This will gradually replace verkle trees in the codebase. This is only
running the tests and will not be executed in production, but will help
me rebase some of my work, so that it doesn't bitrot as much.
---------
Signed-off-by: Guillaume Ballet
Co-authored-by: Parithosh Jayanthi <parithosh.jayanthi@ethereum.org>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* internal/ethapi,params: add `eth_config` (#32239)
~Will probably be mostly supplanted by #32224, but this should do for
now for devnet 3.~
Seems like #32224 is going to take some more time, so I have completed
the implementation of eth_config here. It is quite a bit simpler to
implement now that the config hashing was removed.
---------
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* version: release v1.16.3
* feat: bump superchain registry (#669)
* ci: Update forkdiff version to v0.1.1 (#670)
* feat: introduce minimum base fee (#666)
* add minBaseFee to superchain/types and Jovian to params/config
* extend extraData header field
* validate/encode eip1559
* spike add jovian 1559 tests
* update calcBaseFee test and fix logic for calcBaseFee
* update comment
* validate params should be 9 not 10
* dont leave out version byte in extraData
* 0 minbasefee is valid
* dont need default minBaseFee
* add test that fails for curr impl
* do one check at the end to enforce minBaseFee
* 9 bytes not 10 in validate err msg
* extend coverage
* nits
* fix test
* use feature naming and assume eip1559params 8bytes still
* best effort decode
* feature flag
* nits
* handle FCU and payload building args properly
* have payload building test support holocene still
* nits + fix api payload fcu
* use option A of feature flag + nits
* Switch from log2 to significand + exponent for min base fee
* Clear out the higher 4 bits of the significand
* Add encode/decode helpers for min base fee factors
* Remove the check for a blank min base fee
* bit manipulation change
* eth/catalyst: fix ExtraData validation for Jovian min base fee; add tests
* use u64 approach
* feedback + add specs link
* use more compact syntax
* move expectation to end of struct
* combine tests
* rename feature flag
* add new optimism-specific file with general validation and decoding functions
* move optimism specific code to new file
* remove validation and add comments
validation is done in catalyst/api
* remove feature flags altogether
* remove validation from decoding fn
* fix and use generic extradata validation fn
* add comments
* finish removing feature flag
* fix tests
* Apply suggestions from code review
* add spec link
* use inline fn to clean up diff to upstream
* add test cases and factor into subtests with require statement
* tidy up jovianConfig() helper and rename a test
* Introduce Holocene/JovianExtraDataVersionByte
* tweak
* consistency
* rename minbasefee to jovian in validation fn error msg
* assert holocene params in payload_building_test.go
* fix regression
* use ptr for MinBaseFee in PayloadAttributes
* eip1559_optimism: have Validate/DecodeOptimismExtraData take a ForkChecker interface and return a *uint64 for MinBaseFee
* introduce EncodeOptimismExtraData
* lint (whitespace only)
* fix pointer comparison in assertion
* add test for determinism of payload id
* dereference pointer when computing ID
This is not strictly necessary, but it is clearer.
* use eip1559.DecodeOptimismExtraData in test
and extend coverage to missing minbasefee
* Update consensus/misc/eip1559/eip1559_optimism.go
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
* use isOptimismHolocene in CalcBaseFee and document assumption about extraData validity
* TestBuildPatload: use nil minBaseFee expectation preJovian
* rework closure to reduce diff to upstream
* remove empty line
---------
Co-authored-by: William Law <williamlaw.wtl@gmail.com>
Co-authored-by: Niran Babalola <niran@niran.org>
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
* jovian: make isthmus gas params extraction forward-compatible (#671)
* sync-superchain: Handle case where skipped genesis file doesn't exist. (#673)
* feat: bump superchain registry to include are…
clydemeng
added a commit
to sunny2022da/bsc
that referenced
this pull request
Dec 12, 2025
) * node: fix data race on httpConfig.prefix (#32047) This fixes a data race when accessing the `httpConfig.prefix` field. This field can be modified while the server is running through `enableRPC`. The fix is storing the prefix in the handler, which is accessed through the atomic pointer. alternative to #32035 fixes ethereum/go-ethereum#32019 * Revert "crypto/bn256: default to gnark (#32024)" This reverts commit e0cf89e. * fix: skip storage entries with missing preimage keys (#32051) When `GetKey` is called, a missing preimage can cause the function to return a `nil` key. This, in turn, makes `account.Storage` persist an incorrect value. * ethdb/pebble: lower the compaction debt (#31988) This pull request reduces the threshold for triggering compaction at level0, leading to less compaction debt. This change is helpful in the case of heavy write-load, mitigating the case of heavy write stalls caused by compaction. closes ethereum/go-ethereum#31830 * accounts: fix data race when closing manager (#31982) Fixes a data race on the `wallets` slice when closing account Manager. At the moment, there is a data race between a go-routine calling the Manager's `Close` function and the background go-routine handling most operations on the `Manager`. The `Manager`'s `wallets` field is accessed without proper synchronization. By moving the closing of wallets from the `Close()` function into the background thread, this issue can be resolved. * go.mod: bump golang.org/x/net from 0.36.0 to 0.38.0 (#31658) * crypto/bn256: fix gnark deserialisation (#32055) fixes the gnark deserialisation --------- Co-authored-by: Felix Lange <fjl@twurst.com> * tests/fuzzers: added bn marshaling fuzzers (#32053) Adds marshaling fuzzing for G1 and G2 to oss-fuzz. Also aligns the behavior of the google library to that of gnark and cloudflare, which only ever read the first 64 / 128 bytes of the input, regardless of how long the input is * build: upgrade -dlgo version to Go 1.24.4 (#31978) * eth/catalyst: fetch header on forkchoiceUpdated (#31928) closes ethereum/go-ethereum#31254 --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> * all: reuse the global hash buffer (#31839) As ethereum/go-ethereum#31769 defined a global hash pool, so we can reuse it, and also remove the unnecessary KeccakState buffering --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> * crypto/bn256/cloudflare: pull in upstream fix for R27 and R29 usage (#32057) Pulls in cloudflare/bn256#48 to remove usage of R27 and R29 [which are reserved](https://go.dev/doc/asm#arm64). * eth,core: terminate the downloader immediately when shutdown signal is received (#32062) Closes ethereum/go-ethereum#32058 * chore: fix some typos in comment (bnb-chain#3176) * core/rawdb: don't decode the full block body in ReadTransaction (#32027) Reading a single transaction out of a block shouldn't need decoding the entire body --------- Co-authored-by: Felix Lange <fjl@twurst.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * chore: nancy and jsutils (bnb-chain#3179) * build: upgrade -dlgo version to Go 1.24.0 (#31159) Co-authored-by: Felix Lange <fjl@twurst.com> * build: filter out .git folder for go generate check (#31265) Fixes lint issue >>> /home/appveyor/.gvm/gos/go1.24.0/bin/go generate ./... ci.go:404: File changed: .git/index ci.go:407: One or more generated files were updated by running 'go generate ./...' exit status 1 * CI: all use go1.24 to build * all: use typed lru (bnb-chain#3175) * core: simplify effectiveTip calculation (#31771) Since we have the effective gas price in the message, we can compute tip by simply subtracting the basefee. No need to recompute the effective price. --------- Co-authored-by: Felix Lange <fjl@twurst.com> * core: consolidate BlockChain constructor options (#31925) In this pull request, the original `CacheConfig` has been renamed to `BlockChainConfig`. Over time, more fields have been added to `CacheConfig` to support blockchain configuration. Such as `ChainHistoryMode`, which clearly extends beyond just caching concerns. Additionally, adding new parameters to the blockchain constructor has become increasingly complicated, since it’s initialized across multiple places in the codebase. A natural solution is to consolidate these arguments into a dedicated configuration struct. As a result, the existing `CacheConfig` has been redefined as `BlockChainConfig`. Some parameters, such as `VmConfig`, `TxLookupLimit`, and `ChainOverrides` have been moved into `BlockChainConfig`. Besides, a few fields in `BlockChainConfig` were renamed, specifically: - `TrieCleanNoPrefetch` -> `NoPrefetch` - `TrieDirtyDisabled` -> `ArchiveMode` Notably, this change won't affect the command line flags or the toml configuration file. It's just an internal refactoring and fully backward-compatible. --------- Co-authored-by: Felix Lange <fjl@twurst.com> * deps: update prysm version to v5.3.2 (bnb-chain#3177) * .gitea: touch cron workflow files * trie: delete secKeyCacheOwner (#31785) The optimization tried to defer allocating the cache map until it was used for the first time. It's a relic from earlier times, when tries were copied often. This seems unnecessary now, so we can just create the map when the trie is created. --------- Co-authored-by: Felix Lange <fjl@twurst.com> * .gitea: show environment in release-ppa.yml * crypto/bn256/gnark: align marshaling behavior (#32065) Aligns the marshaling behavior of gnark to google and cloudflare Co-authored-by: kevaundray <kevtheappdev@gmail.com> * crypto/bn256: add documentation on subgroup checks for G2 (#32066) This PR improves the IsOnCurve methods for BN254 G2 points by: * Clarifying its behavior the docstring, making it explicit that it verifies both the point being on the curve and in the correct subgroup. * Adding an in-line comment explaining the subgroup membership check (c.Mul(Order)). * Minor wording adjustments for readability and consistency. * ethdb: Implement DeleteRange in batch (#31947) implement #31945 --------- Co-authored-by: prpeh <prpeh@proton.me> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * core/state: expose the state reader stats (#31998) This pull request introduces a mechanism to expose statistics from the state reader, specifically related to cache utilization during state prefetching. To improve state access performance, a pair of state readers is constructed with a shared local cache. One reader to execute transactions ahead of time to warm up the cache. The other reader is used by the actual chain processing logic, which can benefit from the prefetched states. This PR adds visibility into how effective the cache is by exposing relevant usage statistics. --------- Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com> * core/state: improve the prefetcher concurrency allowance (#32071) Improve the prefetcher concurrency allowance. * core/state: fix prefetch on single core CPU (#32075) We need at least one prefetch goroutine. SetLimit(0) would block prefetch. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> * triedb/pathdb, eth: use double-buffer mechanism in pathdb (#30464) Previously, PathDB used a single buffer to aggregate database writes, which needed to be flushed atomically. However, flushing large amounts of data (e.g., 256MB) caused significant overhead, often blocking the system for around 3 seconds during the flush. To mitigate this overhead and reduce performance spikes, a double-buffer mechanism is introduced. When the active buffer fills up, it is marked as frozen and a background flushing process is triggered. Meanwhile, a new buffer is allocated for incoming writes, allowing operations to continue uninterrupted. This approach reduces system blocking times and provides flexibility in adjusting buffer parameters for improved performance. * eth: quick canceling block inserting when debug_setHead is invoked (#32067) If Geth is engaged in a long-run block synchronization, such as a full syncing over a large number of blocks, invoking `debug_setHead` will cause `downloader.Cancel` to wait for all fetchers to stop first. This can be time-consuming, particularly for the block processing thread. To address this, we manually call `blockchain.StopInsert` to interrupt the blocking processing thread and allow it to exit immediately, and after that call `blockchain.ResumeInsert` to resume the block downloading process. Additionally, we add a sanity check for the input block number of `debug_setHead` to ensure its validity. --------- Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * cmd/clef: update readme (#32070) Replaced the outdated and broken link to the Web3 Secret Storage Definition with the current official URL from ethereum.org in the Clef README. This ensures users have access to up-to-date and accurate documentation for the keystore file format. * feat: blind bid serves the validator's best interest (bnb-chain#3158) * core: warm key TransactionIndexTail by writing (bnb-chain#3193) * eth/tracers: prestate lookup EIP7702 delegation account (#32080) Implement ethereum/go-ethereum#32078 Parse and lookup the delegation account if EIP7702 is enabled. --------- Signed-off-by: jsvisa <delweng@gmail.com> * cmd/geth: era-download logic fix (#32081) Downloading from a range was failing because it would return and error early with an error misinterpreting "start-end". --------- Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * miner: default gaslimit 45M (#32087) We believe it is safe to raise the gaslimit to 45M before the Fusaka fork. So this PR changes the default to 45M. * core/rawdb, triedb/pathdb: implement history indexer (#31156) This pull request is part-1 for shipping the core part of archive node in PBSS mode. * cmd/geth, triedb: add pathdb state verification (#32086) This pull request ports the snapshot iteration logic from the legacy implementation. * core, consensus/beacon: defer trie resolution (#31725) Previously, the account trie for a given state root was resolved immediately when the stateDB was created, implying that the trie was always required by the stateDB. However, this assumption no longer holds, especially for path archive nodes, where historical states can be accessed even if the corresponding trie data does not exist. * cmd/utils: fix formatting for beacon flag errors to fit Fatalf form (#32090) Noticed that the errors for the blsync flags were not formatted correctly for `Fatalf(..)`. * eth, triedb/pathdb: permit write buffer allowance in PBSS archive mode (#32091) This pull request fixes a flaw in PBSS archive mode that significantly degrades performance when the mode is enabled. Originally, in hash mode, the dirty trie cache is completely disabled when archive mode is active, in order to disable the in-memory garbage collection mechanism. However, the internal logic in path mode differs significantly, and the dirty trie node cache is essential for maintaining chain insertion performance. Therefore, the cache is now retained in path mode. * core, eth, triedb: serve historical states over RPC (#31161) This is the part-2 for archive node over path mode, which ultimately ships the functionality to serve the historical states * triedb/pathdb: fix journal resolution in pathdb (#32097) This pull request fixes a flaw in the PBSS state iterator, which could return empty account or storage data. In PBSS, multiple in-memory diff layers and a write buffer are maintained. These layers are persisted to the database and reloaded after node restarts. However, since the state data is encoded using RLP, the distinction between nil and an empty byte slice is lost during the encode/decode process. As a result, invalid state values such as `[]byte{}` can appear in PBSS and ultimately be returned by the state iterator. Checkout https://github.com/ethereum/go-ethereum/blob/master/triedb/pathdb/iterator_fast.go#L270 for more iterator details. It's a long-term existent issue and now be activated since the snapshot integration. The error `err="range contains deletion"` will occur when Geth tries to serve other peers with SNAP protocol request. --------- Co-authored-by: Felix Lange <fjl@twurst.com> * all: incorporate state history indexing status into eth_syncing response (#32099) This pull request tracks the state indexing progress in eth_syncing RPC response, i.e. we will return non-null syncing status until indexing has finished. * version: release go-ethereum v1.16.0 stable * version: begin v1.16.1 release cycle * .gitea: trigger PPA upload on tag * .travis.yml: remove travis configuration * hash: remove caching that was decreasing perf (bnb-chain#3146) * all: replace override.prague with osaka (#32093) replace `--override.prague` with `--override.osaka` Signed-off-by: jsvisa <delweng@gmail.com> * node: do not double-wrap KV stores (#32089) For no apparent reason, KV stores were getting wrapped in `nofreezedb` first and then in `freezerdb`. * eth: correct tracer initialization in BlockchainConfig (#32107) core.BlockChainConfig.VmConfig is not a pointer, so setting the Tracer on the `vmConfig` object after it was passed to options does *not* apply it to options.VmConfig This fixes the issue by setting the value directly inside the `options` object and removing the confusing `vmConfig` variable to prevent further mistakes. * miner: fix metric simulateSpeedGauge * .gitea: switch release builds to static linking (#32118) This is to avoid compatibility issues with mismatched glibc versions between the builder and deployment target. Fixes #32102 * .gitea: fix 386 upload * all: clear up `Verify Node` logic (bnb-chain#3199) * miner: change default mev config (bnb-chain#3143) * .gitea: disable cron schedule * triedb: reset state indexer after snap synced (#32104) Fix the issue after initial snap sync with `gcmode=archive` enabled. ``` NewPayload: inserting block failed error="history indexing is out of order, last: null, requested: 1" ``` --------- Signed-off-by: Delweng <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * eth/filters: add address limit to filters (#31876) The address filter was never checked against a maximum limit, which can be somewhat abusive for API nodes. This PR adds a limit similar to topics ## Description (AI generated) This pull request introduces a new validation to enforce a maximum limit on the number of addresses allowed in filter criteria for Ethereum logs. It includes updates to the `FilterAPI` and `EventSystem` logic, as well as corresponding test cases to ensure the new constraint is properly enforced. ### Core functionality changes: * **Validation for maximum addresses in filter criteria**: - Added a new constant, `maxAddresses`, set to 100, to define the maximum allowable addresses in a filter. - Introduced a new error, `errExceedMaxAddresses`, to handle cases where the number of addresses exceeds the limit. - Updated the `GetLogs` method in `FilterAPI` to validate the number of addresses against `maxAddresses`. - Modified the `UnmarshalJSON` method to return an error if the number of addresses in the input JSON exceeds `maxAddresses`. - Added similar validation to the `SubscribeLogs` method in `EventSystem`. ### Test updates: * **New test cases for address limit validation**: - Added a test in `TestUnmarshalJSONNewFilterArgs` to verify that exceeding the maximum number of addresses triggers the `errExceedMaxAddresses` error. - Updated `TestInvalidLogFilterCreation` to include a test case for an invalid filter with more than `maxAddresses` addresses. - Updated `TestInvalidGetLogsRequest` to test for invalid log requests with excessive addresses. These changes ensure that the system enforces a reasonable limit on the number of addresses in filter criteria, improving robustness and preventing potential performance issues. --------- Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> * miner: only recommit bids when no error happens (bnb-chain#3204) * chore: fix problematic comment (bnb-chain#3189) * chore: fix duplicated counter (bnb-chain#3187) * Fix log indexer noise after debug_setHead operations (#31934) ## Summary This PR resolves Issue #31929 by reducing log noise generated by the log indexer after `debug_setHead` operations. ## Problem Description When `debug_setHead` is called to rewind the blockchain, blocks are removed from the database. However, the log indexer's `ChainView` objects may still hold references to these deleted blocks. When `extendNonCanonical()` attempts to access these missing headers, it results in: 1. **Repeated ERROR logs**: `Header not found number=X hash=0x...` 2. **Log noise** that can mask other important errors 3. **User confusion** about whether this indicates a real problem ## Root Cause Analysis The issue occurs because: - `debug_setHead` removes blocks from the blockchain database - Log indexer's `ChainView` may still reference deleted block hashes - `extendNonCanonical()` in `core/filtermaps/chain_view.go` tries to fetch these missing headers - The existing `return false` logic properly handles the error, but logs at ERROR level ## Solution This is a **logging improvement only** - no functional logic changes: ### Changes Made 1. **Log level**: Changed from `ERROR` to `DEBUG` 2. **Log message**: Enhanced with descriptive context about chain view extension 3. **Comments**: Added explanation for when this situation occurs 4. **Behavior**: Maintains existing error handling (`return false` was already present) ### Code Changes ```go // Before log.Error("Header not found", "number", number, "hash", hash) return false // After // Header not found - this can happen after debug_setHead operations // where blocks have been deleted. Return false to indicate the chain view // is no longer valid rather than logging repeated errors. log.Debug("Header not found during chain view extension", "number", number, "hash", hash) return false ``` ## Testing ### Automated Tests - ✅ All existing filtermaps tests pass: `go test ./core/filtermaps -v` - ✅ No regressions in related functionality ### Manual Verification 1. **Before fix**: Started geth in dev mode, generated blocks, called `debug_setHead(3)` → **5 repeated ERROR logs** 2. **After fix**: Same scenario → **4 DEBUG logs, no ERROR noise** ### Test Environment ```bash # Setup test environment rm -rf ./dev-test-data ./build/bin/geth --dev --datadir ./dev-test-data --http --http.api debug,eth,net,web3 --verbosity 4 # Generate test blocks and trigger issue curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_setHead","params":["0x3"],"id":1}' http://localhost:8545 ``` ## Related Issues - Fixes #31929 ## Additional Context This issue was reported as spurious error messages appearing after `debug_setHead` operations. The investigation revealed that while the error handling was functionally correct, the ERROR log level was inappropriate for this expected scenario in development/debugging workflows. The fix maintains full compatibility while significantly improving the debugging experience for developers using `debug_setHead`. --------- Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com> Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> * core/filtermaps: clean up log format of unindexing message (#32123) Sorry for not fully fixed in ethereum/go-ethereum#31761, now the log format of unindexing message is cleaned up, to make it consistent with the indexing message. * eth/catalyst: fix the log message in newPayloadV4 (#32125) It should be `newPayloadV4 must only be called for prague payloads` for the V4 payload error * refactor: replace []byte(fmt.Sprintf) with fmt.Appendf (bnb-chain#3136) * internal/ethapi: prealloc map for the txpool api (#32110) use `make(map, len(txpool))` to prealloc the map for the txpool content, to avoid the map growing in the loop. * ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021) Towards ethereum/go-ethereum#26974 --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> * ethdb: tuning pebble compaction parameter (bnb-chain#3205) * internal: remove unused shh and swarm modules from console (#32073) Similar to ethereum/go-ethereum#31856, remove the not availabe shh, swarm modules in the console. --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> * core/filtermaps: define APIs for map, epoch calculation (#31659) This pull request refines the filtermap implementation, defining key APIs for map and epoch calculations to improve readability. This pull request doesn't change any logic, it's a pure cleanup. --------- Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> * core/types: blockTimestamp in logs is hex-encoded (#32129) closes #32120 * core/rawdb, triedb/pathdb: fix two inaccurate comments (#32130) * refactor: remove outdated prune-block/pruneancient tool, implement it by tail-deletion (bnb-chain#2809) * eth/catalyst: fix edge case in simulated backend (#31871) geth cmd: `geth --dev --dev.period 5` call: `debug.setHead` to rollback several blocks. If the `debug.setHead` call is delayed, it will trigger a panic with a small probability, due to using the null point of `fcResponse.PayloadID`. --------- Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> * accounts/abi: generate TryPack* methods for abigen v2 bindings (#31692) 1. Fix the error return format. **todo**: ~~`bindtype` needs more complex logic to fix it.~~ ` if err != nil { return nil, err } if err == nil { return obj, nil } ` 2. ~~Return pointer type object to avoid copying the whole struct content.~~ 3. Give the panic decision to the user. 4. Fix empty line at the end of function. **TODO**: ~~fix some related test cases.~~ --------- Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com> * version: release go-ethereum v1.16.1 stable * params: only enable sharedStorage on special blocks (bnb-chain#3209) * consensus/parlia: warn fast node to update to latest hard fork version * chore: make function comment match function names (bnb-chain#3142) * feat: enable shared storage pool (bnb-chain#3197) * chore: fix some minor issues in the comments (bnb-chain#3216) * ethdb : disable blockstore of multidatabase (bnb-chain#3208) * refactor: use the built-in max/min to simplify the code (bnb-chain#3217) * p2p: treat all EVN peer as trust node; (bnb-chain#3212) * chore: fix struct comment (bnb-chain#3207) * jsutils: some minor updates (bnb-chain#3222) * chore: fix some comments (bnb-chain#3220) * doc: update go version required (bnb-chain#3224) * refactor: use slices.Contains to simplify code (bnb-chain#3223) * state: extra check for nano address (bnb-chain#3225) * release: prepare for release v1.5.18 (bnb-chain#3230) * chore: fix some typos (bnb-chain#3231) * ethdb: fix disable freezer when enable multidb (bnb-chain#3233) * build(deps): bump golang.org/x/oauth2 from 0.24.0 to 0.27.0 (bnb-chain#3243) * refactor: use maps.Copy for cleaner map handling (bnb-chain#3235) * freezer: change freeze batch size; (bnb-chain#3251) * release: prepare for release v1.5.19 (bnb-chain#3252) * jsutils: get slash count with specific step size and counter (bnb-chain#3256) * prestate_tracer.js: clean-up (bnb-chain#3257) * jsutil: fix a getSlashCount issue (bnb-chain#3267) * upstream: fix CIs after geth-v1.16.1 merged (#4) * workflows: remove check_tidy * all: fix compile error in test cases * CI: fix the lint CI * CI: rm .gitea * tests: update version of testdata to v17.0 * UT: fix core dir * fix eth dir * fix cmd dir * fix ethclient_test dir * tests: update spec-tests version * accounts: skip TestWaitDeployedCornerCases * CI: fix integration CI * core: remove duplicate codes * p2p: opt enr filter in peer discovery; (bnb-chain#3237) * prefetch: lower prefetch threshold from 100 to 50 (bnb-chain#3274) 100 was for previous 3 seconds block interval, with shorter block interval it is better to be a smaller value, could be helpful for bid simulate and block import * chore: fix some function names in comment (bnb-chain#3272) * core/rawdb: set multiDatabase properly when create ChainFreezer * core/rawdb: remove useless option multiDatabase for chainFreezer * core/rawdb: define useFinalizedForFreeze * all: initial rough correction for code upstream cmd/geth: disable ChainHistoryFlag cmd/utils: remove flag cache.enablesharedpool all: remove disableFreeze eth: disable blockRangeLoop core/vm: remove EVMPool core: new snapshot explicitly only with HashScheme core/filtermaps: leave a todo for filtermaps/checkpoints core: more threads for state prefetch eth: supress the useless lint for blockRangeLoop * eth: don't send BlockRangeUpdateMsg * eth/downloader: fix ancient limit in snap sync (#32188) This pull request fixes an issue in disabling direct-ancient mode in snap sync. Specifically, if `origin >= frozen && origin != 0`, it implies a part of chain data has been written into the key-value store, all the following writes into ancient store scheduled by downloader will be rejected with error `ERROR[07-10|03:46:57.924] Error importing chain data to ancients err="can't add block 1166 hash: the append operation is out-order: have 1166 want 0"`. This issue is detected by the https://github.com/ethpandaops/kurtosis-sync-test, which initiates the first snap sync cycle without the finalized header and implicitly disables the direct-ancient mode. A few seconds later the second snap sync cycle is initiated with the finalized information and direct-ancient mode is enabled incorrectly. * eth/fetcher: fix announcement drop logic (#32210) This PR fixes an issue in the tx_fetcher DoS prevention logic where the code keeps the overflow amount (`want - maxTxAnnounces`) instead of the allowed amount (`maxTxAnnounces - used`). The specific changes are: - Correct slice indexing in the announcement drop logic - Extend the overflow test case to cover the inversion scenario * all: fix outdated ethereum wiki json-rpc json-rpc doc links (#32209) Replace outdated wiki reference with ethereum.org documentation links * core/types: fix CellProofsAt method (#32198) * account/abi/bind/v2: fix TestDeploymentWithOverrides (#32212) The root cause of the flaky test was a nonce conflict caused by async contract deployments. This solution defines a custom deployer with automatic nonce management. * eth/tracers: apply block header overrides correctly (#32183) Fixes #32175. This fixes the scenario where the blockhash opcode would return 0x0 during RPC simulations when using BlockOverrides with a future block number. The root cause was that BlockOverrides.Apply() only modified the vm.BlockContext, but GetHashFn() depends on the actual types.Header.Number to resolve valid historical block hashes. This caused a mismatch and resulted in incorrect behavior during trace and call simulations. --------- Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: lightclient <lightclient@protonmail.com> * eth/protocols/snap: fix negative eta in state progress logging (#32225) * triedb/pathdb: fix incorrect address length in history searching (#32248) We should use account length to check address, else OOB maybe occured Signed-off-by: jsvisa <delweng@gmail.com> * eth/gasestimator: fix potential overflow (#32255) Improve binary search, preventing the potential overflow in certain L2 cases * triedb/pathdb: fix an deadlock in history indexer (#32260) Seems the `signal.result` was not sent back in shorten case, this will cause a deadlock. --------- Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * eth/catalyst: fix error message in ExecuteStatelessPayloadV4 (#32269) Correct the error message in the ExecuteStatelessPayloadV4 function to reference newPayloadV4 and the Prague fork, instead of incorrectly referencing newPayloadV3 and Cancun. This improves clarity during debugging and aligns the error message with the actual function and fork being validated. No logic is changed. --------- Co-authored-by: rjl493456442 <garyrong0905@gmail.com> * downloader: fix typos, grammar and formatting (#32288) * ethclient/simulated: Fix flaky rollback test (#32280) This PR addresses a flakiness in the rollback test discussed in ethereum/go-ethereum#32252 I found `nonce` collision caused transactions occasionally fail to send. I tried to change error message in the failed test like: ``` if err = client.SendTransaction(ctx, signedTx); err != nil { t.Fatalf("failed to send transaction: %v, nonce: %d", err, signedTx.Nonce()) } ``` and I occasionally got test failure with this message: ``` === CONT TestFlakyFunction/Run_#100 rollback_test.go:44: failed to send transaction: already known, nonce: 0 --- FAIL: TestFlakyFunction/Run_#100 (0.07s) ``` Although `nonces` are obtained via `PendingNonceAt`, we observed that, in rare cases (approximately 1 in 1000), two transactions from the same sender end up with the same nonce. This likely happens because `tx0` has not yet propagated to the transaction pool before `tx1` requests its nonce. When the test succeeds, `tx0` and `tx1` have nonces `0` and `1`, respectively. However, in rare failures, both transactions end up with nonce `0`. We modified the test to explicitly assign nonces to each transaction. By controlling the nonce values manually, we eliminated the race condition and ensured consistent behavior. After several thousand runs, the flakiness was no longer reproducible in my local environment. Reduced internal polling interval in `pendingStateHasTx()` to speed up test execution without impacting stability. It reduces test time for `TestTransactionRollbackBehavior` from about 7 seconds to 2 seconds. * eth: fix typos and outdated comments (#32324) * 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. * core/state: delete storagePool further * core: temporarily disable history pruning * core: clear up useless StopPrefetcher * ethdb: remove func HasAncient * core/rawdb: remove MultiDatabase in OpenOptions * core/rawdb: adapt the prune feature exsited in bsc * core: fix temporarily disable history pruning * core/state: not dump trie in fastnode * core/state: add a todo to refactor triePrefetcher * core/state: fix getting from cache when needBadSharedStorage * core: run repair for txIndex loop * core/vm: explict the configure of bigModExp precompile * triedb: align code more closely with geth * ethdb,trie: align code more closely with geth * params: define more forks * ethdb: add a todo to remove ItemAmountInAncient and AncientOffSet * core/types: disable EIP-7594 in BSC (bnb-chain#3291) * api.go: add retry for snapshots stale error (bnb-chain#3290) * fix: set all chain tables to be prunable (bnb-chain#3294) * core/fitermaps: fix final block logic * fix: only enable EVN feature after node get synced (bnb-chain#3309) to fix: bnb-chain#3303 the node will periodically failed to call stakehub before the node is synced * consensus/parlia: ignore client version warning when in history sync (bnb-chain#3308) * core/state: code clear up (bnb-chain#3313) * worker: fix a trie prefetch corner case (bnb-chain#3314) During mining phase, if a new block was just imported, TransferPrefetcher could transfer a TriePrefetcher of previous block to the new block, which would cause later error on OpenTrieStorage of the TriePrefetch routine. * docs: update readme for release types (bnb-chain#3315) * freezer: slow down freeze when live sync; (bnb-chain#3310) * core/filtermaps: stop indexing if target block is pruned * release: prepare for release v1.6.0-alpha (bnb-chain#3322) * ci: fix truffer error (bnb-chain#3326) solc-0.6.4 can not be downloaded from truffle solc-bin * ci: ignore nancy failre of rs/cors@v1.8.2 (bnb-chain#3327) It is an issue reported in rs/cors#170 and fixed by rs/cors#171, which was included in release v1.11.0(Apr 2024): https://github.com/rs/cors/releases/tag/v1.11.0 But v1.8.2 was released in Dec 2021, which may have a lot difference. And this vulnerability is limitted only to RPC nodes with maliciously configuration in config.tion: [Node] HTTPCors = ["<malicious cors>",...] So instead of upgrade to v1.11.0+, simply add it to nancy ignore for now * github: update issue template (bnb-chain#3328) * miner: avoid to commit a bid twice (bnb-chain#3336) * miner: avoid to commit a bid twice * core: wait db writing before setting head * miner: fix comment for tcount * miner: improve warn log for committed work * miner: add committed flag for environment * miner: improve func commit * eth/pebble: use NoSync as write mode (bnb-chain#3337) * FilterMap: update bsc checkpoint file (bnb-chain#3332) * eth/downloader: remove InsertHeaderChain to improve sync speed (bnb-chain#3324) * core/rawdb: remove func AncientOffSet and ItemAmountInAncient (bnb-chain#3319) * chore: fix some minor issues in comment (bnb-chain#3301) * cmd/geth: remove subcmd hbss2pbss and insecure-prune-all (bnb-chain#3346) * fix: discovery AyncFilter deadlock on shutdown (bnb-chain#3347) * core: rework fast node (bnb-chain#3340) * freezer: add debug log for out of bounds access (bnb-chain#3354) * core/rawdb: align more code with upstream (bnb-chain#3348) * log: lower the spam log level (bnb-chain#3357) * release: prepare for release v1.6.1-beta (bnb-chain#3355) * log: downgrade log level when header fetch failed (bnb-chain#3359) * chore: fix SnapSyncWithBlobs UT issues; (bnb-chain#3362) * cmd/utils: set journalfile default to true (bnb-chain#3361) * core/systemcontracts: define fermiUpgrade (bnb-chain#3372) * BEP-619: Short Block Interval Phase Three: 0.45 Seconds (bnb-chain#3367) * ethapi: reject oversize storage keys before hex decode (#32750) (bnb-chain#3373) Bail out of decodeHash when the raw hex string is longer than 32 byte before actually decoding. * Implement BEP-592: Non-Consensus Based Block-Level Access List (bnb-chain#3374) * BEP-590: Extended Voting Rules for Fast Finality Stability (bnb-chain#3368) * BEP-590: Extended Voting Rules for Fast Finality Stability * core/vote: update deadline for voting * websocket: add `transactionReceipts` for receipts notification (bnb-chain#3363) * miner/minerconfig: update config to adapt 100M gaslimit (bnb-chain#3388) * miner/minerconfig: update config to adapt 100M gaslimit * miner/minerconfig: update default GasCeil to 100M * miner/minerconfig: update comment * release: prepare for release v1.6.2 (bnb-chain#3386) * chore: cache receipts (bnb-chain#3391) * feat: implement incremental snapshot (bnb-chain#3390) * build(deps): bump github.com/quic-go/quic-go from 0.48.2 to 0.49.1 Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.48.2 to 0.49.1. - [Release notes](https://github.com/quic-go/quic-go/releases) - [Commits](quic-go/quic-go@v0.48.2...v0.49.1) --- updated-dependencies: - dependency-name: github.com/quic-go/quic-go dependency-version: 0.49.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * feat: EVM execution opcode level optimization (bnb-chain#3395) * fix: add secrets config to nancy ci (bnb-chain#3398) * consensus/parlia: set kAncestorGenerationDepth to 3 in BEP-590 (bnb-chain#3400) * consensus/parlia: fix updateAttestation&improve assembleVoteAttestation (bnb-chain#3397) * core/rawdb: fix WriteBAL (bnb-chain#3403) * miner: validator not inturn backoff before mining (bnb-chain#3404) * fix: change lock to read lock in legacypool (bnb-chain#3407) * miner: add metrics for get pending txs (bnb-chain#3410) * json-rpc-api.md: typo (bnb-chain#3409) * eth: broadcast votes to evn peers regardless of deltaTdThreshold (bnb-chain#3415) * cmd/geth: improve config for sentry nodes when init network (bnb-chain#3416) * jsutil: update some parameter (bnb-chain#3414) * p2p: define ProxyedNodeIds in Config (bnb-chain#3417) * p2p: define ProxyedNodeIds in Config * eth: downgrade log level for setProxyedPeers * cmd/geth: sentry not send txs to validator * cmd/geth: use static nodes when deploy without sentry * cmd/geth: fix TestInitNetworkLocalhost * eth: not broadcast txs directly to proxyed nodes * miner: use latest block as pending block for simplicity (bnb-chain#3419) * miner: use latest block as pending block for simplicity * miner: delete pendingLogs * miner: log time in header (bnb-chain#3422) Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com> * eth: increase the delta td threshold to broadcast votes (bnb-chain#3426) * config: update BSC Testnet hardfork time: Ferimi (bnb-chain#3427) expected Testnet Fermi hard fork time: 2025-11-10 02:25:00 AM UTC * miner: improve prefetch mining by using cached reader (bnb-chain#3423) * miner: improve prefetch mining by using cached reader * core/state: handle err when create StateDB for prefetch * core/state: use the same prefetcher when create state for prefetch * core: check statedb --------- Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com> * revert: revert the nano check in parlia (bnb-chain#3436) * eth: fix stuck when handleBlockBroadcast (bnb-chain#3435) * build(deps): bump github.com/consensys/gnark-crypto (bnb-chain#3429) Bumps [github.com/consensys/gnark-crypto](https://github.com/consensys/gnark-crypto) from 0.18.0 to 0.18.1. - [Release notes](https://github.com/consensys/gnark-crypto/releases) - [Changelog](https://github.com/Consensys/gnark-crypto/blob/v0.18.1/CHANGELOG.md) - [Commits](Consensys/gnark-crypto@v0.18.0...v0.18.1) --- updated-dependencies: - dependency-name: github.com/consensys/gnark-crypto dependency-version: 0.18.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * internal/ethapi: fix eth_simulateV1 (bnb-chain#3433) * eth/tracers: fix crasher in TraceCall with BlockOverrides (bnb-chain#3431) * release: prepare for release v1.6.3 (bnb-chain#3437) * cmd/jsutils: adjust nodereal builders (bnb-chain#3447) * cmd/utils: define OverrideOsaka (bnb-chain#3446) * consensus/parlia: filter by source number when fetching votes (bnb-chain#3449) * TxPool: change lifetime back to 3 hours (bnb-chain#3448) rollback the lifetime change made in PR#3111 3 hours could be reasonable for non-validator nodes * cmd/geth: stop supporting multidatabase flag (bnb-chain#3457) * build(deps): bump golang.org/x/crypto from 0.36.0 to 0.45.0 (bnb-chain#3456) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.36.0 to 0.45.0. - [Commits](golang/crypto@v0.36.0...v0.45.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.45.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: lx <92799281+brilliant-lx@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * params: define MendelTime (bnb-chain#3458) * eth: support fetch commit id info from extra data (bnb-chain#3454) * eth: improve prefetch by using cached reader (bnb-chain#3445) * eth: fix stuck when starting up a new network (bnb-chain#3460) * eth: fix stuck when starting up a new network * eth: fix UT * eth: improve fixing UT * feat: transactionReceipts auto-unsubscribe implementation (bnb-chain#3459) * cmd/geth: config staticnodes for fullnode when init-network (bnb-chain#3462) * refactor: replace context.WithCancel with t.Context (bnb-chain#3285) Signed-off-by: hongmengning <hongmengning@outlook.com> * refactor: use slices.Contains to simplify code (bnb-chain#3245) Signed-off-by: stellrust <gohunter@foxmail.com> * refactor: replace Split in loops with more efficient SplitSeq (bnb-chain#3262) * refactor: replace Split in loops with more efficient SplitSeq Signed-off-by: pinglanlu <pinglanlu@outlook.com> * Update node/api.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: pinglanlu <pinglanlu@outlook.com> Co-authored-by: buddho <7995985+buddh0@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: drop legacy // +build comment (bnb-chain#3464) Signed-off-by: rifeplight <rifeplight@outlook.com> * config: update BSC Mainnet hardfork time: Fermi (bnb-chain#3466) * metric: add metric for vote count (bnb-chain#3468) * metric: add metric for vote count * metric: add metric for vote count * .github/workflows: replace BLS for Windows (bnb-chain#3467) * release: prepare for release v1.6.4 (bnb-chain#3470) * release: prepare for release v1.6.4 * version: update version * fix: fix the flag docment (bnb-chain#3472) * feat: add enableMIR in config.toml * fix: fix compilation issue after merge from master --------- Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> Signed-off-by: jsvisa <delweng@gmail.com> Signed-off-by: Delweng <delweng@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: hongmengning <hongmengning@outlook.com> Signed-off-by: stellrust <gohunter@foxmail.com> Signed-off-by: pinglanlu <pinglanlu@outlook.com> Signed-off-by: rifeplight <rifeplight@outlook.com> Co-authored-by: Felix Lange <fjl@twurst.com> Co-authored-by: cz <wylbzc4928@gmail.com> Co-authored-by: rjl493456442 <garyrong0905@gmail.com> Co-authored-by: Herbert <herbert.jordan.jun@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kevaundray <kevtheappdev@gmail.com> Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> Co-authored-by: levisyin <lilassherl@gmail.com> Co-authored-by: nthumann <nthumanna@gmail.com> Co-authored-by: Stephen Buttolph <stephen@avalabs.org> Co-authored-by: Delweng <delweng@gmail.com> Co-authored-by: 曹家巧 <caojiaqiao@outlook.com> Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com> Co-authored-by: zzzckck <152148891+zzzckck@users.noreply.github.com> Co-authored-by: buddh0 <galaxystroller@gmail.com> Co-authored-by: zhiqiangxu <652732310@qq.com> Co-authored-by: maskpp <maskpp266@gmail.com> Co-authored-by: Antonio Sanso <antonio.sanso@gmail.com> Co-authored-by: Ha DANG <dvietha@gmail.com> Co-authored-by: prpeh <prpeh@proton.me> Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com> Co-authored-by: Csaba Kiraly <cskiraly@users.noreply.github.com> Co-authored-by: GarmashAlex <garmasholeksii@gmail.com> Co-authored-by: Mars <zhaolei@pm.me> Co-authored-by: shazam8253 <54690736+shazam8253@users.noreply.github.com> Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com> Co-authored-by: Matus Kysel <MatusKysel@users.noreply.github.com> Co-authored-by: Stéphane Duchesneau <stephane.duchesneau@gmail.com> Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org> Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> Co-authored-by: chengehe <hechenge@yeah.net> Co-authored-by: will-2012 <117156346+will-2012@users.noreply.github.com> Co-authored-by: Forrest Kim <38067691+ForrestKim42@users.noreply.github.com> Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com> Co-authored-by: clonemycode <168618167+clonemycode@users.noreply.github.com> Co-authored-by: wayen <19421226+flywukong@users.noreply.github.com> Co-authored-by: Zhou <DanialZhouMAX@gmail.com> Co-authored-by: galaio <12880651+galaio@users.noreply.github.com> Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com> Co-authored-by: findmyhappy <167661649+findmyhappy@users.noreply.github.com> Co-authored-by: shangchenglumetro <shuang.cui@live.com> Co-authored-by: rustfix <155627174+rustfix@users.noreply.github.com> Co-authored-by: ianlv <168640168+ianlv@users.noreply.github.com> Co-authored-by: Hanlu <liangmulu@outlook.com> Co-authored-by: formless <213398294+allformless@users.noreply.github.com> Co-authored-by: 荆长逯 <jingchanglu@outlook.com> Co-authored-by: kaifulee <52813034+kaifulee@users.noreply.github.com> Co-authored-by: Anna Smith <155628741+socialsister@users.noreply.github.com> Co-authored-by: Eric <45141191+zlacfzy@users.noreply.github.com> Co-authored-by: tanhuaan <tanhuaan@outlook.com> Co-authored-by: Bosul Mun <bsbs8645@snu.ac.kr> Co-authored-by: FT <140458077+zeevick10@users.noreply.github.com> Co-authored-by: steven <wangpeculiar@gmail.com> Co-authored-by: lightclient <lightclient@protonmail.com> Co-authored-by: gzeon <h@arry.io> Co-authored-by: Galoretka <galoretochka@gmail.com> Co-authored-by: Tomás Andróil <tomasandroil@gmail.com> Co-authored-by: kashitaka <takao.w9st.kashima@xica.net> Co-authored-by: VM <112189277+sysvm@users.noreply.github.com> Co-authored-by: alex-10072 <ttalex101@gmail.com> Co-authored-by: deepdring <deepdrink@icloud.com> Co-authored-by: lx <92799281+brilliant-lx@users.noreply.github.com> Co-authored-by: david-ppp <164000748+david-ppp@users.noreply.github.com> Co-authored-by: constwz <122766871+constwz@users.noreply.github.com> Co-authored-by: Roshan <48975233+pythonberg1997@users.noreply.github.com> Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com> Co-authored-by: hongmengning <hongmengning@outlook.com> Co-authored-by: stellrust <gohunter@foxmail.com> Co-authored-by: pinglanlu <pinglanlu@outlook.com> Co-authored-by: buddho <7995985+buddh0@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: rifeplight <rifeplight@outlook.com>
gabuladze
added a commit
to chiliz-chain/v2
that referenced
this pull request
Dec 12, 2025
#1) * eth/tracers: prestate lookup EIP7702 delegation account (#32080) Implement ethereum/go-ethereum#32078 Parse and lookup the delegation account if EIP7702 is enabled. --------- Signed-off-by: jsvisa <delweng@gmail.com> * cmd/geth: era-download logic fix (#32081) Downloading from a range was failing because it would return and error early with an error misinterpreting "start-end". --------- Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * core: warm key TransactionIndexTail by writing (#3196) * miner: default gaslimit 45M (#32087) We believe it is safe to raise the gaslimit to 45M before the Fusaka fork. So this PR changes the default to 45M. * core/rawdb, triedb/pathdb: implement history indexer (#31156) This pull request is part-1 for shipping the core part of archive node in PBSS mode. * cmd/geth, triedb: add pathdb state verification (#32086) This pull request ports the snapshot iteration logic from the legacy implementation. * core, consensus/beacon: defer trie resolution (#31725) Previously, the account trie for a given state root was resolved immediately when the stateDB was created, implying that the trie was always required by the stateDB. However, this assumption no longer holds, especially for path archive nodes, where historical states can be accessed even if the corresponding trie data does not exist. * cmd/utils: fix formatting for beacon flag errors to fit Fatalf form (#32090) Noticed that the errors for the blsync flags were not formatted correctly for `Fatalf(..)`. * eth, triedb/pathdb: permit write buffer allowance in PBSS archive mode (#32091) This pull request fixes a flaw in PBSS archive mode that significantly degrades performance when the mode is enabled. Originally, in hash mode, the dirty trie cache is completely disabled when archive mode is active, in order to disable the in-memory garbage collection mechanism. However, the internal logic in path mode differs significantly, and the dirty trie node cache is essential for maintaining chain insertion performance. Therefore, the cache is now retained in path mode. * core, eth, triedb: serve historical states over RPC (#31161) This is the part-2 for archive node over path mode, which ultimately ships the functionality to serve the historical states * triedb/pathdb: fix journal resolution in pathdb (#32097) This pull request fixes a flaw in the PBSS state iterator, which could return empty account or storage data. In PBSS, multiple in-memory diff layers and a write buffer are maintained. These layers are persisted to the database and reloaded after node restarts. However, since the state data is encoded using RLP, the distinction between nil and an empty byte slice is lost during the encode/decode process. As a result, invalid state values such as `[]byte{}` can appear in PBSS and ultimately be returned by the state iterator. Checkout https://github.com/ethereum/go-ethereum/blob/master/triedb/pathdb/iterator_fast.go#L270 for more iterator details. It's a long-term existent issue and now be activated since the snapshot integration. The error `err="range contains deletion"` will occur when Geth tries to serve other peers with SNAP protocol request. --------- Co-authored-by: Felix Lange <fjl@twurst.com> * all: incorporate state history indexing status into eth_syncing response (#32099) This pull request tracks the state indexing progress in eth_syncing RPC response, i.e. we will return non-null syncing status until indexing has finished. * version: release go-ethereum v1.16.0 stable * version: begin v1.16.1 release cycle * .gitea: trigger PPA upload on tag * .travis.yml: remove travis configuration * hash: remove caching that was decreasing perf (#3146) * all: replace override.prague with osaka (#32093) replace `--override.prague` with `--override.osaka` Signed-off-by: jsvisa <delweng@gmail.com> * node: do not double-wrap KV stores (#32089) For no apparent reason, KV stores were getting wrapped in `nofreezedb` first and then in `freezerdb`. * eth: correct tracer initialization in BlockchainConfig (#32107) core.BlockChainConfig.VmConfig is not a pointer, so setting the Tracer on the `vmConfig` object after it was passed to options does *not* apply it to options.VmConfig This fixes the issue by setting the value directly inside the `options` object and removing the confusing `vmConfig` variable to prevent further mistakes. * miner: fix metric simulateSpeedGauge * .gitea: switch release builds to static linking (#32118) This is to avoid compatibility issues with mismatched glibc versions between the builder and deployment target. Fixes #32102 * .gitea: fix 386 upload * all: clear up `Verify Node` logic (#3199) * miner: change default mev config (#3143) * .gitea: disable cron schedule * triedb: reset state indexer after snap synced (#32104) Fix the issue after initial snap sync with `gcmode=archive` enabled. ``` NewPayload: inserting block failed error="history indexing is out of order, last: null, requested: 1" ``` --------- Signed-off-by: Delweng <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * eth/filters: add address limit to filters (#31876) The address filter was never checked against a maximum limit, which can be somewhat abusive for API nodes. This PR adds a limit similar to topics This pull request introduces a new validation to enforce a maximum limit on the number of addresses allowed in filter criteria for Ethereum logs. It includes updates to the `FilterAPI` and `EventSystem` logic, as well as corresponding test cases to ensure the new constraint is properly enforced. * **Validation for maximum addresses in filter criteria**: - Added a new constant, `maxAddresses`, set to 100, to define the maximum allowable addresses in a filter. - Introduced a new error, `errExceedMaxAddresses`, to handle cases where the number of addresses exceeds the limit. - Updated the `GetLogs` method in `FilterAPI` to validate the number of addresses against `maxAddresses`. - Modified the `UnmarshalJSON` method to return an error if the number of addresses in the input JSON exceeds `maxAddresses`. - Added similar validation to the `SubscribeLogs` method in `EventSystem`. * **New test cases for address limit validation**: - Added a test in `TestUnmarshalJSONNewFilterArgs` to verify that exceeding the maximum number of addresses triggers the `errExceedMaxAddresses` error. - Updated `TestInvalidLogFilterCreation` to include a test case for an invalid filter with more than `maxAddresses` addresses. - Updated `TestInvalidGetLogsRequest` to test for invalid log requests with excessive addresses. These changes ensure that the system enforces a reasonable limit on the number of addresses in filter criteria, improving robustness and preventing potential performance issues. --------- Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> * miner: only recommit bids when no error happens (#3204) * chore: fix problematic comment (#3189) * chore: fix duplicated counter (#3187) * Fix log indexer noise after debug_setHead operations (#31934) This PR resolves Issue #31929 by reducing log noise generated by the log indexer after `debug_setHead` operations. When `debug_setHead` is called to rewind the blockchain, blocks are removed from the database. However, the log indexer's `ChainView` objects may still hold references to these deleted blocks. When `extendNonCanonical()` attempts to access these missing headers, it results in: 1. **Repeated ERROR logs**: `Header not found number=X hash=0x...` 2. **Log noise** that can mask other important errors 3. **User confusion** about whether this indicates a real problem The issue occurs because: - `debug_setHead` removes blocks from the blockchain database - Log indexer's `ChainView` may still reference deleted block hashes - `extendNonCanonical()` in `core/filtermaps/chain_view.go` tries to fetch these missing headers - The existing `return false` logic properly handles the error, but logs at ERROR level This is a **logging improvement only** - no functional logic changes: 1. **Log level**: Changed from `ERROR` to `DEBUG` 2. **Log message**: Enhanced with descriptive context about chain view extension 3. **Comments**: Added explanation for when this situation occurs 4. **Behavior**: Maintains existing error handling (`return false` was already present) ```go // Before log.Error("Header not found", "number", number, "hash", hash) return false // After // Header not found - this can happen after debug_setHead operations // where blocks have been deleted. Return false to indicate the chain view // is no longer valid rather than logging repeated errors. log.Debug("Header not found during chain view extension", "number", number, "hash", hash) return false ``` - ✅ All existing filtermaps tests pass: `go test ./core/filtermaps -v` - ✅ No regressions in related functionality 1. **Before fix**: Started geth in dev mode, generated blocks, called `debug_setHead(3)` → **5 repeated ERROR logs** 2. **After fix**: Same scenario → **4 DEBUG logs, no ERROR noise** ```bash rm -rf ./dev-test-data ./build/bin/geth --dev --datadir ./dev-test-data --http --http.api debug,eth,net,web3 --verbosity 4 curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_setHead","params":["0x3"],"id":1}' http://localhost:8545 ``` - Fixes #31929 This issue was reported as spurious error messages appearing after `debug_setHead` operations. The investigation revealed that while the error handling was functionally correct, the ERROR log level was inappropriate for this expected scenario in development/debugging workflows. The fix maintains full compatibility while significantly improving the debugging experience for developers using `debug_setHead`. --------- Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com> Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> * core/filtermaps: clean up log format of unindexing message (#32123) Sorry for not fully fixed in ethereum/go-ethereum#31761, now the log format of unindexing message is cleaned up, to make it consistent with the indexing message. * eth/catalyst: fix the log message in newPayloadV4 (#32125) It should be `newPayloadV4 must only be called for prague payloads` for the V4 payload error * refactor: replace []byte(fmt.Sprintf) with fmt.Appendf (#3136) * internal/ethapi: prealloc map for the txpool api (#32110) use `make(map, len(txpool))` to prealloc the map for the txpool content, to avoid the map growing in the loop. * ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021) Towards ethereum/go-ethereum#26974 --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> * ethdb: tuning pebble compaction parameter (#3205) * internal: remove unused shh and swarm modules from console (#32073) Similar to ethereum/go-ethereum#31856, remove the not availabe shh, swarm modules in the console. --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> * core/filtermaps: define APIs for map, epoch calculation (#31659) This pull request refines the filtermap implementation, defining key APIs for map and epoch calculations to improve readability. This pull request doesn't change any logic, it's a pure cleanup. --------- Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> * core/types: blockTimestamp in logs is hex-encoded (#32129) closes #32120 * core/rawdb, triedb/pathdb: fix two inaccurate comments (#32130) * refactor: remove outdated prune-block/pruneancient tool, implement it by tail-deletion (#2809) * eth/catalyst: fix edge case in simulated backend (#31871) geth cmd: `geth --dev --dev.period 5` call: `debug.setHead` to rollback several blocks. If the `debug.setHead` call is delayed, it will trigger a panic with a small probability, due to using the null point of `fcResponse.PayloadID`. --------- Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> * accounts/abi: generate TryPack* methods for abigen v2 bindings (#31692) 1. Fix the error return format. **todo**: ~~`bindtype` needs more complex logic to fix it.~~ ` if err != nil { return nil, err } if err == nil { return obj, nil } ` 2. ~~Return pointer type object to avoid copying the whole struct content.~~ 3. Give the panic decision to the user. 4. Fix empty line at the end of function. **TODO**: ~~fix some related test cases.~~ --------- Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com> * version: release go-ethereum v1.16.1 stable * params: only enable sharedStorage on special blocks (#3209) * consensus/parlia: warn fast node to update to latest hard fork version * chore: make function comment match function names (#3142) * feat: enable shared storage pool (#3197) * chore: fix some minor issues in the comments (#3216) * ethdb : disable blockstore of multidatabase (#3208) * refactor: use the built-in max/min to simplify the code (#3217) * p2p: treat all EVN peer as trust node; (#3212) * chore: fix struct comment (#3207) * jsutils: some minor updates (#3222) * chore: fix some comments (#3220) * doc: update go version required (#3224) * refactor: use slices.Contains to simplify code (#3223) * state: extra check for nano address (#3225) * release: prepare for release v1.5.18 (#3230) * chore: fix some typos (#3231) * ethdb: fix disable freezer when enable multidb (#3233) * build(deps): bump golang.org/x/oauth2 from 0.24.0 to 0.27.0 (#3243) * refactor: use maps.Copy for cleaner map handling (#3235) * freezer: change freeze batch size; (#3251) * release: prepare for release v1.5.19 (#3252) * jsutils: get slash count with specific step size and counter (#3256) * prestate_tracer.js: clean-up (#3257) * Fixed parseValidatorFrequencies() * jsutil: fix a getSlashCount issue (#3267) * upstream: fix CIs after geth-v1.16.1 merged (#4) * workflows: remove check_tidy * all: fix compile error in test cases * CI: fix the lint CI * CI: rm .gitea * tests: update version of testdata to v17.0 * UT: fix core dir * fix eth dir * fix cmd dir * fix ethclient_test dir * tests: update spec-tests version * accounts: skip TestWaitDeployedCornerCases * CI: fix integration CI * core: remove duplicate codes * p2p: opt enr filter in peer discovery; (#3237) * prefetch: lower prefetch threshold from 100 to 50 (#3274) 100 was for previous 3 seconds block interval, with shorter block interval it is better to be a smaller value, could be helpful for bid simulate and block import * chore: fix some function names in comment (#3272) * feat: SuperInstruction implementation in EVM (#3260) * feat: opcode optimization master squash (#3259) * feat: patch opcode optimization Co-authored-by: cbh876 <3930922419@qq.com> Co-authored-by: Sunny <sunny2022.za@gmail.com> Co-authored-by: constwz <122766871+constwz@users.noreply.github.com> * core/rawdb: set multiDatabase properly when create ChainFreezer * core/rawdb: remove useless option multiDatabase for chainFreezer * core/rawdb: define useFinalizedForFreeze * core/state: Added GetOrNewStateObject() back * all: initial rough correction for code upstream cmd/geth: disable ChainHistoryFlag cmd/utils: remove flag cache.enablesharedpool all: remove disableFreeze eth: disable blockRangeLoop core/vm: remove EVMPool core: new snapshot explicitly only with HashScheme core/filtermaps: leave a todo for filtermaps/checkpoints core: more threads for state prefetch eth: supress the useless lint for blockRangeLoop * eth: don't send BlockRangeUpdateMsg * eth/downloader: fix ancient limit in snap sync (#32188) This pull request fixes an issue in disabling direct-ancient mode in snap sync. Specifically, if `origin >= frozen && origin != 0`, it implies a part of chain data has been written into the key-value store, all the following writes into ancient store scheduled by downloader will be rejected with error `ERROR[07-10|03:46:57.924] Error importing chain data to ancients err="can't add block 1166 hash: the append operation is out-order: have 1166 want 0"`. This issue is detected by the https://github.com/ethpandaops/kurtosis-sync-test, which initiates the first snap sync cycle without the finalized header and implicitly disables the direct-ancient mode. A few seconds later the second snap sync cycle is initiated with the finalized information and direct-ancient mode is enabled incorrectly. * eth/fetcher: fix announcement drop logic (#32210) This PR fixes an issue in the tx_fetcher DoS prevention logic where the code keeps the overflow amount (`want - maxTxAnnounces`) instead of the allowed amount (`maxTxAnnounces - used`). The specific changes are: - Correct slice indexing in the announcement drop logic - Extend the overflow test case to cover the inversion scenario * all: fix outdated ethereum wiki json-rpc json-rpc doc links (#32209) Replace outdated wiki reference with ethereum.org documentation links * core/types: fix CellProofsAt method (#32198) * account/abi/bind/v2: fix TestDeploymentWithOverrides (#32212) The root cause of the flaky test was a nonce conflict caused by async contract deployments. This solution defines a custom deployer with automatic nonce management. * eth/tracers: apply block header overrides correctly (#32183) Fixes #32175. This fixes the scenario where the blockhash opcode would return 0x0 during RPC simulations when using BlockOverrides with a future block number. The root cause was that BlockOverrides.Apply() only modified the vm.BlockContext, but GetHashFn() depends on the actual types.Header.Number to resolve valid historical block hashes. This caused a mismatch and resulted in incorrect behavior during trace and call simulations. --------- Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: lightclient <lightclient@protonmail.com> * eth/protocols/snap: fix negative eta in state progress logging (#32225) * triedb/pathdb: fix incorrect address length in history searching (#32248) We should use account length to check address, else OOB maybe occured Signed-off-by: jsvisa <delweng@gmail.com> * eth/gasestimator: fix potential overflow (#32255) Improve binary search, preventing the potential overflow in certain L2 cases * triedb/pathdb: fix an deadlock in history indexer (#32260) Seems the `signal.result` was not sent back in shorten case, this will cause a deadlock. --------- Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * eth/catalyst: fix error message in ExecuteStatelessPayloadV4 (#32269) Correct the error message in the ExecuteStatelessPayloadV4 function to reference newPayloadV4 and the Prague fork, instead of incorrectly referencing newPayloadV3 and Cancun. This improves clarity during debugging and aligns the error message with the actual function and fork being validated. No logic is changed. --------- Co-authored-by: rjl493456442 <garyrong0905@gmail.com> * downloader: fix typos, grammar and formatting (#32288) * ethclient/simulated: Fix flaky rollback test (#32280) This PR addresses a flakiness in the rollback test discussed in ethereum/go-ethereum#32252 I found `nonce` collision caused transactions occasionally fail to send. I tried to change error message in the failed test like: ``` if err = client.SendTransaction(ctx, signedTx); err != nil { t.Fatalf("failed to send transaction: %v, nonce: %d", err, signedTx.Nonce()) } ``` and I occasionally got test failure with this message: ``` === CONT TestFlakyFunction/Run_#100 rollback_test.go:44: failed to send transaction: already known, nonce: 0 --- FAIL: TestFlakyFunction/Run_#100 (0.07s) ``` Although `nonces` are obtained via `PendingNonceAt`, we observed that, in rare cases (approximately 1 in 1000), two transactions from the same sender end up with the same nonce. This likely happens because `tx0` has not yet propagated to the transaction pool before `tx1` requests its nonce. When the test succeeds, `tx0` and `tx1` have nonces `0` and `1`, respectively. However, in rare failures, both transactions end up with nonce `0`. We modified the test to explicitly assign nonces to each transaction. By controlling the nonce values manually, we eliminated the race condition and ensured consistent behavior. After several thousand runs, the flakiness was no longer reproducible in my local environment. Reduced internal polling interval in `pendingStateHasTx()` to speed up test execution without impacting stability. It reduces test time for `TestTransactionRollbackBehavior` from about 7 seconds to 2 seconds. * eth: fix typos and outdated comments (#32324) * 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. * core/state: delete storagePool further * core: temporarily disable history pruning * core: clear up useless StopPrefetcher * ethdb: remove func HasAncient * core/rawdb: remove MultiDatabase in OpenOptions * core/rawdb: adapt the prune feature exsited in bsc * core: fix temporarily disable history pruning * core/state: not dump trie in fastnode * core/state: add a todo to refactor triePrefetcher * core/state: fix getting from cache when needBadSharedStorage * core: run repair for txIndex loop * core/vm: explict the configure of bigModExp precompile * triedb: align code more closely with geth * ethdb,trie: align code more closely with geth * params: define more forks * ethdb: add a todo to remove ItemAmountInAncient and AncientOffSet * Deleted les * Deleted light * Replaced faucet code with latest version from bsc * core/types: disable EIP-7594 in BSC (#3291) * Fixed incValidatorBlockCount * api.go: add retry for snapshots stale error (#3290) * fix: set all chain tables to be prunable (#3294) * Removed redundant metric code. Fixed snake8 fork name. * core/fitermaps: fix final block logic * Use epoch length from genesis instead of default value 200. * Added back log * fix: only enable EVN feature after node get synced (#3309) to fix: bnb-chain/bsc#3303 the node will periodically failed to call stakehub before the node is synced * consensus/parlia: ignore client version warning when in history sync (#3308) * core/state: code clear up (#3313) * worker: fix a trie prefetch corner case (#3314) During mining phase, if a new block was just imported, TransferPrefetcher could transfer a TriePrefetcher of previous block to the new block, which would cause later error on OpenTrieStorage of the TriePrefetch routine. * docs: update readme for release types (#3315) * freezer: slow down freeze when live sync; (#3310) * core/filtermaps: stop indexing if target block is pruned * release: prepare for release v1.6.0-alpha (#3322) * ci: fix truffer error (#3326) solc-0.6.4 can not be downloaded from truffle solc-bin * ci: ignore nancy failre of rs/cors@v1.8.2 (#3327) It is an issue reported in rs/cors#170 and fixed by rs/cors#171, which was included in release v1.11.0(Apr 2024): https://github.com/rs/cors/releases/tag/v1.11.0 But v1.8.2 was released in Dec 2021, which may have a lot difference. And this vulnerability is limitted only to RPC nodes with maliciously configuration in config.tion: [Node] HTTPCors = ["<malicious cors>",...] So instead of upgrade to v1.11.0+, simply add it to nancy ignore for now * github: update issue template (#3328) * miner: avoid to commit a bid twice (#3336) * miner: avoid to commit a bid twice * core: wait db writing before setting head * miner: fix comment for tcount * miner: improve warn log for committed work * miner: add committed flag for environment * miner: improve func commit * eth/pebble: use NoSync as write mode (#3337) * FilterMap: update bsc checkpoint file (#3332) * Override defaultEpochLength with value from genesis config and use it in snapshot(). * eth/downloader: remove InsertHeaderChain to improve sync speed (#3324) * core/rawdb: remove func AncientOffSet and ItemAmountInAncient (#3319) * chore: fix some minor issues in comment (#3301) * cmd/geth: remove subcmd hbss2pbss and insecure-prune-all (#3346) * fix: discovery AyncFilter deadlock on shutdown (#3347) * core: rework fast node (#3340) * Don't overwrite snap.FrequencyRLP if it's already defined in snapshot() * freezer: add debug log for out of bounds access (#3354) * core/rawdb: align more code with upstream (#3348) * log: lower the spam log level (#3357) * release: prepare for release v1.6.1-beta (#3355) * log: downgrade log level when header fetch failed (#3359) * chore: fix SnapSyncWithBlobs UT issues; (#3362) * cmd/utils: set journalfile default to true (#3361) * core/systemcontracts: define fermiUpgrade (#3372) * BEP-619: Short Block Interval Phase Three: 0.45 Seconds (#3367) * ethapi: reject oversize storage keys before hex decode (#32750) (#3373) Bail out of decodeHash when the raw hex string is longer than 32 byte before actually decoding. * Implement BEP-592: Non-Consensus Based Block-Level Access List (#3374) * BEP-590: Extended Voting Rules for Fast Finality Stability (#3368) * BEP-590: Extended Voting Rules for Fast Finality Stability * core/vote: update deadline for voting * websocket: add `transactionReceipts` for receipts notification (#3363) * miner/minerconfig: update config to adapt 100M gaslimit (#3388) * miner/minerconfig: update config to adapt 100M gaslimit * miner/minerconfig: update default GasCeil to 100M * miner/minerconfig: update comment * release: prepare for release v1.6.2 (#3386) * chore: cache receipts (#3391) * feat: implement incremental snapshot (#3390) * build(deps): bump github.com/quic-go/quic-go from 0.48.2 to 0.49.1 Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.48.2 to 0.49.1. - [Release notes](https://github.com/quic-go/quic-go/releases) - [Commits](quic-go/quic-go@v0.48.2...v0.49.1) --- updated-dependencies: - dependency-name: github.com/quic-go/quic-go dependency-version: 0.49.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * feat: EVM execution opcode level optimization (#3395) * fix: add secrets config to nancy ci (#3398) * consensus/parlia: set kAncestorGenerationDepth to 3 in BEP-590 (#3400) * consensus/parlia: fix updateAttestation&improve assembleVoteAttestation (#3397) * core/rawdb: fix WriteBAL (#3403) * miner: validator not inturn backoff before mining (#3404) * fix: change lock to read lock in legacypool (#3407) * miner: add metrics for get pending txs (#3410) * json-rpc-api.md: typo (#3409) * eth: broadcast votes to evn peers regardless of deltaTdThreshold (#3415) * cmd/geth: improve config for sentry nodes when init network (#3416) * jsutil: update some parameter (#3414) * p2p: define ProxyedNodeIds in Config (#3417) * p2p: define ProxyedNodeIds in Config * eth: downgrade log level for setProxyedPeers * cmd/geth: sentry not send txs to validator * cmd/geth: use static nodes when deploy without sentry * cmd/geth: fix TestInitNetworkLocalhost * eth: not broadcast txs directly to proxyed nodes * miner: use latest block as pending block for simplicity (#3419) * miner: use latest block as pending block for simplicity * miner: delete pendingLogs * miner: log time in header (#3422) Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com> * eth: increase the delta td threshold to broadcast votes (#3426) * config: update BSC Testnet hardfork time: Ferimi (#3427) expected Testnet Fermi hard fork time: 2025-11-10 02:25:00 AM UTC * miner: improve prefetch mining by using cached reader (#3423) * miner: improve prefetch mining by using cached reader * core/state: handle err when create StateDB for prefetch * core/state: use the same prefetcher when create state for prefetch * core: check statedb --------- Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com> * revert: revert the nano check in parlia (#3436) * eth: fix stuck when handleBlockBroadcast (#3435) * build(deps): bump github.com/consensys/gnark-crypto (#3429) Bumps [github.com/consensys/gnark-crypto](https://github.com/consensys/gnark-crypto) from 0.18.0 to 0.18.1. - [Release notes](https://github.com/consensys/gnark-crypto/releases) - [Changelog](https://github.com/Consensys/gnark-crypto/blob/v0.18.1/CHANGELOG.md) - [Commits](Consensys/gnark-crypto@v0.18.0...v0.18.1) --- updated-dependencies: - dependency-name: github.com/consensys/gnark-crypto dependency-version: 0.18.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * internal/ethapi: fix eth_simulateV1 (#3433) * eth/tracers: fix crasher in TraceCall with BlockOverrides (#3431) * release: prepare for release v1.6.3 (#3437) * Revert "Merge tag 'v1.5.19-feature-SI' into BLK-3623-pull-all-the-latest-changes-from-bsc" This reverts commit 9405e8b660b855a80142886af78946a4ba343489, reversing changes made to 00587bcb63a3551db2501d236e6da4716d791afd. * Set static IPs for nodes to workaroud DNS resolution issue with bootnodes flag. go-ethereum#31208 * Updated chiliz related evm modifications to work with v1.6.0 * Fixed invalid FrequencyRLP issue in snapshot * Moved pepper8RecipientAddress to common/pepper8. Updated state_transition::preCheck() to handle pepper8 transactions correctly. * Reduced GetPepper8MintAmount log verbosity Info->Trace * Removed redundant balace update code for system transactions from tracers * Updated evm::Call() to call applyChilizInvocationEvmHook() for smart contract calls only. This fixes "incorrect number of top level calls" error when tracing EOA->EOA transfers. * eth/tracers: Fixed traceBlock * eth/tracers: Fixed all tracers for pepper8 & system txs * Fixed lint errors * go mod tidy * Removed custom block distribution metric collection code * upgrade golang from 1.21-alpine to 1.25.5-alpine * Set version to 2.7.0 * Set genesis repo to v4.0.1 --------- Signed-off-by: jsvisa <delweng@gmail.com> Signed-off-by: Delweng <delweng@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Delweng <delweng@gmail.com> Co-authored-by: shazam8253 <54690736+shazam8253@users.noreply.github.com> Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> Co-authored-by: buddho <galaxystroller@gmail.com> Co-authored-by: Felix Lange <fjl@twurst.com> Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com> Co-authored-by: Matus Kysel <MatusKysel@users.noreply.github.com> Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com> Co-authored-by: Stéphane Duchesneau <stephane.duchesneau@gmail.com> Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org> Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> Co-authored-by: chengehe <hechenge@yeah.net> Co-authored-by: will-2012 <117156346+will-2012@users.noreply.github.com> Co-authored-by: Forrest Kim <38067691+ForrestKim42@users.noreply.github.com> Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com> Co-authored-by: nthumann <nthumanna@gmail.com> Co-authored-by: clonemycode <168618167+clonemycode@users.noreply.github.com> Co-authored-by: wayen <19421226+flywukong@users.noreply.github.com> Co-authored-by: Zhou <DanialZhouMAX@gmail.com> Co-authored-by: galaio <12880651+galaio@users.noreply.github.com> Co-authored-by: maskpp <maskpp266@gmail.com> Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com> Co-authored-by: findmyhappy <167661649+findmyhappy@users.noreply.github.com> Co-authored-by: shangchenglumetro <shuang.cui@live.com> Co-authored-by: rustfix <155627174+rustfix@users.noreply.github.com> Co-authored-by: ianlv <168640168+ianlv@users.noreply.github.com> Co-authored-by: zzzckck <152148891+zzzckck@users.noreply.github.com> Co-authored-by: Hanlu <liangmulu@outlook.com> Co-authored-by: formless <213398294+allformless@users.noreply.github.com> Co-authored-by: 荆长逯 <jingchanglu@outlook.com> Co-authored-by: kaifulee <52813034+kaifulee@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Anna Smith <155628741+socialsister@users.noreply.github.com> Co-authored-by: Eric <45141191+zlacfzy@users.noreply.github.com> Co-authored-by: tanhuaan <tanhuaan@outlook.com> Co-authored-by: Annie <108039750+annielz@users.noreply.github.com> Co-authored-by: cbh876 <3930922419@qq.com> Co-authored-by: Sunny <sunny2022.za@gmail.com> Co-authored-by: constwz <122766871+constwz@users.noreply.github.com> Co-authored-by: Bosul Mun <bsbs8645@snu.ac.kr> Co-authored-by: FT <140458077+zeevick10@users.noreply.github.com> Co-authored-by: steven <wangpeculiar@gmail.com> Co-authored-by: lightclient <lightclient@protonmail.com> Co-authored-by: gzeon <h@arry.io> Co-authored-by: Galoretka <galoretochka@gmail.com> Co-authored-by: Tomás Andróil <tomasandroil@gmail.com> Co-authored-by: kashitaka <takao.w9st.kashima@xica.net> Co-authored-by: VM <112189277+sysvm@users.noreply.github.com> Co-authored-by: alex-10072 <ttalex101@gmail.com> Co-authored-by: deepdring <deepdrink@icloud.com> Co-authored-by: lx <92799281+brilliant-lx@users.noreply.github.com> Co-authored-by: david-ppp <164000748+david-ppp@users.noreply.github.com> Co-authored-by: Roshan <48975233+pythonberg1997@users.noreply.github.com> Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com>
ClaytonNorthey92
added a commit
to hemilabs/op-geth
that referenced
this pull request
Dec 17, 2025
* .gitea: switch release builds to static linking (#32118)
This is to avoid compatibility issues with mismatched glibc versions
between the builder and deployment target.
Fixes #32102
* .gitea: fix 386 upload
* .gitea: disable cron schedule
* triedb: reset state indexer after snap synced (#32104)
Fix the issue after initial snap sync with `gcmode=archive` enabled.
```
NewPayload: inserting block failed error="history indexing is out of order, last: null, requested: 1"
```
---------
Signed-off-by: Delweng <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* eth/filters: add address limit to filters (#31876)
The address filter was never checked against a maximum limit, which can
be somewhat abusive for API nodes. This PR adds a limit similar to
topics
## Description (AI generated)
This pull request introduces a new validation to enforce a maximum limit
on the number of addresses allowed in filter criteria for Ethereum logs.
It includes updates to the `FilterAPI` and `EventSystem` logic, as well
as corresponding test cases to ensure the new constraint is properly
enforced.
### Core functionality changes:
* **Validation for maximum addresses in filter criteria**:
- Added a new constant, `maxAddresses`, set to 100, to define the
maximum allowable addresses in a filter.
- Introduced a new error, `errExceedMaxAddresses`, to handle cases where
the number of addresses exceeds the limit.
- Updated the `GetLogs` method in `FilterAPI` to validate the number of
addresses against `maxAddresses`.
- Modified the `UnmarshalJSON` method to return an error if the number
of addresses in the input JSON exceeds `maxAddresses`.
- Added similar validation to the `SubscribeLogs` method in
`EventSystem`.
### Test updates:
* **New test cases for address limit validation**:
- Added a test in `TestUnmarshalJSONNewFilterArgs` to verify that
exceeding the maximum number of addresses triggers the
`errExceedMaxAddresses` error.
- Updated `TestInvalidLogFilterCreation` to include a test case for an
invalid filter with more than `maxAddresses` addresses.
- Updated `TestInvalidGetLogsRequest` to test for invalid log requests
with excessive addresses.
These changes ensure that the system enforces a reasonable limit on the
number of addresses in filter criteria, improving robustness and
preventing potential performance issues.
---------
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* Fix log indexer noise after debug_setHead operations (#31934)
## Summary
This PR resolves Issue #31929 by reducing log noise generated by the log
indexer after `debug_setHead` operations.
## Problem Description
When `debug_setHead` is called to rewind the blockchain, blocks are
removed from the database. However, the log indexer's `ChainView`
objects may still hold references to these deleted blocks. When
`extendNonCanonical()` attempts to access these missing headers, it
results in:
1. **Repeated ERROR logs**: `Header not found number=X hash=0x...`
2. **Log noise** that can mask other important errors
3. **User confusion** about whether this indicates a real problem
## Root Cause Analysis
The issue occurs because:
- `debug_setHead` removes blocks from the blockchain database
- Log indexer's `ChainView` may still reference deleted block hashes
- `extendNonCanonical()` in `core/filtermaps/chain_view.go` tries to
fetch these missing headers
- The existing `return false` logic properly handles the error, but logs
at ERROR level
## Solution
This is a **logging improvement only** - no functional logic changes:
### Changes Made
1. **Log level**: Changed from `ERROR` to `DEBUG`
2. **Log message**: Enhanced with descriptive context about chain view
extension
3. **Comments**: Added explanation for when this situation occurs
4. **Behavior**: Maintains existing error handling (`return false` was
already present)
### Code Changes
```go
// Before
log.Error("Header not found", "number", number, "hash", hash)
return false
// After
// Header not found - this can happen after debug_setHead operations
// where blocks have been deleted. Return false to indicate the chain view
// is no longer valid rather than logging repeated errors.
log.Debug("Header not found during chain view extension", "number", number, "hash", hash)
return false
```
## Testing
### Automated Tests
- ✅ All existing filtermaps tests pass: `go test ./core/filtermaps -v`
- ✅ No regressions in related functionality
### Manual Verification
1. **Before fix**: Started geth in dev mode, generated blocks, called
`debug_setHead(3)` → **5 repeated ERROR logs**
2. **After fix**: Same scenario → **4 DEBUG logs, no ERROR noise**
### Test Environment
```bash
# Setup test environment
rm -rf ./dev-test-data
./build/bin/geth --dev --datadir ./dev-test-data --http --http.api debug,eth,net,web3 --verbosity 4
# Generate test blocks and trigger issue
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_setHead","params":["0x3"],"id":1}' http://localhost:8545
```
## Related Issues
- Fixes #31929
## Additional Context
This issue was reported as spurious error messages appearing after
`debug_setHead` operations. The investigation revealed that while the
error handling was functionally correct, the ERROR log level was
inappropriate for this expected scenario in development/debugging
workflows.
The fix maintains full compatibility while significantly improving the
debugging experience for developers using `debug_setHead`.
---------
Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com>
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* core/filtermaps: clean up log format of unindexing message (#32123)
Sorry for not fully fixed in https://github.com/ethereum/go-ethereum/pull/31761, now the log
format of unindexing message is cleaned up, to make it consistent with the indexing message.
* eth/catalyst: fix the log message in newPayloadV4 (#32125)
It should be `newPayloadV4 must only be called for prague payloads` for
the V4 payload error
* internal/ethapi: prealloc map for the txpool api (#32110)
use `make(map, len(txpool))` to prealloc the map for the txpool content,
to avoid the map growing in the loop.
* ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021)
Towards https://github.com/ethereum/go-ethereum/issues/26974
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* internal: remove unused shh and swarm modules from console (#32073)
Similar to https://github.com/ethereum/go-ethereum/pull/31856, remove
the not availabe shh, swarm modules in the console.
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core/filtermaps: define APIs for map, epoch calculation (#31659)
This pull request refines the filtermap implementation, defining key
APIs for map and
epoch calculations to improve readability.
This pull request doesn't change any logic, it's a pure cleanup.
---------
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* core/types: blockTimestamp in logs is hex-encoded (#32129)
closes #32120
* core/rawdb, triedb/pathdb: fix two inaccurate comments (#32130)
* eth/catalyst: fix edge case in simulated backend (#31871)
geth cmd: `geth --dev --dev.period 5`
call: `debug.setHead` to rollback several blocks.
If the `debug.setHead` call is delayed, it will trigger a panic with a
small probability, due to using the null point of
`fcResponse.PayloadID`.
---------
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* accounts/abi: generate TryPack* methods for abigen v2 bindings (#31692)
1. Fix the error return format.
**todo**: ~~`bindtype` needs more complex logic to fix it.~~
`
if err != nil {
return nil, err
}
if err == nil {
return obj, nil
}
`
2. ~~Return pointer type object to avoid copying the whole struct
content.~~
3. Give the panic decision to the user.
4. Fix empty line at the end of function.
**TODO**: ~~fix some related test cases.~~
---------
Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
* version: release go-ethereum v1.16.1 stable
* version: begin v1.16.2 release cycle
* beacon/blsync: update logs for blsync (Fixes #31968 ) (#32046)
Small update for logs when syncing with blsync. Downgrades the "latest
filled block is not available" to warn.
Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com>
* cmd/workload: rework tracegen to run tracing at block level (#32092)
This PR changes the trace test to block level, aiming for better
execution performance.
---------
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* core/state: add GetStateAndCommittedState (#31585)
Improves the SSTORE gas calculation a bit. Previously we would pull up
the state object twice. This is okay for existing objects, since they
are cached, however non-existing objects are not cached, thus we needed
to go through all 128 diff layers as well as the disk layer twice, just
for the gas calculation
```
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/vm
cpu: AMD Ryzen 9 5900X 12-Core Processor
│ /tmp/old.txt │ /tmp/new.txt │
│ sec/op │ sec/op vs base │
Interpreter-24 1118.0n ± 2% 602.8n ± 1% -46.09% (p=0.000 n=10)
```
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* cmd/utils, internal/debug: hide the deprecated flags (#32128)
Some of the flags were deprecated, so try to hide them in the help
message. And move the `--vmodule` and `--logjson` flags to the
DeprecatedCategory.
* .gitea: add windows build (experimental)
* cmd/utils: show full deprecated flags (#32141)
This is a follow up PR after #32128 , Seems I've missed to add
--txlookuplimit as hidden. In hte meanwhile, I also add the other
deprecated flags into the output of `show-deprecated-flags`
* cmd/utils: update flag description of gcmode (#32145)
* .gitea: add workflow_dispatch for release build
* .gitea: update PATH
* .gitea: set PATH
* gitea: try with cmd
* gitea: set PATH in script
* .gitea: fix typo in windows workflow
* core/vm: move nil-check out of the interpreter loop (#32068)
Moves the jumptable nil check our of the interpreter loop.
Benchmarks show a 2-10% improvement.
* core/vm: implement EIP-7939 - CLZ opcode (#31989)
https://eips.ethereum.org/EIPS/eip-7939
---------
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>
Co-authored-by: Felix Lange <fjl@twurst.com>
* core/txpool/blobpool: lower log level for warnings (#32142)
- Change the log level to `warning`, during syncing blocks, the `final
== nil` is normal.
- Change to log tx hash.
* .github, internal/flags: improve actions test runs (#32150)
This change enables more tests to run on GitHub actions. First, it
removes the `-short` flag passed to `go test`, unskipping some longer
running tests. We also enable the full consensus tests to run by
enabling submodules during git clone.
The EF now operates org wide runners with the `self-hosted-ghr` label.
These are auto-scaling runners which should ideally allow us to process
any amount of testing load we throw at them. The new runners have `HOME`
configured differently from the actual user home directory, so our
internal test for resolving `~` had to be adapted to work in this scenario.
* consensus/misc/eip4844: implement EIP-7918 (#31965)
https://eips.ethereum.org/EIPS/eip-7918
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* core/vm: implement EIP-7951 - precompile for secp256r1 (#31991)
https://github.com/ethereum/EIPs/pull/9833
Based on #27540, #30043
---------
Co-authored-by: Ulaş Erdoğan <uerdogan2001@hotmail.com>
* cmd, eth/catalyst: exit geth only if exitWhenSynced is specified (#32149)
This pull request modifies the behavior of `--synctarget` to terminate
the node only when `--exitWhenSynced` is explicitly specified.
* eth/catalyst: abort dev mode block commit if shut down is triggered (#32166)
alternate approach to https://github.com/ethereum/go-ethereum/pull/31328
suggested by @MariusVanDerWijden . This prevents Geth from outputting a
lot of logs when trying to commit on-demand dev mode blocks while the
client is shutting down.
The issue is hard to reproduce, but I've seen it myself and it is
annoying when it happens. I think this is a reasonable simple solution,
and we can revisit if we find that the output is still too large (i.e.
there is a large delay between initiating shut down and the simulated
beacon receiving the signal, while in this loop).
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* miner, core, core/txpool: implement EIP 7825 - TX Gas Limit Cap (#31824)
Implements EIP-7825
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
* core/vm: update gas cost of CLZ to five (#32172)
https://github.com/ethereum/EIPs/commit/a794de3fcf71bb8c71e8bafdba11f63133ce4516
* core,miner: implement EIP-7934 - RLP Execution Block Size Limit (#31990)
This PR adds a block validation check for the maximum block size, as required by
EIP-7934, and also applies a slightly lower size limit during block building.
---------
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* Remove checkInterop from Block Building Path (#585)
* cmd/utils: add the missing check for the HoodiFlag in blsync (#32179)
Hoodi network flag should be exclusive to other network flags for both blysnc standalone and integrated mode.
* feat: bump scr commit (#640)
* cmd/clef: update Safe API documentation links in changelog (#32136)
This PR updates the outdated documentation URL from docs.gnosis.io to
the new official docs.safe.global domain. The change reflects the
rebranding from Gnosis Safe to Safe and ensures that users are directed
to the current API documentation for transaction service reference.
* txpool: Move Ingress Filter Checks to addTxsLocked (#642)
* txpool: introduce MaxTxGasLimit feature to enforce per-transaction gas limits (#626)
Adds a new flag `--txpool.maxtxgas` which represents the maximum gas limit for individual transactions (0 = no limit) when added to the mempool. Transactions exceeding this limit will be rejected by the transaction pool.
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
* core/types: add block-level access list structures with encoding/decoding (#31948)
This adds the SSZ types from the
[EIP-7928](https://eips.ethereum.org/EIPS/eip-7928) and also adds
encoder/decoder generation using https://github.com/ferranbt/fastssz.
The fastssz dependency is updated because the generation will not work
properly with the master branch version due to a bug in fastssz.
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* eth/downloader: fix ancient limit in snap sync (#32188)
This pull request fixes an issue in disabling direct-ancient mode in
snap sync.
Specifically, if `origin >= frozen && origin != 0`, it implies a part of
chain data has been written into the key-value store, all the following
writes into ancient store scheduled by downloader will be rejected
with error
`ERROR[07-10|03:46:57.924] Error importing chain data to ancients
err="can't add block 1166 hash: the append operation is out-order: have
1166 want 0"`.
This issue is detected by the https://github.com/ethpandaops/kurtosis-sync-test,
which initiates the first snap sync cycle without the finalized header and
implicitly disables the direct-ancient mode. A few seconds later the second
snap sync cycle is initiated with the finalized information and direct-ancient mode
is enabled incorrectly.
* .github: remove karalabe from CODEOWNERS
* cmd/geth: update vcheck testdata, add docs on generating signatures (#32121)
Fixed typo in security release URL by replacing:
Old: https://blog.ethereum.org/2020/11/12/geth_security_release/
New: https://blog.ethereum.org/2020/11/12/geth-security-release/
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
* signer/core/apitypes: require blob txs to have tx.to set (#32197)
Check the `to` address before building the blob tx.
---------
Co-authored-by: jwasinger <j-wasinger@hotmail.com>
* accounts/keystore: update links to documenation (#32194)
---
**Description:**
- Replaced outdated GitHub wiki links with the official Ethereum
documentation for Web3 Secret Storage.
- Updated references in `keystore.go` and `passphrase.go` for improved
accuracy and reliability.
---
* ethclient/gethclient: remove race condition in tests (#32206)
alternative to https://github.com/ethereum/go-ethereum/pull/32200
The race condition is not happening yet, since there is only a single
call to `newTestBackend`, but there might be more in the future
* tracing: Show OptimismBaseFeeRecipient in prestate (#407)
The OptimismBaseFeeRecipient should show up in prestate tracing results
(both the normal prestate and the diff mode prestate results) if IsOptimism.
I added one prestate diff test with Optimism turned on to show that it
works correctly. This required adding the L1CostFunc to the test block context.
* params: EIP-7892 - Blob Parameter Only Hardforks (#32193)
This is a resubmit of https://github.com/ethereum/go-ethereum/pull/31820
against the `master` branch.
---------
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* eth/fetcher: fix announcement drop logic (#32210)
This PR fixes an issue in the tx_fetcher DoS prevention logic where the
code keeps the overflow amount (`want - maxTxAnnounces`) instead of the
allowed amount (`maxTxAnnounces - used`). The specific changes are:
- Correct slice indexing in the announcement drop logic
- Extend the overflow test case to cover the inversion scenario
* miner: set sidecar version when recomputing proofs (#32199)
- If the block number is `osaka` fork and needs to recompute some `blob
proofs` to `cell proofs`, here also needs to set version to `1`.
* miner, txpool: detect supervisor failsafe and reject interop transactions if enabled (#636)
* miner, txpool: detect supervisor failsafe and reject interop transactions if enabled
Add routine to periodically check for failsafe mode by calling supervisor RPC and checking error for sentinel value
Backend caches result, miner inspects the cache. Txpool checks over RPC on ingress.
Adds comprehensive tests.
* move SupervisorInFailSafe method to BackendWithInterop interface
* rename
* use interoptypes.TxToInteropAccessList in commitTransaction
* use admin_getFailsafeEnabled instead of stubbed CheckAccessList
* fixes
* fixes
* all: fix outdated ethereum wiki json-rpc json-rpc doc links (#32209)
Replace outdated wiki reference with ethereum.org
documentation links
* core/types: fix CellProofsAt method (#32198)
* triedb/pathdb: introduce file-based state journal (#32060)
Introduce file-based state journal in path database, fixing
the Pebble restriction when the journal size exceeds 4GB.
---------
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core/rawdb: change the mechanism to schedule freezer sync (#32135)
This pull request slightly improves the freezer fsync mechanism by scheduling
the Sync operation based on the number of uncommitted items and original
time interval.
Originally, freezer.Sync was triggered every 30 seconds, which worked well during
active chain synchronization. However, once the initial state sync is complete,
the fixed interval causes Sync to be scheduled too frequently.
To address this, the scheduling logic has been improved to consider both the time
interval and the number of uncommitted items. This additional condition helps
avoid unnecessary Sync operations when the chain is idle.
* eth/protocols/snap, p2p/discover: improve zero time checks (#32214)
* all: update dead wiki links (#32215)
---
**Description:**
- Replaced outdated GitHub wiki links with current, official
documentation URLs.
- Removed links that redirect or are no longer relevant.
- Ensured all references point to up-to-date and reliable sources.
---
* core/rawdb: reduce allocations in rawdb.ReadHeaderNumber (#31913)
This is something interesting I came across during my benchmarks, we
spent ~3.8% of all allocations allocating the header number on the heap.
```
(pprof) list GetHeaderByHash
Total: 38197204475
ROUTINE ======================== github.com/ethereum/go-ethereum/core.(*BlockChain).GetHeaderByHash in github.com/ethereum/go-ethereum/core/blockchain_reader.go
0 5786566117 (flat, cum) 15.15% of Total
. . 79:func (bc *BlockChain) GetHeaderByHash(hash common.Hash) *types.Header {
. 5786566117 80: return bc.hc.GetHeaderByHash(hash)
. . 81:}
. . 82:
. . 83:// GetHeaderByNumber retrieves a block header from the database by number,
. . 84:// caching it (associated with its hash) if found.
. . 85:func (bc *BlockChain) GetHeaderByNumber(number uint64) *types.Header {
ROUTINE ======================== github.com/ethereum/go-ethereum/core.(*HeaderChain).GetHeaderByHash in github.com/ethereum/go-ethereum/core/headerchain.go
0 5786566117 (flat, cum) 15.15% of Total
. . 404:func (hc *HeaderChain) GetHeaderByHash(hash common.Hash) *types.Header {
. 1471264309 405: number := hc.GetBlockNumber(hash)
. . 406: if number == nil {
. . 407: return nil
. . 408: }
. 4315301808 409: return hc.GetHeader(hash, *number)
. . 410:}
. . 411:
. . 412:// HasHeader checks if a block header is present in the database or not.
. . 413:// In theory, if header is present in the database, all relative components
. . 414:// like td and hash->number should be present too.
(pprof) list GetBlockNumber
Total: 38197204475
ROUTINE ======================== github.com/ethereum/go-ethereum/core.(*HeaderChain).GetBlockNumber in github.com/ethereum/go-ethereum/core/headerchain.go
94438817 1471264309 (flat, cum) 3.85% of Total
. . 100:func (hc *HeaderChain) GetBlockNumber(hash common.Hash) *uint64 {
94438817 94438817 101: if cached, ok := hc.numberCache.Get(hash); ok {
. . 102: return &cached
. . 103: }
. 1376270828 104: number := rawdb.ReadHeaderNumber(hc.chainDb, hash)
. . 105: if number != nil {
. 554664 106: hc.numberCache.Add(hash, *number)
. . 107: }
. . 108: return number
. . 109:}
. . 110:
. . 111:type headerWriteResult struct {
(pprof) list ReadHeaderNumber
Total: 38197204475
ROUTINE ======================== github.com/ethereum/go-ethereum/core/rawdb.ReadHeaderNumber in github.com/ethereum/go-ethereum/core/rawdb/accessors_chain.go
204606513 1376270828 (flat, cum) 3.60% of Total
. . 146:func ReadHeaderNumber(db ethdb.KeyValueReader, hash common.Hash) *uint64 {
109577863 1281242178 147: data, _ := db.Get(headerNumberKey(hash))
. . 148: if len(data) != 8 {
. . 149: return nil
. . 150: }
95028650 95028650 151: number := binary.BigEndian.Uint64(data)
. . 152: return &number
. . 153:}
. . 154:
. . 155:// WriteHeaderNumber stores the hash->number mapping.
. . 156:func WriteHeaderNumber(db ethdb.KeyValueWriter, hash common.Hash, number uint64) {
```
Opening this to discuss the idea, I know that rawdb.EmptyNumber is not a
great name for the variable, open to suggestions
* trie: avoid spawning goroutines for empty children (#32220)
* eth/downloader: improve nil pointer protection (#32222)
Fix #32221
---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* account/abi/bind/v2: fix TestDeploymentWithOverrides (#32212)
The root cause of the flaky test was a nonce conflict caused by async
contract deployments.
This solution defines a custom deployer with automatic nonce management.
* eth/tracers: apply block header overrides correctly (#32183)
Fixes #32175.
This fixes the scenario where the blockhash opcode would return 0x0
during RPC simulations when using BlockOverrides with a future block
number. The root cause was that BlockOverrides.Apply() only modified the
vm.BlockContext, but GetHashFn() depends on the actual
types.Header.Number to resolve valid historical block hashes. This
caused a mismatch and resulted in incorrect behavior during trace and
call simulations.
---------
Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
* triedb/pathdb: avoid duplicate metadata reads (#32226)
* eth/protocols/snap: fix negative eta in state progress logging (#32225)
* triedb/pathdb: improve the performance of parse index block (#32219)
The implementation of `parseIndexBlock` used a reverse loop with slice
appends to build the restart points, which was less cache-friendly and
involved unnecessary allocations and operations. In this PR we change
the implementation to read and validate the restart points in one single
forward loop.
Here is the benchmark test:
```bash
go test -benchmem -bench=BenchmarkParseIndexBlock ./triedb/pathdb/
```
The result as below:
```
benchmark old ns/op new ns/op delta
BenchmarkParseIndexBlock-8 52.9 37.5 -29.05%
```
about 29% improvements
---------
Signed-off-by: jsvisa <delweng@gmail.com>
* all: define constructor for BlobSidecar (#32213)
The main purpose of this change is to enforce the version setting when
constructing the blobSidecar, avoiding creating sidecar with wrong/default
version tag.
* params: update tx gas limit cap (#32230)
Updates the tx gas limit cap to the new parameter (2^24)
https://github.com/ethereum/EIPs/pull/9986/files
* core/txpool/blobpool: remove unused `txValidationFn` from BlobPool (#32237)
This PR removes the now‑unused `txValidationFn` field from BlobPool.
It became obsolete after a PR https://github.com/ethereum/go-ethereum/pull/31202
was merged.
Resolves https://github.com/ethereum/go-ethereum/issues/32236
* triedb/pathdb: fix incorrect address length in history searching (#32248)
We should use account length to check address, else OOB maybe occured
Signed-off-by: jsvisa <delweng@gmail.com>
* core/vm: triple modexp cost post-cancun (#32231)
https://github.com/ethereum/EIPs/pull/9969/files
* core, params: add limit for max blobs in blob transaction (#32246)
[EIP-7594](https://eips.ethereum.org/EIPS/eip-7594) defines a limit of
max 6 blobs per transaction. We need to enforce this limit during block
processing.
> Additionally, a limit of 6 blobs per transaction is introduced.
Clients MUST enforce this limit when validating blob transactions at
submission time, when received from the network, and during block
production and processing.
* superchain: skip celo mainnet genesis processing (#646)
* superchain: skip celo mainnet genesis processing
* superchain: add GetChain tests
* superchain: add clarifying comments for celo exclusion
* build: update tests to fusaka-devnet-3 (#32251)
* core/types: minimize this invalid intermediate state (#32241)
* core/rawdb: downgrade log level in chain freezer (#32253)
* triedb/pathdb: use binary.append to eliminate the tmp scratch slice (#32250)
`binary.AppendUvarint` offers better performance than using append
directly, because it avoids unnecessary memory allocation and copying.
In our case, it can increase the performance by +35.8% for the
`blockWriter.append` function:
```
benchmark old ns/op new ns/op delta
BenchmarkBlockWriterAppend-8 5.97 3.83 -35.80%
```
---------
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* p2p/rlpx: optimize XOR operation using bitutil.XORBytes (#32217)
Replace manual byte-by-byte XOR implementation with the optimized
bitutil.XORBytes function. This improves performance by using word-sized
operations on supported architectures while maintaining the same
functionality. The optimized version processes data in bulk rather than
one byte at a time
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* eth/gasestimator: fix potential overflow (#32255)
Improve binary search, preventing the potential overflow in certain L2 cases
* triedb/pathdb: fix an deadlock in history indexer (#32260)
Seems the `signal.result` was not sent back in shorten case, this will
cause a deadlock.
---------
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* eth/protocols/snap: add healing and syncing metrics (#32258)
Adds the heal time and snap sync time to grafana
---------
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* core: replace the empty fmt.Errorf with errors.New (#32274)
The `errors.new` function does not require string formatting, so its
performance is better than that of `fmt.Errorf`.
* eth/catalyst: fix error message in ExecuteStatelessPayloadV4 (#32269)
Correct the error message in the ExecuteStatelessPayloadV4 function to
reference newPayloadV4 and the Prague fork, instead of incorrectly
referencing newPayloadV3 and Cancun.
This improves clarity during debugging and aligns the error message with
the actual function and fork being validated. No logic is changed.
---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* cmd, eth, internal: introduce debug_sync (#32177)
Alternative implementation of https://github.com/ethereum/go-ethereum/pull/32159
* all: replace fmt.Errorf with errors.New (#32286)
The errors.new function does not require string formatting, so its
performance is better than that of fmt.Errorf.
* downloader: fix typos, grammar and formatting (#32288)
* ethclient/simulated: Fix flaky rollback test (#32280)
This PR addresses a flakiness in the rollback test discussed in
https://github.com/ethereum/go-ethereum/issues/32252
I found `nonce` collision caused transactions occasionally fail to send.
I tried to change error message in the failed test like:
```
if err = client.SendTransaction(ctx, signedTx); err != nil {
t.Fatalf("failed to send transaction: %v, nonce: %d", err, signedTx.Nonce())
}
```
and I occasionally got test failure with this message:
```
=== CONT TestFlakyFunction/Run_#100
rollback_test.go:44: failed to send transaction: already known, nonce: 0
--- FAIL: TestFlakyFunction/Run_#100 (0.07s)
```
Although `nonces` are obtained via `PendingNonceAt`, we observed that,
in rare cases (approximately 1 in 1000), two transactions from the same
sender end up with the same nonce. This likely happens because `tx0` has
not yet propagated to the transaction pool before `tx1` requests its
nonce. When the test succeeds, `tx0` and `tx1` have nonces `0` and `1`,
respectively. However, in rare failures, both transactions end up with
nonce `0`.
We modified the test to explicitly assign nonces to each transaction. By
controlling the nonce values manually, we eliminated the race condition
and ensured consistent behavior. After several thousand runs, the
flakiness was no longer reproducible in my local environment.
Reduced internal polling interval in `pendingStateHasTx()` to speed up
test execution without impacting stability. It reduces test time for
`TestTransactionRollbackBehavior` from about 7 seconds to 2 seconds.
* core/state: preallocate capacity for logs list (#32291)
Improvement: preallocate capacity for `logs` at first to avoid
reallocating multi times.
* core/state: improve PrettyPrint function (#32293)
* core/types: expose sigHash as Hash for SetCodeAuthorization (#32298)
* common/hexutil: replace customized bit sizer with bit.Uintsize (#32304)
* accounts/abi: precompile regex (#32301)
* cmd/devp2p/internal/v4test: add test for ENRRequest (#32303)
This adds a cross-client protocol test for a recently discovered bug in Nethermind.
* trie: reduce the memory allocation in trie hashing (#31902)
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.
* 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>
* eth: fix typos and outdated comments (#32324)
* 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.
* rlp/rlpgen: implement package renaming support (#31148)
This adds support for importing types from multiple identically-named
packages.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* beacon/params, core/filtermaps: update checkpoints (#32336)
This PR updates checkpoints for blsync and filtermaps.
* version: release v1.16.2 (#32343)
* version: begin v1.16.3 release cycle (#32345)
* core/state: introduce the TransitionState object (verkle transition part 1) (#31634)
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>
* eth/catalyst: avoid load the same blob tx multi times (#32190)
- 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>
* eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348)
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>
* core/filtermaps: remove unnecessary nil check and add cv2 lock (#32309)
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
* go.mod: upgraded github.com/golang-jwt/jwt/v4 v4.5.1 => v4.5.2 (#32356)
https://pkg.go.dev/vuln/GO-2025-3553
* rpc: use reflect.TypeFor (#32316)
* crypto/kzg4844: use reflect.TypeFor (#32319)
* common, common/hexutil: use reflect.TypeFor (#32321)
* beacon/merkle: use reflect.TypeFor (#32322)
* core: use reflect.TypeFor (#32320)
https://github.com/golang/go/issues/60088
* p2p/enode: use atomic.Pointer in LocalNode (#32360)
* signer/core/apitypes: simplify reflect []byte creation (#32315)
Co-authored-by: Felix Lange <fjl@twurst.com>
* rlp: use reflect.TypeFor (#32317)
Co-authored-by: Felix Lange <fjl@twurst.com>
* eth/downloader: fix incomplete code comment (#32354)
* metrics: use atomic.Pointer in runtimeHistogram (#32361)
Co-authored-by: Felix Lange <fjl@twurst.com>
* core/vm: fold EVMInterpreter into EVM (#32352)
The separation serves no purpose atm, and the circular dependency that
EVM and EVMInterpreter had was begging for them to be merged.
* ethclient: fix flaky pending tx test (#32380)
Fixes: https://github.com/ethereum/go-ethereum/issues/32252
* 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).
* core/vm: make types consistent in makeDup (#32378)
* miner: remove todo comment (#32389)
see
https://github.com/ethereum/go-ethereum/pull/32372#discussion_r2265885182
* 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.
* accounts/abi, accounts/keystore: use reflect.TypeFor (#32323)
Co-authored-by: Felix Lange <fjl@twurst.com>
* 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.
* trie, core: rework tracer and track origin value of dirty nodes (#32306)
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.
* 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.
* metrics: Block Basefee (#658)
* basefee metric
* Handle nil basefee for before london hf
* Update forkdiff
* trie: refactor to use slices.Concat (#32401)
* cmd: fix inconsistent function name in comment (#32411)
fix inconsistent function name in comment
Signed-off-by: youzichuan <youzichuan6@outlook.com>
* eth: abort `requiredBlocks` check if peer handler terminated (#32413)
* node: remove unused err var (#32398)
* 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)
* 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>
* eth/syncer: fix typo (#32427)
avaibale -> available
* p2p: refactor to use time.Now().UnixMilli() in golang std lib (#32402)
* .github: upgrade workflows to Go 1.25 (#32425)
* build: upgrade -dlgo version to Go 1.25.0 (#32412)
* crypto/secp256k1: use ReadBits from common/math (#32430)
* build: remove unused functions (#32393)
* catalyst/api: centralize OPStack validation into helper functions (#592)
* catalyist/api: centralize OPStack validation into helper functions
located in a seperate file for a cleaner diff to upstream
* add test coverage for optimism validation checks
return unadorned errors from helper and allow caller to wrap
* lint
* use engine.InvalidPayloadAttributes.With() for all failed optimism FCU checks
* typos
* fix: only check optimism payload attributes if they are not nil
* combine conditions
* move test
* combine checks
* add check on withdrawals root from canyon to isthmus
* lint
* 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>
* 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.
* core/vm: refactor to use bitutil.TestBytes (#32434)
* crypto/bn256: refactor to use bitutil.TestBytes (#32435)
* consensus/misc/eip4844: use blob parameters of current header (#32424)
This changes the implementation to resolve the blob parameters according
to the current header timestamp. This matters for EIP-7918, where we
would previously resolve the UpdateFraction according to the parent
header fork, leading to a confusing situation at the fork transition
block.
---------
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
* rlp: remove workaround for Value.Bytes (#32433)
As of Go 1.19, it is permitted to call Bytes() on a reflect.Value
representing an adressable byte array. So we can remove our workaround,
undoing #22924.
https://go.dev/doc/go1.19#reflectpkgreflect
> The method [Value.Bytes](https://go.dev/pkg/reflect/#Value.Bytes) now
accepts addressable arrays in addition to slices.
* core/vm: fix EIP-7823 modexp input length check (#32363)
The order of the checks was wrong which would have allowed a call to
modexp with `baseLen == 0 && modLen == 0` post fusaka.
Also handles an edge case where base/mod/exp length >= 2**64
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* metrics: add tinygo build flag for CPU time (#32454)
* core/rawdb: add non-unix alternative for tablewriter (#32455)
Continuation of https://github.com/ethereum/go-ethereum/issues/32022
tablewriter assumes unix or windows, which may not be the case for
embedded targets.
For v0.0.5 of tablewriter, it is noted in table.go: "The protocols were
written in pure Go and works on windows and unix systems"
---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* eth/syncer: stop ticker to prevent resource leak (#32443)
* core/rawdb: enhance database key construction (#32431)
* rpc: add SetWebsocketReadLimit in Server (#32279)
Exposing the public method to setReadLimits for Websocket RPC to
prevent OOM.
Current, Geth Server is using a default 32MB max read limit (message
size) for websocket, which is prune to being attacked for OOM. Any one
can easily launch a client to send a bunch of concurrent large request
to cause the node to crash for OOM. One example of such script that can
easily crash a Geth node running websocket server is like this:
https://gist.githubusercontent.com/DeltaXV/b64d221e342e9c1ec6c99c1ab8201544/raw/ec830979ac9a707d98f40dfcc0ce918fc8fb9057/poc.go
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* CODEOWNERS: add gballet as the owner of trie package (#32466)
* ethclient/gethclient: use common.Hash to debug_traceTransaction (#32404)
* graphql: add query depth limit to prevent DoS attacks (#32344)
## Summary
This PR addresses a DoS vulnerability in the GraphQL service by
implementing a maximum query depth limit. While #26026 introduced
timeout handling, it didn't fully mitigate the attack vector where
deeply nested queries can still consume excessive CPU and memory
resources before the timeout is reached.
## Changes
- Added `maxQueryDepth` constant (set to 20) to limit the maximum
nesting depth of GraphQL queries
- Applied the depth limit using `graphql.MaxDepth()` option when parsing
the schema
- Added test case `TestGraphQLMaxDepth` to verify that queries exceeding
the depth limit are properly rejected
## Security Impact
Without query depth limits, malicious actors could craft deeply nested
queries that:
- Consume excessive CPU cycles during query parsing and execution
- Allocate large amounts of memory for nested result structures
- Potentially cause service degradation or outages even with timeout
protection
This fix complements the existing timeout mechanism by preventing
resource-intensive queries from being executed in the first place.
## Testing
Added `TestGraphQLMaxDepth` which verifies that queries with nesting
depth > 20 are rejected with a `MaxDepthExceeded` error.
## References
- Original issue: #26026
- Related security best practices:
https://www.howtographql.com/advanced/4-security/
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
* p2p: update MaxPeers comment (#32414)
* eth/catalyst: return methods by reflect (#32300)
Return the exposed methods in `ConsensusAPI` by reflection.
* internal/ethapi, miner: fix GetBlockReceipts for pending (#32461)
* trie, core/state: introduce trie Prefetch for optimizing preload (#32134)
This pull introduces a `Prefetch` operation in the trie to prefetch trie
nodes in parallel. It is used by the `triePrefetcher` to accelerate state
loading and improve overall chain processing performance.
* beacon/engine,eth/catalyst: Fix engine API checks and exec payload creation (#662)
* p2p: using math.MaxInt32 from go std lib (#32357)
Co-authored-by: Felix Lange <fjl@twurst.com>
* rlp: refactor to use maths.ReadBits (#32432)
* fixes missing protection of nil pointer dereference in scwallet (#32186)
Fixes #32181
Signed-off-by: kapil <kapilsareen584@gmail.com>
* accounts/usbwallet: correct version comparison logic (#32417)
## Description
This PR fixes a bug in the Ledger hardware wallet version validation
logic for EIP-155 transaction signing. The original condition
incorrectly allowed older versions that don't support EIP-155 such as
0.9.9 and 0.1.5 to proceed.
* p2p: remove todo comment, as it's unnecessary (#32397)
as metioned in https://github.com/ethereum/go-ethereum/pull/32351, I
think this comment is unnecessary.
* core/types: reduce allocations for transaction comparison (#31912)
This PR should reduce overall allocations of a running node by ~10
percent. Since most allocations are coming from the re-heaping of the
transaction pool.
```
(pprof) list EffectiveGasTipCmp
Total: 38197204475
ROUTINE ======================== github.com/ethereum/go-ethereum/core/types.(*Transaction).EffectiveGasTipCmp in github.com/ethereum/go-ethereum/core/types/transaction.go
0 3766837369 (flat, cum) 9.86% of Total
. . 386:func (tx *Transaction) EffectiveGasTipCmp(other *Transaction, baseFee *big.Int) int {
. . 387: if baseFee == nil {
. . 388: return tx.GasTipCapCmp(other)
. . 389: }
. . 390: // Use more efficient internal method.
. . 391: txTip, otherTip := new(big.Int), new(big.Int)
. 1796172553 392: tx.calcEffectiveGasTip(txTip, baseFee)
. 1970664816 393: other.calcEffectiveGasTip(otherTip, baseFee)
. . 394: return txTip.Cmp(otherTip)
. . 395:}
. . 396:
. . 397:// EffectiveGasTipIntCmp compares the effective gasTipCap of a transaction to the given gasTipCap.
. . 398:func (tx *Transaction) EffectiveGasTipIntCmp(other *big.Int, baseFee *big.Int) int {
```
This PR reduces the allocations for comparing two transactions from 2 to
0:
```
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/types
cpu: Intel(R) Core(TM) Ultra 7 155U
│ /tmp/old.txt │ /tmp/new.txt │
│ sec/op │ sec/op vs base │
EffectiveGasTipCmp/Original-14 64.67n ± 2% 25.13n ± 9% -61.13% (p=0.000 n=10)
│ /tmp/old.txt │ /tmp/new.txt │
│ B/op │ B/op vs base │
EffectiveGasTipCmp/Original-14 16.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
│ /tmp/old.txt │ /tmp/new.txt │
│ allocs/op │ allocs/op vs base │
EffectiveGasTipCmp/Original-14 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
```
It also speeds up the process by ~60%
There are two minor caveats with this PR:
- We change the API for `EffectiveGasTipCmp` and `EffectiveGasTipIntCmp`
(which are probably not used by much)
- We slightly change the behavior of `tx.EffectiveGasTip` when it
returns an error. It would previously return a negative number on error,
now it does not (since uint256 does not allow for negative numbers)
---------
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Co-authored-by: Csaba Kiraly <csaba.kiraly@gmail.com>
* triedb/pathdb: improve err message in historical state reader (#32477)
Fixes https://github.com/ethereum/go-ethereum/issues/32474
* core, miner, trie: add metrics tracking state trie depth (#32388)
Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
* p2p/discover: add discv5 invalid findnodes result test cases (#32481)
Supersedes #32470.
### What
- snap: shorten stall watchdog in `eth/protocols/snap/sync_test.go` from
1m to 10s.
- discover/v5: consolidate FINDNODE negative tests into a single
table-driven test:
- `TestUDPv5_findnodeCall_InvalidNodes` covers:
- invalid IP (unspecified `0.0.0.0`) → ignored
- low UDP port (`<=1024`) → ignored
### Why
- Addresses TODOs:
- “Make tests smaller” (reduce long 1m timeout).
- “check invalid IPs”; also cover low port per `verifyResponseNode`
rules (UDP must be >1024).
### How it’s validated
- Test-only changes; no production code touched.
- Local runs:
- `go test ./p2p/discover -count=1 -timeout=300s` → ok
- `go test ./eth/protocols/snap -count=1 -timeout=600s` → ok
- Lint:
- `go run build/ci.go lint` → 0 issues on modified files.
### Notes
- The test harness uses `enode.ValidSchemesForTesting` (which includes
the “null” scheme), so records signed with `enode.SignNull` are
signature-valid; failures here are due to IP/port validation in
`verifyResponseNode` and `netutil.CheckRelayAddr`.
- Tests are written as a single table-driven function for clarity; no
helpers or environment switching.
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
* node: fix vhosts for adminAPI (#32488)
* core,trie: fix typo in TransitionTrie (#32491)
Change `NewTransitionTree` to the correct `NewTransitionTrie`.
Signed-off-by: pxwanglu <pxwanglu@icloud.com>
* .github/workflows: naive PR format checker (#32480)
Full disclosure: this has been generated by AI. The goal is to have a
quick check that the PR format is correct, before we merge it. This is
to avoid the periodical case when someone forgets to add a milestone or
check the title matches our preferred format.
* p2p: use slices.Clone (#32428)
Replaces a helper method with slices.Clone
* eth/protocols/eth: Handle DepositTx Receipts
* eth: Catch nil chainViews in backend filter maps update
* params: fix history serve window for verkle test (#32127)
Fixes the history serve window parameter for the
test function `getContractStoredBlockHash`.
Fixes #32458.
* eth/tracers: add missing teardown in TestTraceChain (#32472)
The TestTraceChain function was missing a defer backend.teardown() call,
which is required to properly release blockchain resources after test
completion.
---------
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* internal/web3ext: remove deprecated method debug_seedHash (#32495)
The corresponding function was removed in #27178
* triedb/pathdb: rename history to state history (#32498)
This is a internal refactoring PR, renaming the history to stateHistory.
It's a pre-requisite PR for merging trienode history, avoid the name
conflict.
* build: add support for ubuntu 25.04 (#31666)
* cmd: fix typo in comment (#32501)
The function name in the comment should be `writeErrors` instead of
`writeQueries`.
Signed-off-by: tzchenxixi <tzchenxixi@icloud.com>
* eth/tracers: fix supply tracer uncle accounting (#31882)
Uncle rewards were being omitted in the supply tracer due
to a bug. This PR fixes that.
---------
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* triedb/pathdb: refactor state history write (#32497)
This pull request refactors the internal implementation in path database
a bit, specifically:
- purge the state index data in batch
- simplify the logic of state history construction and index, make it more readable
* rpc: refactor read limit test (#32494)
closes #32240 #32232
The main cause for the time out is the slow json encoding of large data.
In #32240 they tried to resolve the issue by reducing the size of the
test. However as Felix pointed out, the test is still kind of confusing.
I've refactored the test so it is more understandable and have reduced
the amount of data needed to be json encoded. I think it is still
important to ensure that the default read limit is not active, so I have
retained one large (~32 MB) test case, but it's at least smaller than
the existing ~64 MB test case.
* eth: replace hardcoded sleep with polling loop in snap sync test (#32499)
Replace hardcoded 5-second sleep with polling loop that actively checks
snap sync state. This approach is already used in other project tests
(like account_cache_test.go) and provides better reliability by:
- Reducing flaky behavior on slower systems
- Finishing early when sync completes quickly
- Using 1-second timeout with 100ms polling intervals
---------
Co-authored-by: lightclient <lightclient@protonmail.com>
* internal/ethapi: fix precompile override for eth_estimateGas (#31795)
Fix and close https://github.com/ethereum/go-ethereum/issues/31719.
---------
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* accounts/abi: fix panic when check event with log has empty or nil topics (#32503)
When the log has empty or nil topics, the generated bindings code will
panic when accessing `log.Topics[0]`, add a check to avoid it.
* core, internal, miner, signer: convert legacy sidecar in Osaka fork (#32347)
This pull request implements #32235 , constructing blob sidecar in new
format (cell proof)
if the Osaka has been activated.
Apart from that, it introduces a pre-conversion step in the blob pool
before adding the txs.
This mechanism is essential for handling the remote **legacy** blob txs
from the network.
One thing is still missing and probably is worthy being highlighted
here: the blobpool may
contain several legacy blob txs before the Osaka and these txs should be
converted once
Osaka is activated. While the `GetBlob` API in blobpool is capable for
generating cell proofs
at the runtime, converting legacy txs at one time is much cheaper
overall.
---------
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
Co-authored-by: lightclient <lightclient@protonmail.com>
* eth/tracers: fix testcase 7702_delegate (#32349)
Fixes a prestateTracer test case covering 7702 delegation.
---------
Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
* node: fix problematic function name in comment (#32510)
fix problematic function name in comment
Signed-off-by: slicesequal <slicesequal@outlook.com>
* eth: stabilize tx relay peer selection (#31714)
When maxPeers was just above some perfect square, and a few peers
dropped for some reason, we changed the peer selection function.
When new peers were acquired, we changed again.
This PR improves the selection function, in two ways. First, it will always select
sqrt(peers) to broadcast to. Second, the selection now uses siphash with a secret
key, to guard against information leaks about tx source.
---------
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
* core: improve error context in state processor for Prague EIPs (#32509)
Add better error context for EIP-6110, EIP-7002, and EIP-7251 processing
in state processor to improve debugging capabilities.
* all: fix problematic function name in comment (#32513)
Fix problematic function name in comment.
Do my best to correct them all with a script to avoid spamming PRs.
* triedb/pathdb, core: keep root->id mappings after truncation (#32502)
This pull request preserves the root->ID mappings in the path database
even after the associated state histories are truncated, regardless of
whether the truncation occurs at the head or the tail.
The motivation is to support an additional history type, trienode history.
Since the root->ID mappings are shared between two history instances,
they must not be removed by either one.
As a consequence, the root->ID mappings remain in the database even
after the corresponding histories are pruned. While these mappings may
become dangling, it is safe and cheap to keep them.
Additionally, this pull request enhances validation during historical
reader construction, ensuring that only canonical historical state will be
served.
* README: add twitter badge to documentation (#32516)
* core/rawdb: inspect database in parallel (#32506)
`db inspect` on the full database currently takes **30min+**, because
the db iterate was run in one thread, propose to split the key-space to
256 sub range, and assign them to the worker pool to speed up.
After the change, the time of running `db inspect --workers 16` reduced
to **10min**(the keyspace is not evenly distributed).
---------
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* all: improve ETA calculation across all progress indicators (#32521)
### Summary
Fixes long-standing ETA calculation errors in progress indicators that
have been present since February 2021. The current implementation
produces increasingly inaccurate estimates due to integer division
precision loss.
### Problem
https://github.com/ethereum/go-ethereum/blob/3aeccadd04aee2d18bdb77826f86b1ca000d3b67/triedb/pathdb/history_indexer.go#L541-L553
The ETA calculation has two critical issues:
1. **Integer division precision loss**: `speed` is calculated as
`uint64`
2. **Off-by-one**: `speed` uses `+ 1`(2 times) to avoid division by
zero, however it makes mistake in the final calculation
This results in wildly inaccurate time estimates that don't improve as
progress continues.
### Example
Current output during state history indexing:
```
lvl=info msg="Indexing state history" processed=16858580 left=41802252 elapsed=18h22m59.848s eta=11h36m42.252s
```
**Expected calculation:**
- Speed: 16858580 ÷ 66179848ms = 0.255 blocks/ms
- ETA: 41802252 ÷ 0.255 = ~45.6 hours
**Current buggy calculation:**
- Speed: rounds to 1 block/ms
- ETA: 41802252 ÷ 1 = ~11.6 hours ❌
### Solution
- Created centralized `CalculateETA()` function in common package
- Replaced all 8 duplicate code copies across the codebase
### Testing
Verified accurate ETA calculations during archive node reindexing with
significantly improved time estimates.
* core/stateless: only report leaf depth in witness stats (#32507)
Filtering for leaf nodes was missing from #32388, which means that even
the root done was reported, which made little sense for the bloatnet
data processing we want to do.
* trie/bintrie: add eip7864 binary trees and run its tests (#32365)
Implement the binary tree as specified in [eip-7864](https://eips.ethereum.org/EIPS/eip-7864).
This will gradually replace verkle trees in the codebase. This is only
running the tests and will not be executed in production, but will help
me rebase some of my work, so that it doesn't bitrot as much.
---------
Signed-off-by: Guillaume Ballet
Co-authored-by: Parithosh Jayanthi <parithosh.jayanthi@ethereum.org>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* internal/ethapi,params: add `eth_config` (#32239)
~Will probably be mostly supplanted by #32224, but this should do for
now for devnet 3.~
Seems like #32224 is going to take some more time, so I have completed
the implementation of eth_config here. It is quite a bit simpler to
implement now that the config hashing was removed.
---------
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
* version: release v1.16.3
* feat: bump superchain registry (#669)
* ci: Update forkdiff version to v0.1.1 (#670)
* feat: introduce minimum base fee (#666)
* add minBaseFee to superchain/types and Jovian to params/config
* extend extraData header field
* validate/encode eip1559
* spike add jovian 1559 tests
* update calcBaseFee test and fix logic for calcBaseFee
* update comment
* validate params should be 9 not 10
* dont leave out version byte in extraData
* 0 minbasefee is valid
* dont need default minBaseFee
* add test that fails for curr impl
* do one check at the end to enforce minBaseFee
* 9 bytes not 10 in validate err msg
* extend coverage
* nits
* fix test
* use feature naming and assume eip1559params 8bytes still
* best effort decode
* feature flag
* nits
* handle FCU and payload building args properly
* have payload building test support holocene still
* nits + fix api payload fcu
* use option A of feature flag + nits
* Switch from log2 to significand + exponent for min base fee
* Clear out the higher 4 bits of the significand
* Add encode/decode helpers for min base fee factors
* Remove the check for a blank min base fee
* bit manipulation change
* eth/catalyst: fix ExtraData validation for Jovian min base fee; add tests
* use u64 approach
* feedback + add specs link
* use more compact syntax
* move expectation to end of struct
* combine tests
* rename feature flag
* add new optimism-specific file with general validation and decoding functions
* move optimism specific code to new file
* remove validation and add comments
validation is done in catalyst/api
* remove feature flags altogether
* remove validation from decoding fn
* fix and use generic extradata validation fn
* add comments
* finish removing feature flag
* fix tests
* Apply suggestions from code review
* add spec link
* use inline fn to clean up diff to upstream
* add test cases and factor into subtests with require statement
* tidy up jovianConfig() helper and rename a test
* Introduce Holocene/JovianExtraDataVersionByte
* tweak
* consistency
* rename minbasefee to jovian in validation fn error msg
* assert holocene params in payload_building_test.go
* fix regression
* use ptr for MinBaseFee in PayloadAttributes
* eip1559_optimism: have Validate/DecodeOptimismExtraData take a ForkChecker interface and return a *uint64 for MinBaseFee
* introduce EncodeOptimismExtraData
* lint (whitespace only)
* fix pointer comparison in assertion
* add test for determinism of payload id
* dereference pointer when computing ID
This is not strictly necessary, but it is clearer.
* use eip1559.DecodeOptimismExtraData in test
and extend coverage to missing minbasefee
* Update consensus/misc/eip1559/eip1559_optimism.go
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
* use isOptimismHolocene in CalcBaseFee and document assumption about extraData validity
* TestBuildPatload: use nil minBaseFee expectation preJovian
* rework closure…
gabuladze
added a commit
to chiliz-chain/v2
that referenced
this pull request
Mar 2, 2026
#120) * feat(BLK-3623): Pull latest changes from BSC (versions 1.4.14 — 1.6.3) (#1) * eth/tracers: prestate lookup EIP7702 delegation account (#32080) Implement ethereum/go-ethereum#32078 Parse and lookup the delegation account if EIP7702 is enabled. --------- Signed-off-by: jsvisa <delweng@gmail.com> * cmd/geth: era-download logic fix (#32081) Downloading from a range was failing because it would return and error early with an error misinterpreting "start-end". --------- Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * core: warm key TransactionIndexTail by writing (#3196) * miner: default gaslimit 45M (#32087) We believe it is safe to raise the gaslimit to 45M before the Fusaka fork. So this PR changes the default to 45M. * core/rawdb, triedb/pathdb: implement history indexer (#31156) This pull request is part-1 for shipping the core part of archive node in PBSS mode. * cmd/geth, triedb: add pathdb state verification (#32086) This pull request ports the snapshot iteration logic from the legacy implementation. * core, consensus/beacon: defer trie resolution (#31725) Previously, the account trie for a given state root was resolved immediately when the stateDB was created, implying that the trie was always required by the stateDB. However, this assumption no longer holds, especially for path archive nodes, where historical states can be accessed even if the corresponding trie data does not exist. * cmd/utils: fix formatting for beacon flag errors to fit Fatalf form (#32090) Noticed that the errors for the blsync flags were not formatted correctly for `Fatalf(..)`. * eth, triedb/pathdb: permit write buffer allowance in PBSS archive mode (#32091) This pull request fixes a flaw in PBSS archive mode that significantly degrades performance when the mode is enabled. Originally, in hash mode, the dirty trie cache is completely disabled when archive mode is active, in order to disable the in-memory garbage collection mechanism. However, the internal logic in path mode differs significantly, and the dirty trie node cache is essential for maintaining chain insertion performance. Therefore, the cache is now retained in path mode. * core, eth, triedb: serve historical states over RPC (#31161) This is the part-2 for archive node over path mode, which ultimately ships the functionality to serve the historical states * triedb/pathdb: fix journal resolution in pathdb (#32097) This pull request fixes a flaw in the PBSS state iterator, which could return empty account or storage data. In PBSS, multiple in-memory diff layers and a write buffer are maintained. These layers are persisted to the database and reloaded after node restarts. However, since the state data is encoded using RLP, the distinction between nil and an empty byte slice is lost during the encode/decode process. As a result, invalid state values such as `[]byte{}` can appear in PBSS and ultimately be returned by the state iterator. Checkout https://github.com/ethereum/go-ethereum/blob/master/triedb/pathdb/iterator_fast.go#L270 for more iterator details. It's a long-term existent issue and now be activated since the snapshot integration. The error `err="range contains deletion"` will occur when Geth tries to serve other peers with SNAP protocol request. --------- Co-authored-by: Felix Lange <fjl@twurst.com> * all: incorporate state history indexing status into eth_syncing response (#32099) This pull request tracks the state indexing progress in eth_syncing RPC response, i.e. we will return non-null syncing status until indexing has finished. * version: release go-ethereum v1.16.0 stable * version: begin v1.16.1 release cycle * .gitea: trigger PPA upload on tag * .travis.yml: remove travis configuration * hash: remove caching that was decreasing perf (#3146) * all: replace override.prague with osaka (#32093) replace `--override.prague` with `--override.osaka` Signed-off-by: jsvisa <delweng@gmail.com> * node: do not double-wrap KV stores (#32089) For no apparent reason, KV stores were getting wrapped in `nofreezedb` first and then in `freezerdb`. * eth: correct tracer initialization in BlockchainConfig (#32107) core.BlockChainConfig.VmConfig is not a pointer, so setting the Tracer on the `vmConfig` object after it was passed to options does *not* apply it to options.VmConfig This fixes the issue by setting the value directly inside the `options` object and removing the confusing `vmConfig` variable to prevent further mistakes. * miner: fix metric simulateSpeedGauge * .gitea: switch release builds to static linking (#32118) This is to avoid compatibility issues with mismatched glibc versions between the builder and deployment target. Fixes #32102 * .gitea: fix 386 upload * all: clear up `Verify Node` logic (#3199) * miner: change default mev config (#3143) * .gitea: disable cron schedule * triedb: reset state indexer after snap synced (#32104) Fix the issue after initial snap sync with `gcmode=archive` enabled. ``` NewPayload: inserting block failed error="history indexing is out of order, last: null, requested: 1" ``` --------- Signed-off-by: Delweng <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * eth/filters: add address limit to filters (#31876) The address filter was never checked against a maximum limit, which can be somewhat abusive for API nodes. This PR adds a limit similar to topics This pull request introduces a new validation to enforce a maximum limit on the number of addresses allowed in filter criteria for Ethereum logs. It includes updates to the `FilterAPI` and `EventSystem` logic, as well as corresponding test cases to ensure the new constraint is properly enforced. * **Validation for maximum addresses in filter criteria**: - Added a new constant, `maxAddresses`, set to 100, to define the maximum allowable addresses in a filter. - Introduced a new error, `errExceedMaxAddresses`, to handle cases where the number of addresses exceeds the limit. - Updated the `GetLogs` method in `FilterAPI` to validate the number of addresses against `maxAddresses`. - Modified the `UnmarshalJSON` method to return an error if the number of addresses in the input JSON exceeds `maxAddresses`. - Added similar validation to the `SubscribeLogs` method in `EventSystem`. * **New test cases for address limit validation**: - Added a test in `TestUnmarshalJSONNewFilterArgs` to verify that exceeding the maximum number of addresses triggers the `errExceedMaxAddresses` error. - Updated `TestInvalidLogFilterCreation` to include a test case for an invalid filter with more than `maxAddresses` addresses. - Updated `TestInvalidGetLogsRequest` to test for invalid log requests with excessive addresses. These changes ensure that the system enforces a reasonable limit on the number of addresses in filter criteria, improving robustness and preventing potential performance issues. --------- Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> * miner: only recommit bids when no error happens (#3204) * chore: fix problematic comment (#3189) * chore: fix duplicated counter (#3187) * Fix log indexer noise after debug_setHead operations (#31934) This PR resolves Issue #31929 by reducing log noise generated by the log indexer after `debug_setHead` operations. When `debug_setHead` is called to rewind the blockchain, blocks are removed from the database. However, the log indexer's `ChainView` objects may still hold references to these deleted blocks. When `extendNonCanonical()` attempts to access these missing headers, it results in: 1. **Repeated ERROR logs**: `Header not found number=X hash=0x...` 2. **Log noise** that can mask other important errors 3. **User confusion** about whether this indicates a real problem The issue occurs because: - `debug_setHead` removes blocks from the blockchain database - Log indexer's `ChainView` may still reference deleted block hashes - `extendNonCanonical()` in `core/filtermaps/chain_view.go` tries to fetch these missing headers - The existing `return false` logic properly handles the error, but logs at ERROR level This is a **logging improvement only** - no functional logic changes: 1. **Log level**: Changed from `ERROR` to `DEBUG` 2. **Log message**: Enhanced with descriptive context about chain view extension 3. **Comments**: Added explanation for when this situation occurs 4. **Behavior**: Maintains existing error handling (`return false` was already present) ```go // Before log.Error("Header not found", "number", number, "hash", hash) return false // After // Header not found - this can happen after debug_setHead operations // where blocks have been deleted. Return false to indicate the chain view // is no longer valid rather than logging repeated errors. log.Debug("Header not found during chain view extension", "number", number, "hash", hash) return false ``` - ✅ All existing filtermaps tests pass: `go test ./core/filtermaps -v` - ✅ No regressions in related functionality 1. **Before fix**: Started geth in dev mode, generated blocks, called `debug_setHead(3)` → **5 repeated ERROR logs** 2. **After fix**: Same scenario → **4 DEBUG logs, no ERROR noise** ```bash rm -rf ./dev-test-data ./build/bin/geth --dev --datadir ./dev-test-data --http --http.api debug,eth,net,web3 --verbosity 4 curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_setHead","params":["0x3"],"id":1}' http://localhost:8545 ``` - Fixes #31929 This issue was reported as spurious error messages appearing after `debug_setHead` operations. The investigation revealed that while the error handling was functionally correct, the ERROR log level was inappropriate for this expected scenario in development/debugging workflows. The fix maintains full compatibility while significantly improving the debugging experience for developers using `debug_setHead`. --------- Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com> Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> * core/filtermaps: clean up log format of unindexing message (#32123) Sorry for not fully fixed in ethereum/go-ethereum#31761, now the log format of unindexing message is cleaned up, to make it consistent with the indexing message. * eth/catalyst: fix the log message in newPayloadV4 (#32125) It should be `newPayloadV4 must only be called for prague payloads` for the V4 payload error * refactor: replace []byte(fmt.Sprintf) with fmt.Appendf (#3136) * internal/ethapi: prealloc map for the txpool api (#32110) use `make(map, len(txpool))` to prealloc the map for the txpool content, to avoid the map growing in the loop. * ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021) Towards ethereum/go-ethereum#26974 --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> * ethdb: tuning pebble compaction parameter (#3205) * internal: remove unused shh and swarm modules from console (#32073) Similar to ethereum/go-ethereum#31856, remove the not availabe shh, swarm modules in the console. --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> * core/filtermaps: define APIs for map, epoch calculation (#31659) This pull request refines the filtermap implementation, defining key APIs for map and epoch calculations to improve readability. This pull request doesn't change any logic, it's a pure cleanup. --------- Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> * core/types: blockTimestamp in logs is hex-encoded (#32129) closes #32120 * core/rawdb, triedb/pathdb: fix two inaccurate comments (#32130) * refactor: remove outdated prune-block/pruneancient tool, implement it by tail-deletion (#2809) * eth/catalyst: fix edge case in simulated backend (#31871) geth cmd: `geth --dev --dev.period 5` call: `debug.setHead` to rollback several blocks. If the `debug.setHead` call is delayed, it will trigger a panic with a small probability, due to using the null point of `fcResponse.PayloadID`. --------- Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> * accounts/abi: generate TryPack* methods for abigen v2 bindings (#31692) 1. Fix the error return format. **todo**: ~~`bindtype` needs more complex logic to fix it.~~ ` if err != nil { return nil, err } if err == nil { return obj, nil } ` 2. ~~Return pointer type object to avoid copying the whole struct content.~~ 3. Give the panic decision to the user. 4. Fix empty line at the end of function. **TODO**: ~~fix some related test cases.~~ --------- Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com> * version: release go-ethereum v1.16.1 stable * params: only enable sharedStorage on special blocks (#3209) * consensus/parlia: warn fast node to update to latest hard fork version * chore: make function comment match function names (#3142) * feat: enable shared storage pool (#3197) * chore: fix some minor issues in the comments (#3216) * ethdb : disable blockstore of multidatabase (#3208) * refactor: use the built-in max/min to simplify the code (#3217) * p2p: treat all EVN peer as trust node; (#3212) * chore: fix struct comment (#3207) * jsutils: some minor updates (#3222) * chore: fix some comments (#3220) * doc: update go version required (#3224) * refactor: use slices.Contains to simplify code (#3223) * state: extra check for nano address (#3225) * release: prepare for release v1.5.18 (#3230) * chore: fix some typos (#3231) * ethdb: fix disable freezer when enable multidb (#3233) * build(deps): bump golang.org/x/oauth2 from 0.24.0 to 0.27.0 (#3243) * refactor: use maps.Copy for cleaner map handling (#3235) * freezer: change freeze batch size; (#3251) * release: prepare for release v1.5.19 (#3252) * jsutils: get slash count with specific step size and counter (#3256) * prestate_tracer.js: clean-up (#3257) * Fixed parseValidatorFrequencies() * jsutil: fix a getSlashCount issue (#3267) * upstream: fix CIs after geth-v1.16.1 merged (#4) * workflows: remove check_tidy * all: fix compile error in test cases * CI: fix the lint CI * CI: rm .gitea * tests: update version of testdata to v17.0 * UT: fix core dir * fix eth dir * fix cmd dir * fix ethclient_test dir * tests: update spec-tests version * accounts: skip TestWaitDeployedCornerCases * CI: fix integration CI * core: remove duplicate codes * p2p: opt enr filter in peer discovery; (#3237) * prefetch: lower prefetch threshold from 100 to 50 (#3274) 100 was for previous 3 seconds block interval, with shorter block interval it is better to be a smaller value, could be helpful for bid simulate and block import * chore: fix some function names in comment (#3272) * feat: SuperInstruction implementation in EVM (#3260) * feat: opcode optimization master squash (#3259) * feat: patch opcode optimization Co-authored-by: cbh876 <3930922419@qq.com> Co-authored-by: Sunny <sunny2022.za@gmail.com> Co-authored-by: constwz <122766871+constwz@users.noreply.github.com> * core/rawdb: set multiDatabase properly when create ChainFreezer * core/rawdb: remove useless option multiDatabase for chainFreezer * core/rawdb: define useFinalizedForFreeze * core/state: Added GetOrNewStateObject() back * all: initial rough correction for code upstream cmd/geth: disable ChainHistoryFlag cmd/utils: remove flag cache.enablesharedpool all: remove disableFreeze eth: disable blockRangeLoop core/vm: remove EVMPool core: new snapshot explicitly only with HashScheme core/filtermaps: leave a todo for filtermaps/checkpoints core: more threads for state prefetch eth: supress the useless lint for blockRangeLoop * eth: don't send BlockRangeUpdateMsg * eth/downloader: fix ancient limit in snap sync (#32188) This pull request fixes an issue in disabling direct-ancient mode in snap sync. Specifically, if `origin >= frozen && origin != 0`, it implies a part of chain data has been written into the key-value store, all the following writes into ancient store scheduled by downloader will be rejected with error `ERROR[07-10|03:46:57.924] Error importing chain data to ancients err="can't add block 1166 hash: the append operation is out-order: have 1166 want 0"`. This issue is detected by the https://github.com/ethpandaops/kurtosis-sync-test, which initiates the first snap sync cycle without the finalized header and implicitly disables the direct-ancient mode. A few seconds later the second snap sync cycle is initiated with the finalized information and direct-ancient mode is enabled incorrectly. * eth/fetcher: fix announcement drop logic (#32210) This PR fixes an issue in the tx_fetcher DoS prevention logic where the code keeps the overflow amount (`want - maxTxAnnounces`) instead of the allowed amount (`maxTxAnnounces - used`). The specific changes are: - Correct slice indexing in the announcement drop logic - Extend the overflow test case to cover the inversion scenario * all: fix outdated ethereum wiki json-rpc json-rpc doc links (#32209) Replace outdated wiki reference with ethereum.org documentation links * core/types: fix CellProofsAt method (#32198) * account/abi/bind/v2: fix TestDeploymentWithOverrides (#32212) The root cause of the flaky test was a nonce conflict caused by async contract deployments. This solution defines a custom deployer with automatic nonce management. * eth/tracers: apply block header overrides correctly (#32183) Fixes #32175. This fixes the scenario where the blockhash opcode would return 0x0 during RPC simulations when using BlockOverrides with a future block number. The root cause was that BlockOverrides.Apply() only modified the vm.BlockContext, but GetHashFn() depends on the actual types.Header.Number to resolve valid historical block hashes. This caused a mismatch and resulted in incorrect behavior during trace and call simulations. --------- Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: lightclient <lightclient@protonmail.com> * eth/protocols/snap: fix negative eta in state progress logging (#32225) * triedb/pathdb: fix incorrect address length in history searching (#32248) We should use account length to check address, else OOB maybe occured Signed-off-by: jsvisa <delweng@gmail.com> * eth/gasestimator: fix potential overflow (#32255) Improve binary search, preventing the potential overflow in certain L2 cases * triedb/pathdb: fix an deadlock in history indexer (#32260) Seems the `signal.result` was not sent back in shorten case, this will cause a deadlock. --------- Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> * eth/catalyst: fix error message in ExecuteStatelessPayloadV4 (#32269) Correct the error message in the ExecuteStatelessPayloadV4 function to reference newPayloadV4 and the Prague fork, instead of incorrectly referencing newPayloadV3 and Cancun. This improves clarity during debugging and aligns the error message with the actual function and fork being validated. No logic is changed. --------- Co-authored-by: rjl493456442 <garyrong0905@gmail.com> * downloader: fix typos, grammar and formatting (#32288) * ethclient/simulated: Fix flaky rollback test (#32280) This PR addresses a flakiness in the rollback test discussed in ethereum/go-ethereum#32252 I found `nonce` collision caused transactions occasionally fail to send. I tried to change error message in the failed test like: ``` if err = client.SendTransaction(ctx, signedTx); err != nil { t.Fatalf("failed to send transaction: %v, nonce: %d", err, signedTx.Nonce()) } ``` and I occasionally got test failure with this message: ``` === CONT TestFlakyFunction/Run_#100 rollback_test.go:44: failed to send transaction: already known, nonce: 0 --- FAIL: TestFlakyFunction/Run_#100 (0.07s) ``` Although `nonces` are obtained via `PendingNonceAt`, we observed that, in rare cases (approximately 1 in 1000), two transactions from the same sender end up with the same nonce. This likely happens because `tx0` has not yet propagated to the transaction pool before `tx1` requests its nonce. When the test succeeds, `tx0` and `tx1` have nonces `0` and `1`, respectively. However, in rare failures, both transactions end up with nonce `0`. We modified the test to explicitly assign nonces to each transaction. By controlling the nonce values manually, we eliminated the race condition and ensured consistent behavior. After several thousand runs, the flakiness was no longer reproducible in my local environment. Reduced internal polling interval in `pendingStateHasTx()` to speed up test execution without impacting stability. It reduces test time for `TestTransactionRollbackBehavior` from about 7 seconds to 2 seconds. * eth: fix typos and outdated comments (#32324) * 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. * core/state: delete storagePool further * core: temporarily disable history pruning * core: clear up useless StopPrefetcher * ethdb: remove func HasAncient * core/rawdb: remove MultiDatabase in OpenOptions * core/rawdb: adapt the prune feature exsited in bsc * core: fix temporarily disable history pruning * core/state: not dump trie in fastnode * core/state: add a todo to refactor triePrefetcher * core/state: fix getting from cache when needBadSharedStorage * core: run repair for txIndex loop * core/vm: explict the configure of bigModExp precompile * triedb: align code more closely with geth * ethdb,trie: align code more closely with geth * params: define more forks * ethdb: add a todo to remove ItemAmountInAncient and AncientOffSet * Deleted les * Deleted light * Replaced faucet code with latest version from bsc * core/types: disable EIP-7594 in BSC (#3291) * Fixed incValidatorBlockCount * api.go: add retry for snapshots stale error (#3290) * fix: set all chain tables to be prunable (#3294) * Removed redundant metric code. Fixed snake8 fork name. * core/fitermaps: fix final block logic * Use epoch length from genesis instead of default value 200. * Added back log * fix: only enable EVN feature after node get synced (#3309) to fix: bnb-chain/bsc#3303 the node will periodically failed to call stakehub before the node is synced * consensus/parlia: ignore client version warning when in history sync (#3308) * core/state: code clear up (#3313) * worker: fix a trie prefetch corner case (#3314) During mining phase, if a new block was just imported, TransferPrefetcher could transfer a TriePrefetcher of previous block to the new block, which would cause later error on OpenTrieStorage of the TriePrefetch routine. * docs: update readme for release types (#3315) * freezer: slow down freeze when live sync; (#3310) * core/filtermaps: stop indexing if target block is pruned * release: prepare for release v1.6.0-alpha (#3322) * ci: fix truffer error (#3326) solc-0.6.4 can not be downloaded from truffle solc-bin * ci: ignore nancy failre of rs/cors@v1.8.2 (#3327) It is an issue reported in rs/cors#170 and fixed by rs/cors#171, which was included in release v1.11.0(Apr 2024): https://github.com/rs/cors/releases/tag/v1.11.0 But v1.8.2 was released in Dec 2021, which may have a lot difference. And this vulnerability is limitted only to RPC nodes with maliciously configuration in config.tion: [Node] HTTPCors = ["<malicious cors>",...] So instead of upgrade to v1.11.0+, simply add it to nancy ignore for now * github: update issue template (#3328) * miner: avoid to commit a bid twice (#3336) * miner: avoid to commit a bid twice * core: wait db writing before setting head * miner: fix comment for tcount * miner: improve warn log for committed work * miner: add committed flag for environment * miner: improve func commit * eth/pebble: use NoSync as write mode (#3337) * FilterMap: update bsc checkpoint file (#3332) * Override defaultEpochLength with value from genesis config and use it in snapshot(). * eth/downloader: remove InsertHeaderChain to improve sync speed (#3324) * core/rawdb: remove func AncientOffSet and ItemAmountInAncient (#3319) * chore: fix some minor issues in comment (#3301) * cmd/geth: remove subcmd hbss2pbss and insecure-prune-all (#3346) * fix: discovery AyncFilter deadlock on shutdown (#3347) * core: rework fast node (#3340) * Don't overwrite snap.FrequencyRLP if it's already defined in snapshot() * freezer: add debug log for out of bounds access (#3354) * core/rawdb: align more code with upstream (#3348) * log: lower the spam log level (#3357) * release: prepare for release v1.6.1-beta (#3355) * log: downgrade log level when header fetch failed (#3359) * chore: fix SnapSyncWithBlobs UT issues; (#3362) * cmd/utils: set journalfile default to true (#3361) * core/systemcontracts: define fermiUpgrade (#3372) * BEP-619: Short Block Interval Phase Three: 0.45 Seconds (#3367) * ethapi: reject oversize storage keys before hex decode (#32750) (#3373) Bail out of decodeHash when the raw hex string is longer than 32 byte before actually decoding. * Implement BEP-592: Non-Consensus Based Block-Level Access List (#3374) * BEP-590: Extended Voting Rules for Fast Finality Stability (#3368) * BEP-590: Extended Voting Rules for Fast Finality Stability * core/vote: update deadline for voting * websocket: add `transactionReceipts` for receipts notification (#3363) * miner/minerconfig: update config to adapt 100M gaslimit (#3388) * miner/minerconfig: update config to adapt 100M gaslimit * miner/minerconfig: update default GasCeil to 100M * miner/minerconfig: update comment * release: prepare for release v1.6.2 (#3386) * chore: cache receipts (#3391) * feat: implement incremental snapshot (#3390) * build(deps): bump github.com/quic-go/quic-go from 0.48.2 to 0.49.1 Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.48.2 to 0.49.1. - [Release notes](https://github.com/quic-go/quic-go/releases) - [Commits](quic-go/quic-go@v0.48.2...v0.49.1) --- updated-dependencies: - dependency-name: github.com/quic-go/quic-go dependency-version: 0.49.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * feat: EVM execution opcode level optimization (#3395) * fix: add secrets config to nancy ci (#3398) * consensus/parlia: set kAncestorGenerationDepth to 3 in BEP-590 (#3400) * consensus/parlia: fix updateAttestation&improve assembleVoteAttestation (#3397) * core/rawdb: fix WriteBAL (#3403) * miner: validator not inturn backoff before mining (#3404) * fix: change lock to read lock in legacypool (#3407) * miner: add metrics for get pending txs (#3410) * json-rpc-api.md: typo (#3409) * eth: broadcast votes to evn peers regardless of deltaTdThreshold (#3415) * cmd/geth: improve config for sentry nodes when init network (#3416) * jsutil: update some parameter (#3414) * p2p: define ProxyedNodeIds in Config (#3417) * p2p: define ProxyedNodeIds in Config * eth: downgrade log level for setProxyedPeers * cmd/geth: sentry not send txs to validator * cmd/geth: use static nodes when deploy without sentry * cmd/geth: fix TestInitNetworkLocalhost * eth: not broadcast txs directly to proxyed nodes * miner: use latest block as pending block for simplicity (#3419) * miner: use latest block as pending block for simplicity * miner: delete pendingLogs * miner: log time in header (#3422) Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com> * eth: increase the delta td threshold to broadcast votes (#3426) * config: update BSC Testnet hardfork time: Ferimi (#3427) expected Testnet Fermi hard fork time: 2025-11-10 02:25:00 AM UTC * miner: improve prefetch mining by using cached reader (#3423) * miner: improve prefetch mining by using cached reader * core/state: handle err when create StateDB for prefetch * core/state: use the same prefetcher when create state for prefetch * core: check statedb --------- Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com> * revert: revert the nano check in parlia (#3436) * eth: fix stuck when handleBlockBroadcast (#3435) * build(deps): bump github.com/consensys/gnark-crypto (#3429) Bumps [github.com/consensys/gnark-crypto](https://github.com/consensys/gnark-crypto) from 0.18.0 to 0.18.1. - [Release notes](https://github.com/consensys/gnark-crypto/releases) - [Changelog](https://github.com/Consensys/gnark-crypto/blob/v0.18.1/CHANGELOG.md) - [Commits](Consensys/gnark-crypto@v0.18.0...v0.18.1) --- updated-dependencies: - dependency-name: github.com/consensys/gnark-crypto dependency-version: 0.18.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * internal/ethapi: fix eth_simulateV1 (#3433) * eth/tracers: fix crasher in TraceCall with BlockOverrides (#3431) * release: prepare for release v1.6.3 (#3437) * Revert "Merge tag 'v1.5.19-feature-SI' into BLK-3623-pull-all-the-latest-changes-from-bsc" This reverts commit 9405e8b660b855a80142886af78946a4ba343489, reversing changes made to 00587bcb63a3551db2501d236e6da4716d791afd. * Set static IPs for nodes to workaroud DNS resolution issue with bootnodes flag. go-ethereum#31208 * Updated chiliz related evm modifications to work with v1.6.0 * Fixed invalid FrequencyRLP issue in snapshot * Moved pepper8RecipientAddress to common/pepper8. Updated state_transition::preCheck() to handle pepper8 transactions correctly. * Reduced GetPepper8MintAmount log verbosity Info->Trace * Removed redundant balace update code for system transactions from tracers * Updated evm::Call() to call applyChilizInvocationEvmHook() for smart contract calls only. This fixes "incorrect number of top level calls" error when tracing EOA->EOA transfers. * eth/tracers: Fixed traceBlock * eth/tracers: Fixed all tracers for pepper8 & system txs * Fixed lint errors * go mod tidy * Removed custom block distribution metric collection code * upgrade golang from 1.21-alpine to 1.25.5-alpine * Set version to 2.7.0 * Set genesis repo to v4.0.1 --------- Signed-off-by: jsvisa <delweng@gmail.com> Signed-off-by: Delweng <delweng@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Delweng <delweng@gmail.com> Co-authored-by: shazam8253 <54690736+shazam8253@users.noreply.github.com> Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> Co-authored-by: buddho <galaxystroller@gmail.com> Co-authored-by: Felix Lange <fjl@twurst.com> Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com> Co-authored-by: Matus Kysel <MatusKysel@users.noreply.github.com> Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com> Co-authored-by: Stéphane Duchesneau <stephane.duchesneau@gmail.com> Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org> Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> Co-authored-by: chengehe <hechenge@yeah.net> Co-authored-by: will-2012 <117156346+will-2012@users.noreply.github.com> Co-authored-by: Forrest Kim <38067691+ForrestKim42@users.noreply.github.com> Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com> Co-authored-by: nthumann <nthumanna@gmail.com> Co-authored-by: clonemycode <168618167+clonemycode@users.noreply.github.com> Co-authored-by: wayen <19421226+flywukong@users.noreply.github.com> Co-authored-by: Zhou <DanialZhouMAX@gmail.com> Co-authored-by: galaio <12880651+galaio@users.noreply.github.com> Co-authored-by: maskpp <maskpp266@gmail.com> Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com> Co-authored-by: findmyhappy <167661649+findmyhappy@users.noreply.github.com> Co-authored-by: shangchenglumetro <shuang.cui@live.com> Co-authored-by: rustfix <155627174+rustfix@users.noreply.github.com> Co-authored-by: ianlv <168640168+ianlv@users.noreply.github.com> Co-authored-by: zzzckck <152148891+zzzckck@users.noreply.github.com> Co-authored-by: Hanlu <liangmulu@outlook.com> Co-authored-by: formless <213398294+allformless@users.noreply.github.com> Co-authored-by: 荆长逯 <jingchanglu@outlook.com> Co-authored-by: kaifulee <52813034+kaifulee@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Anna Smith <155628741+socialsister@users.noreply.github.com> Co-authored-by: Eric <45141191+zlacfzy@users.noreply.github.com> Co-authored-by: tanhuaan <tanhuaan@outlook.com> Co-authored-by: Annie <108039750+annielz@users.noreply.github.com> Co-authored-by: cbh876 <3930922419@qq.com> Co-authored-by: Sunny <sunny2022.za@gmail.com> Co-authored-by: constwz <122766871+constwz@users.noreply.github.com> Co-authored-by: Bosul Mun <bsbs8645@snu.ac.kr> Co-authored-by: FT <140458077+zeevick10@users.noreply.github.com> Co-authored-by: steven <wangpeculiar@gmail.com> Co-authored-by: lightclient <lightclient@protonmail.com> Co-authored-by: gzeon <h@arry.io> Co-authored-by: Galoretka <galoretochka@gmail.com> Co-authored-by: Tomás Andróil <tomasandroil@gmail.com> Co-authored-by: kashitaka <takao.w9st.kashima@xica.net> Co-authored-by: VM <112189277+sysvm@users.noreply.github.com> Co-authored-by: alex-10072 <ttalex101@gmail.com> Co-authored-by: deepdring <deepdrink@icloud.com> Co-authored-by: lx <92799281+brilliant-lx@users.noreply.github.com> Co-authored-by: david-ppp <164000748+david-ppp@users.noreply.github.com> Co-authored-by: Roshan <48975233+pythonberg1997@users.noreply.github.com> Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com> * Fixed typo * feat(BLK-3697): Set InitialBaseFeeForBSC to 2500000000000 (#7) * Set InitialBaseFeeForBSC to 2500000000000 to fix genesis hash mismatch error * Removed len(frequencyRLP) from log * feat(BLK-3701): Disabled feynmanTime and feynmanFixTime forks (#9) * params: commented feynmanTime and feynmanFixTime forks in CheckConfigForkOrder() * Set BlobTxMinBlobGasprice to 150gwei * Use 3s block time for MinBlocksForBlobRequests and DefaultExtraReserveForBlobRequests. Revert MaxCodeSize to 24kb (#10) * core/vm: restored systemcontract evm hook (#18) * is it a fix ? * consensus/parlia: Reduced log verbosity for isSnake8Enabled() * core/vm: moved applyChilizInvocationEvmHook() call up * Revert "core/vm: moved applyChilizInvocationEvmHook() call up" This reverts commit c19bc951b0f4d6ceca3b8f1496b372164d996fbc. * core/state: set accessList to nil in SetTxContext * Revert "core/state: set accessList to nil in SetTxContext" This reverts commit 4003a6833e1e7c4c82efc9e282b3851268b2bd3a. * core/state: set accessList to nil in ClearAccessList() * core/state: handle nil accessList * Revert "core/state: handle nil accessList" This reverts commit d680d07184461231893d7342c54b3ca8e34955af. * Revert "core/state: set accessList to nil in ClearAccessList()" This reverts commit 8905e968e6c39887d3b3b08b325893fc358f3843. * params: reduced GasLimitBoundDivisor from 1024 -> 256 * Revert "params: reduced GasLimitBoundDivisor from 1024 -> 256" This reverts commit 41c9925d1eed5e45e19d2cb5f1b89867650e4e5d. * consensus/parlia, eth, params: Added SystemTxsGas to params and updated code to use it * Revert "consensus/parlia, eth, params: Added SystemTxsGas to params and updated code to use it" This reverts commit 31583ac9ddceb508bf5d0aa65c1047690b8b72e4. --------- Co-authored-by: Giorgi Abuladze <giorgi.abuladze@chiliz.com> * fix(BLK-3607): bugfixes for tracers module (#19) * Add tx.value to balance for tokenomics deposits in TraceTransaction * log whole rpc message * log only failed requests * Removed log * eth/tracers: handle pepper8 deposit tx tracing in TraceTransaction() * consensus/parlia: Added IsPepper8Deposit() to parlia * eth/tracers: user IsPepper8Deposit() instead of IsPepper8Block() in standardTraceBlockToFile() * eth/tracers: Use IsPepper8Deposit() instead of IsPepper8Block() in traceBlockParallel() * eth/tracers: Use IsPepper8Deposit() instead of IsPepper8Block() in traceChain() * eth/tracers: Use IsPepper8Deposit() instead of IsPepper8Block() in IntermediateRoots() * eth/tracers: Use IsPepper8Deposit() instead of IsPepper8Block() in traceBlock() * eth: Use IsPepper8Deposit() instead of IsPepper8Block() in stateAtTransaction() * rpc: log params for failed calls * rpc: fixed typo * core/vm: don't trace DeployerProxy calls * core/vm: fixed imports * eth/tracers/api: add systemAddress balance to coinbase in TraceTransaction * eth: added log for pepper8 deposit * eth, rpc: removed redundant logs * bumped version to 2.7.3 (#20) * Bump genesis submodule to v5.0.0 --------- Signed-off-by: jsvisa <delweng@gmail.com> Signed-off-by: Delweng <delweng@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Delweng <delweng@gmail.com> Co-authored-by: shazam8253 <54690736+shazam8253@users.noreply.github.com> Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> Co-authored-by: buddho <galaxystroller@gmail.com> Co-authored-by: Felix Lange <fjl@twurst.com> Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com> Co-authored-by: Matus Kysel <MatusKysel@users.noreply.github.com> Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com> Co-authored-by: Stéphane Duchesneau <stephane.duchesneau@gmail.com> Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org> Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com> Co-authored-by: chengehe <hechenge@yeah.net> Co-authored-by: will-2012 <117156346+will-2012@users.noreply.github.com> Co-authored-by: Forrest Kim <38067691+ForrestKim42@users.noreply.github.com> Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com> Co-authored-by: nthumann <nthumanna@gmail.com> Co-authored-by: clonemycode <168618167+clonemycode@users.noreply.github.com> Co-authored-by: wayen <19421226+flywukong@users.noreply.github.com> Co-authored-by: Zhou <DanialZhouMAX@gmail.com> Co-authored-by: galaio <12880651+galaio@users.noreply.github.com> Co-authored-by: maskpp <maskpp266@gmail.com> Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com> Co-authored-by: findmyhappy <167661649+findmyhappy@users.noreply.github.com> Co-authored-by: shangchenglumetro <shuang.cui@live.com> Co-authored-by: rustfix <155627174+rustfix@users.noreply.github.com> Co-authored-by: ianlv <168640168+ianlv@users.noreply.github.com> Co-authored-by: zzzckck <152148891+zzzckck@users.noreply.github.com> Co-authored-by: Hanlu <liangmulu@outlook.com> Co-authored-by: formless <213398294+allformless@users.noreply.github.com> Co-authored-by: 荆长逯 <jingchanglu@outlook.com> Co-authored-by: kaifulee <52813034+kaifulee@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Anna Smith <155628741+socialsister@users.noreply.github.com> Co-authored-by: Eric <45141191+zlacfzy@users.noreply.github.com> Co-authored-by: tanhuaan <tanhuaan@outlook.com> Co-authored-by: Annie <108039750+annielz@users.noreply.github.com> Co-authored-by: cbh876 <3930922419@qq.com> Co-authored-by: Sunny <sunny2022.za@gmail.com> Co-authored-by: constwz <122766871+constwz@users.noreply.github.com> Co-authored-by: Bosul Mun <bsbs8645@snu.ac.kr> Co-authored-by: FT <140458077+zeevick10@users.noreply.github.com> Co-authored-by: steven <wangpeculiar@gmail.com> Co-authored-by: lightclient <lightclient@protonmail.com> Co-authored-by: gzeon <h@arry.io> Co-authored-by: Galoretka <galoretochka@gmail.com> Co-authored-by: Tomás Andróil <tomasandroil@gmail.com> Co-authored-by: kashitaka <takao.w9st.kashima@xica.net> Co-authored-by: VM <112189277+sysvm@users.noreply.github.com> Co-authored-by: alex-10072 <ttalex101@gmail.com> Co-authored-by: deepdring <deepdrink@icloud.com> Co-authored-by: lx <92799281+brilliant-lx@users.noreply.github.com> Co-authored-by: david-ppp <164000748+david-ppp@users.noreply.github.com> Co-authored-by: Roshan <48975233+pythonberg1997@users.noreply.github.com> Co-authored-by: NathanBSC <122502194+NathanBSC@users.noreply.github.com> Co-authored-by: Cyril Maurel <cyril@chiliz.com>
qianhh
pushed a commit
to bane-labs/go-ethereum
that referenced
this pull request
Mar 20, 2026
Similar to ethereum/go-ethereum#31856, remove the not availabe shh, swarm modules in the console. --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
compileandeth_getWorketh_submitWorkapis were not available anymore, so try to remove them