add eth_getTransactionBySenderAndNonce RPC - #10501
Merged
Merged
Conversation
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Implements eth_getTransactionBySenderAndNonce as described in issue besu-eth#10284. - Add sender+nonce → tx hash index (prefix 0x09) to KeyValueStoragePrefixedKeyBlockchainStorage - Populate index during block import (handleNewHead, handleChainReorg, unsafeImportBlock) - Remove index entries on chain reorg/rewind via clearIndexedTransactionsForBlock - Add getTransactionHashBySenderAndNonce to Blockchain interface and DefaultBlockchain - Add BlockchainQueries.transactionBySenderAndNonce query method - Add EthGetTransactionBySenderAndNonce RPC handler with address + hex-nonce params - Register as eth_getTransactionBySenderAndNonce in EthJsonRpcMethods - Add stub implementations in ReferenceTestBlockchain and T8nBlockchain - Add unit tests for the RPC handler Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
…once Aligns with geth and reth behaviour: query pending transactions first, fall back to the mined-transaction index for confirmed transactions. Returns a pending result (no block metadata) when found in the pool, or a full TransactionWithMetadata result when found on-chain. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Matches geth's behaviour: the sender+nonce → tx hash index is opt-in. Existing nodes that upgrade will not have historical entries in the index and would silently return null for pre-upgrade transactions, which is misleading. Enabling the flag on an existing node requires a re-sync to populate historical data. The flag gates putTransactionHashBySenderAndNonce / removeTransactionHashBySenderAndNonce calls in DefaultBlockchain so no storage overhead is incurred unless explicitly opted in. Wired through BesuControllerBuilder.senderNonceIndexingEnabled() and exposed as --tx-sender-nonce-index-enabled in BesuCommand. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
…besu into eth-get-tx-by-sender-and-nonce
jflo
approved these changes
May 28, 2026
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
macfarla
marked this pull request as draft
May 29, 2026 02:17
Contributor
Author
|
I'm rethinking the CLI option |
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
…besu into eth-get-tx-by-sender-and-nonce
macfarla
marked this pull request as ready for review
May 29, 2026 03:57
Contributor
Author
|
I have changed the CLI option to default to true so no action required from users unless they want to turn this off |
Contributor
Author
|
Manual kurtosis devnet validation — Spun up a 2-node devnet using ethpandaops/ethereum-package (minimal preset) with one node at default ( participants:
- el_type: besu
el_image: hyperledger/besu:26.5-develop-d6cacd7
cl_type: lighthouse
- el_type: besu
el_image: hyperledger/besu:26.5-develop-d6cacd7
cl_type: lighthouse
el_extra_params:
- "--tx-sender-nonce-index-enabled=false"
network_params:
preset: minimalSent a transaction after startup (index only populated for blocks imported post-startup), waited for it to mine, then called
|
jframe
reviewed
May 29, 2026
| dataDirectory.toString(), | ||
| numberOfBlocksToCache, | ||
| numberOfBlockHeadersToCache); | ||
| defaultBlockchain.setSenderNonceIndexingEnabled(senderNonceIndexingEnabled); |
Contributor
There was a problem hiding this comment.
Why use a setter here? I think it would be nicer to add another arg to the createMutable method
jflo
approved these changes
May 29, 2026
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
macfarla
enabled auto-merge (squash)
June 1, 2026 03:06
5 tasks
macfarla
added a commit
to macfarla/besu
that referenced
this pull request
Jun 4, 2026
- Rename Unreleased → 26.6.0 - Add fresh Unreleased skeleton - Carry all Upcoming Breaking Changes forward - Move two post-tag entries to Unreleased: - --Xsnapsync-synchronizer-pivot-block-distance-before-caching deprecation - eth_getTransactionBySenderAndNonce (besu-eth#10501) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fab-10
added a commit
to fab-10/besu
that referenced
this pull request
Jun 25, 2026
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Apply suggestions from code review
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
engine_forkchoiceUpdated refactor
Refactor the engine_forkchoiceUpdated V1-V4 hierarchy into a sealed,
version-scheduled implementation under
ethereum.api.jsonrpc.internal.methods.engine.forkchoiceupdated, driven
by a small VersionScheduler that maps each method version to its active
hard-fork range. Introduces typed payload-attribute and forkchoice-state
parameter classes (PayloadAttributesV1-V4, ForkchoiceStateV1) and
adjusts the merge block-creation layer (PayloadIdentifier,
MergeCoordinator, TransitionCoordinator, PreparePayloadArgsBuilder)
accordingly.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
# ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonRpcParameter.java
align block number position in log lines (#10632)
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
Co-authored-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods (#10662)
* feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods
* chore(pow-removal): remove remote sealer / PoW job constants from MiningConfiguration.Unstable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: skip DNSDaemon when --discovery-dns-url is blank or empty (#10666)
Signed-off-by: Usman Saleem <usman@usmans.info>
lazy GetStorageRangeMessage (#10660)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
feat(pow-removal): Phase 1 - remove PoW mining infrastructure (#10656)
* feat(pow-removal): Phase 1 - remove PoW mining infrastructure
Delete all PoW-specific mining code: PoWBlockCreator, PoWBlockMiner,
PoWMinerExecutor, PoWMiningCoordinator, AbstractMinerExecutor,
AbstractMiningCoordinator, IncrementingNonceGenerator, RandomNonceGenerator,
PoWSolver, PoWSolverInputs, PoWObserver.
* fix: pass miningConfiguration to NoopMiningCoordinator in MainnetBesuControllerBuilder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - downloaded storage range tracker (#10609)
* Add storage range tracker
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track all downloaded storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Registrer full range for accounts with empty storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add RangeManager tests asserting starts of generated ranges are increasing
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add test that generated ranges start with min
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
pathbased package refactoring (#10641)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
lazy decoding of GetByteCodeMessage (#10652)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
uprev web3j to 5.0.3 (#10627)
* uprev web3j and add dependency links in acceptance-tests gradle files
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: initialize profilers list before adding gc in jmh config (#10651)
-PgcProfiler=true silently did nothing when -PasyncProfiler was not also
provided
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
upgrade license report plugin (#10650)
* upgrade license report plugin
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory (#10524)
* perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory
Replaces the per-request 100-block scan in eth_gasPrice / eth_maxPriorityFeePerGas
with a per-head FeeOracleSnapshot computed off the block-import thread (when an
EthScheduler is available) and cached by chain-head hash. A cold path on the request
side self-heals: the first caller after a head change computes inline and seeds the
snapshot for subsequent callers. Bounds (miner_setMinGasPrice /
miner_setMinPriorityFee) are still applied at read time against the live mining
config, so configuration changes take effect immediately and never get baked into
a stale snapshot.
eth_feeHistory gains a result cache for "latest" requests, keyed on
(headHash, blockCount, sortedPercentiles, RewardBounds snapshot, nextBlockHardforkId).
Historic-block queries bypass the cache. The pre-existing per-block reward cache now
stores unbounded rewards; request-specific bounding is applied per-call with a
mining-config snapshot taken at request entry. Other targeted wins:
- getBlobBaseFees reuses the previous header instead of issuing one parent-hash
RocksDB read per block (saves up to 255 reads per feeHistory-256 request).
- getNextBaseFee / getNextBlobFee skip the chainHead+1 storage lookup when the
block can't exist (the "latest" case).
- getBlockHeaders uses the bulk Blockchain.getBlockHeaders(start, count) API, which
walks parent hashes from the in-memory header cache.
- Rewards loop is sequential again (fork-join split overhead dominated cache-hit
cases for big ranges).
- TransactionInfo no longer carries the Transaction reference.
DefaultBlockchain.getBlockBody / getTxReceipts now populate the in-memory cache on
read miss (matching the existing getBlockHeader(Hash) pattern). Refactors the three
populate-on-miss accessors into a single getCached<T> helper. Without this fix the
--cache-last-blocks cache only ever held blocks imported since startup, making it
useless for fee-oracle scans of pre-existing chain history.
Tests updated to mock the new access pattern (getBlockHeaders + getBlockBody by
hash). New test latestResultCacheMissesWhenNextBlockHardforkChanges pins the
HardforkId component of the cache key.
Measured on Hoodi via json-bench (k6, 20 RPS x 30s, post-restart, fresh JIT):
test baseline p95 fork p95 speedup
eth_gasPrice 11.64 ms 3.18 ms 3.66x
eth_maxPriorityFeePerGas 10.34 ms 3.21 ms 3.22x
eth_feeHistory (256 blocks) 12.72 ms 5.50 ms 2.31x
eth_feeHistory (5 blocks) 4.74 ms 3.58 ms 1.32x (HTTP/JSON floor)
hive rpc-compat: identical 22 pre-existing failures on both images (zero
regressions); eth_feeHistory/fee-history passes on both. eth_gasPrice and
eth_maxPriorityFeePerGas have no execution-apis fixtures; behavioural coverage is
in the updated unit tests.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: chain-time fork resolution, memory-bound fee caches, explicit receipts check
- Resolve next-block protocol specs from the chain head timestamp instead
of System.currentTimeMillis() in EthFeeHistory and BlockchainQueries
(gasPrice, gasPriceLowerBound, getNextBlockBaseFee, blob-fee fallback):
the wall clock is not a trusted time source and its millisecond scale
would resolve future timestamp-scheduled forks as already active.
- Rename the per-block reward cache (perBlockRewardsCache) and bound both
EthFeeHistory caches by approximate bytes with MemoryBoundCache weighers
(key + value) instead of entry counts.
- Replace the implicit ArrayIndexOutOfBoundsException on a receipts/body
count mismatch with an explicit Preconditions.checkState and add a
regression test.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: fix BlockchainQueriesLogCacheTest, trim verbose comments
- BlockchainQueriesLogCacheTest: clear the construction-time fee-oracle
observer registration so per-test verifyNoMoreInteractions checks only
the log-cache query calls.
- Condense verbose comments across EthFeeHistory and BlockchainQueries to
one line of rationale where non-obvious; drop narration of self-evident code.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Remove unnecessary comments that restate the code
Drop PR-added comments that narrated what the code already says (cache
field/weigher descriptions, a redundant cache-policy note, a self-evident
delegating-method doc); keep only one-line rationale for non-obvious cases.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Defer reward percentile sort until after cache-key path
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* move rewards.filter after isPresent check and resolve return cached emptyList
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Luis Pinto <luis.pinto@consensys.net>
Fix SnapWorldStateDownloader losing active downloadState reference (#10349)
`run()` built a new `SnapWorldDownloadState` but never stored it on `this.downloadState`, so the reentrant guard, `cancel()`, and the inflight/progress gauges all saw `null`. Store the new state on the `AtomicReference` right after construction so those paths observe the live download.
Signed-off-by: Dee <DeeADouble@proton.me>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Add behaviour change notice for rpc-tx-feecap (#10640)
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
changelog rotation for 26.6.1 (#10637)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Thread startKeyHash through v2 snap range probing
Follow-up to #10634 (review by macfarla).
- SnapV2AccountRangeRequest and SnapV2StorageRangeRequest now pass the
explicit startKeyHash to findNewBeginElementInRange, matching their v1
counterparts. Previously the empty-receivedKeys case probed from
MIN_RANGE instead of the actual range start.
- Add a Create2Operation regression test mirroring the CreateOperation
one, covering the EIP-3860 oversized-initcode early abort so the shared
getInputSize stack-index contract is exercised for the CREATE2 layout.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
revert log level change back to error (#10626)
* revert log level change back to error
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(engine): return SYNCING when parent world state is not immediately cached (#10600)
* fix(engine): return SYNCING when parent world state is not immediately cached
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
optimizations, refactorings, and improved test coverage (#10634)
* evm: drop dead try/catch in Memory.calculateNewActiveWords
Words.clampedAdd is total — it saturates rather than throwing — so
the ArithmeticException branch was unreachable. Compute the saturated
byte size directly and short-circuit to the gas-overflow sentinel
when it exceeds MAX_BYTES, which is what the catch arm was trying to
express. No behaviour change on the supported range; downstream
gas accounting in memoryCost() clamps to Long.MAX_VALUE as before.
Signed-off-by: jflo <justin+github@florentine.us>
* evm: evaluate EIP-3860 initcode-size limit before initcode resolution
The CREATE/CREATE2 size check currently runs after the initcode has
been resolved from memory and before state gas is charged. Per
EIP-3860 the limit is an early exceptional abort, so checking the
stack-declared size first keeps the abort cheap and side-effect-free:
the operation no longer expands memory based on an unvalidated
length, and the ordering aligns with the regular-gas / state-gas
separation introduced in this branch.
Adds a covering test that pushes an out-of-range size and asserts
the operation halts with CODE_TOO_LARGE without growing memory.
Signed-off-by: jflo <justin+github@florentine.us>
* Validate RLPx frame size lower bound in deframer
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* Probe full snap range for omitted in-range leaves
findNewBeginElementInRange previously short-circuited when the responder
returned no keys, leaving the caller to assume the requested range was
fully covered. Plumb the request's start hash through the helper and
probe from that origin instead, so an empty-keys response that should
have included data still surfaces a follow-up request.
The probe also relies on visitAll throwing when an in-range node is
missing. That signal is absent when a responder supplies enough proof
nodes to make every leaf reachable through the InnerNodeDiscoveryManager
— the walk completes cleanly even though most leaves were not echoed
back in the keys map. Iterate the inner-node registry afterwards and
surface the lowest in-range leaf that the responder did not include, so
the caller schedules the follow-up fetch.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Agentic PR guidance for Contributors (#10414)
* hoooooo boy those links are borked, probably forever
Signed-off-by: jflo <justin+github@florentine.us>
* Apply suggestion from @macfarla
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
snap/2 - invalid range proof handling (#10598)
* Handle invalid range proofs
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address code review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
remove not trusted root computation (#10622)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
remove bal size check between transaction (#10621)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
snap/2 - fix BAL retry handling for partial responses (#10593)
* Fix GetBlockAccessLists retry mechanism
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename test helper class
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix BFT invalid block production with `prevrandao` (#10611)
* Recreate for issue with PREVRANDAO op code and QBFT consensus
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Lint
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Fix compilation errors
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix prevrandao on BFT block creation
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add a test for IBFT2
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Chain height assertion is relative, not absolute
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update the changelog
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix copyright wording
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Tidy up test comments
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update existing unit test to check mix hash
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Update the BFT soak test to include upgrading to `Osaka` (#10607)
* Update the BFT soak test from shanghai to osaka
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove hard-coded contract address
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix incorrect test assertion
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Ensure shanghai and osaka upgrades are done individually
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Make sure assertions are less brittle
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove extraneous line
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove unnecessary fork additions to genesis file for Osaka upgrade
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix for Bonsai Archive from PR 10503
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Don't have both shanghai and osaka tasks download solc
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/pathbased/bonsai/storage/BonsaiArchiveWorldStateLayerStorage.java
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update acceptance-tests/tests/osaka/osakacontracts/SimpleStorageOsaka.sol
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add comments to build and test files
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(discv5): lower verbose logs to trace (#10566)
Signed-off-by: sueun-dev <57546981+sueun-dev@users.noreply.github.com>
Co-authored-by: Usman Saleem <usman@usmans.info>
Enable DiscV5 by default in acceptance tests and fix cluster harness (#10619)
The BootNodesGenesisSetupTest was silently broken: it used the V4 genesis
key ("bootnodes") while DiscV5 was the default, so the genesis bootnode
config was never exercised. The harness wired peers independently, making
it pass regardless of the config under test.
Acceptance test DSL:
- ProcessBesuNodeRunner: emit --Xv5-discovery-enabled when discoveryV5Enabled=true,
fixing a long-standing gap where BesuNodeConfigurationBuilder.discoveryV5Enabled()
was silently ignored in process mode
- AdminNodeInfoTransaction: new Transaction<Map<String,Object>> backed by
admin_nodeInfo RPC, returning the full result map (enr, enode, id, etc.)
- AdminRequestFactory / AdminTransactions / AdminConditions: expose nodeInfo()
- BesuNode: add helpers to fetch ENR/enode from admin_nodeInfo at runtime
- Cluster: enable DiscV5 by default; close cluster in teardown
- NodeConfiguration: add discoveryV5Enabled flag (explicit per-node control)
BootNodesGenesisSetupTest: replace the broken test with two scoped tests:
- shouldConnectNodesViaV4EnodeBootnodesInGenesis: disables DiscV5, uses
"bootnodes" genesis key with enode:// URIs, asserts peer identity via
admin.hasPeer() not just count
- shouldConnectNodesViaV5EnrBootnodesInGenesis: uses "v5bootnodes" genesis
key with a real ENR fetched from admin_nodeInfo at runtime; both tests
use awaitPeerDiscovery=false so the harness does not wire peers
Other fixes:
- Disable DiscV5 for secp256r1 nodes in acceptance tests (unsupported)
- Fix cluster harness breaking auth-enabled nodes via admin_nodeInfo call
- Fix London fork timing regression in ExtendTransactionValidatorPluginTest
Fixes #9689
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Optmize memory usage of the bal parallel execution (#10606)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix chain height (#10608)
* drive SyncState bestChainHeight from engine_newPayload in PoS
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Demote closed channel exception log level (#10616)
* Demote ClosedChannelException log level to DEBUG
* Use supplier lambda in atTrace to avoid eager requestBodyAsJson evaluation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix isSyncing() during full sync on post-merge networks (#10613)
* Fix isSyncing() incorrectly returning false during full sync on post-merge networks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - pivot catch-up lifecycle management (#10590)
* BAL-based pivot catch-up lifecycle management
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs after headers, remove unused method
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs in a separate stage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Update discovery v5 library to 26.6.0 (#10612)
* Update discovery v5 library to 26.6.0
-- Fixes handshake resend
-- hive tests
Signed-off-by: Usman Saleem <usman@usmans.info>
* Update CHANGELOG entry for DiscV5 library update
Signed-off-by: Usman Saleem <usman@usmans.info>
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Fix WS TLS support in acceptance DSL (#10432)
* Fix WS TLS support in acceptance DSL
WS URLs now switch to / when is true, and forwards the matching flags (keystore/truststore, PEM, password or password-file, client auth) to the spawned node. Adds / accessors so the runner can pass the configured path through.
Signed-off-by: Dee <DeeADouble@proton.me>
* Trust self-signed certs in acceptance DSL ws/https clientsThe previous commit only addressed the server side. The DSL's
WebSocketClient (used both for the endpoint probe and the live RPC
service) and the login OkHttpClient were still plain TCP, so any wss://
or https:// hop silently failed the TLS handshake before the request
left the test. This wires both clients through a trust-all
SSLSocketFactory whenever ws-ssl is enabled, scoped to the acceptance
tests via a package-private helper.
Signed-off-by: Dee <DeeADouble@proton.me>
* Cover WS TLS DSL client flows
Disable endpoint identification for the acceptance-test WebSocket client
when using the insecure TLS helper, matching the existing trust-all
behavior for self-signed test certificates.
Add acceptance coverage for WS TLS with JKS inline passwords, JKS
password files, PEM key/cert configuration, and client auth with JKS and
PEM trust material.
Signed-off-by: Dee <DeeADouble@proton.me>
* Format WS TLS acceptance test
Signed-off-by: Dee <DeeADouble@proton.me>
* formatting and copyright header
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Dee <DeeADouble@proton.me>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Check the bad block manager when receiving a new block from the network (#10212)
* check the bad block manager when receiving a new block from the network. This allows to mark a whole fork invalid and signaling this to the CL at the next fcu
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level, improved comments in tests
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level to debug for not important events
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* addressed pr comments
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* make tests stricter
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
---------
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
snap/2 - track downloaded ranges (#10579)
* Add tracking of downloaded ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Iterate over children only once in SnapV2PersistDataStep
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Fix/eth capabilities oldest block when state is enabled (#10597)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Revert release process changes (#10604)
* Revert "feat(publish-release): add workflow_dispatch trigger, gated via environment (#10491)"
This reverts commit c8ca8a029a7feef70a10fc82afd97d6317aebdfd.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "fix(publish-release): keep gh release download in workspace cwd (#10490)"
This reverts commit be72aa2ae9fca47dfe5a00abf5d8117d01f4c972.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "proposed adjustments to release process (#10411)"
This reverts commit f027e9a7a99a2b91976e604e533517a64a836045.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "Gate final-version docker tags on release publish, not draft (#10306)"
This reverts commit f3e26cf2def9dd530fb0acf2014c3e25a15dbe59.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Reapply java 21 -> 25 lost in revert
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
downgrade duplicate engine api timeout log to debug (#10595)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
chore: tidy up some references to java 21 (#10596)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Enrich `/readiness` health endpoint with diagnostic details (#10412)
* Enrich /readiness health endpoint with diagnostic details (#10400)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Defensive copy for HealthCheckResult and add error field for invalid params
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Remove redundant isHealthy from HealthCheck interface
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Default omitted block parameter to latest on eth state methods (#10587)
* Default omitted block parameter to latest on eth state methods
eth_getBalance, eth_getCode, eth_getStorageAt, eth_getTransactionCount,
eth_getProof and eth_getStorageValues read the block parameter with
getRequiredParameter, so omitting it returned -32602 'Invalid block
param (block not found)'. Read it with getOptionalParameter and default
to BlockParameterOrBlockHash.LATEST when absent, per execution-apis
(Block required:false, default 'latest'). Adds a LATEST constant to
BlockParameterOrBlockHash.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: eth_getProof defaults to latest when block omitted
Replace errorWhenNoBlockNumberSupplied (which asserted the old
throw-on-missing behavior) with a test asserting an omitted block now
resolves to latest, matching the other state methods and the spec.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: assert latest response is success before casting in getProof default-block test
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Centralize optional-block defaulting and build LATEST without JSON parsing
Address review feedback (fab-10): move the 'optional block param, default
latest' logic into a shared blockParameterOrBlockHashWithLatestDefault helper on
AbstractBlockParameterOrBlockHashMethod, and have the six state methods delegate
to it with their param index. Build BlockParameterOrBlockHash.LATEST via a
private field-setting constructor instead of routing the constant through the
JSON-parsing constructor.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Add CHANGELOG entry for optional block parameter on eth state methods
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Move CHANGELOG entry to Unreleased section
Updated breaking changes and upcoming changes in the changelog to reflect new RPC compatibility and deprecations.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking (#10354)
* Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking
Resolves #10336. The JSON-RPC response serialization and streaming can block when the websocket write queue is full. Moving this logic to executeBlocking prevents slow clients from exhausting Vert.x event loop threads.
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* false for ordering to match HTTP JSON RPC
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: daniellehrner <daniel.lehrner@consensys.net>
Create snap/2-specific request classes and pipeline steps (#10560)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
chore: rotate changelog for 26.6.0 release (#10591)
* chore: rotate changelog for 26.6.0 release
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix PluginVerifier catalog not found when running from IntelliJ (#10585)
* copyArtifactsCatalogToResources task
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Add new payload listener (#10570)
* add NewPayloadListener for engine_newPayload events
Mirrors the existing UnverifiedForkchoiceListener pattern so other components
can observe headers delivered by the consensus layer without coupling to the
JSON-RPC layer. The listener fires for every engine_newPayload request after
the block hash has been verified against the payload contents, but before the
"syncing" early-return — so listeners receive headers even while the node is
snap-syncing.
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Add static-pivot snap/2 world state download skeleton (#10548)
* SnapV2 skeleton for static pivot
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track downloaded account ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Merge `PivotSyncState` into `SnapSyncProcessState` (#10549)
* Merge PivotSyncState with SnapSyncProcessState
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove mutable EMPTY_SYNC_STATE, make setCurrentHeader package-private
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Disallow empty change set for storage slot (#10582)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Integrate NullAway for nullability checks in ethstats package (#10520)
* feat: apply NullAway to ethstats module
* test: fix NullAway violations in ethstats test code
* test(ethstats): align successful AsyncResult cause() with Vert.x contract
* test(ethstats): add guard-path tests for sendBlockReport preconditions
Signed-off-by: mykim <kimminyong2034@gmail.com>
---------
Signed-off-by: mykim <kimminyong2034@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
kurtosis nightly task: pin ethereum-package (#10583)
* pin ethereum-package
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* full sha
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
nightly kurtosis interop assertoor test (#10569)
* nightly kurtosis interop assertoor test
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
add eth_getTransactionBySenderAndNonce RPC (#10501)
* storage index
* Add eth_getTransactionBySenderAndNonce RPC method
* Check transaction pool before index in eth_getTransactionBySenderAndNonce
* Add tx-sender-nonce-index-enabled to everything_config.toml test fixture
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Use `develop` tag name instead versioned (#10576)
ci: extract reusable docker.yml and migrate develop.yml to GHA (#10366)
* ci: extract reusable docker.yml and migrate develop.yml to GHA
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
* Apply suggestion from @joshuafernandes
equivalent and simpler
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Fix typo
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Fixed - logging cleanup for invalid blocks #10160 (#10180)
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-hex block numbers in debug_getRawReceipts, and eth_getProof (#10240)
* fix: reject non-hex block numbers in debug_getRawBlock, debug_getRawHeader, debug_getRawReceipts
The Hive rpc-compat suite sends decimal strings like "2" (no 0x prefix)
as block parameters and expects a -32602 INVALID_PARAMS error. Besu was
silently accepting these via Long.decode() in BlockParameter, which
accepts both decimal and hex strings.
Add pre-validation in the blockParameter()/blockParameterOrBlockHash()
overrides of each affected method: if the raw parameter is not a named
block tag (earliest/latest/pending/finalized/safe) and does not start
with "0x", throw InvalidJsonRpcParameters(-32602) immediately.
Fixes Hive rpc-compat failures:
debug_getRawBlock/get-invalid-number
debug_getRawHeader/get-invalid-number
debug_getRawReceipts/get-invalid-number
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: use BlockParameterOrBlockHash in debug_getRawBlock and debug_getRawHeader
Switch DebugGetRawBlock and DebugGetRawHeader from AbstractBlockParameterMethod
to AbstractBlockParameterOrBlockHashMethod so they accept block hashes as well
as block numbers, matching the pattern already used by DebugGetRawReceipts.
Move the hex-prefix validation into BlockParameterOrBlockHash itself so it
applies to all methods using that parameter type rather than being duplicated
per method. Update DebugSetHeadTest to pass hex block numbers accordingly.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: remove redundant hex validation from DebugGetRawReceipts
The per-method check in blockParameterOrBlockHash was already superseded
by the validation added to BlockParameterOrBlockHash itself.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* chore: fix spotless formatting and add changelog entry
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: add eth_getProof + debug_getRawTransaction hex validation per maintainer review
- Fix EthGetProofTest: replace decimal block numbers (String.valueOf(500/501))
with hex equivalents ("0x1f4" / "0x1f5") — needed because BlockParameterOrBlockHash
now rejects non-0x-prefixed numbers
- Add 0x prefix check to DebugGetRawTransaction for the transaction hash parameter,
fixing the hive rpc-compat debug_getRawTransaction/get-invalid-hash test failure
- CHANGELOG: add eth_getProof and debug_getRawTransaction to the affected-methods list;
move the block-number-hex note from Upcoming Breaking Changes to Breaking Changes
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: revert DebugGetRawTransaction change and consolidate CHANGELOG
Per maintainer feedback, keep this PR focused on block param hex
validation only. Reverted the 0x prefix check added to
DebugGetRawTransaction and removed the duplicate bug-fixes entry
from CHANGELOG — the breaking change entry already covers it.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* test: derive hex block numbers from blockNumber field in EthGetProofTest
Replace hardcoded "0x1f4" / "0x1f5" with "0x" + Long.toHexString(blockNumber)
and "0x" + Long.toHexString(blockNumber + 1) so the strings stay in sync with
the blockNumber field if it ever changes.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: allow negative hex block params to flow to downstream check
The hex-prefix check in BlockParameterOrBlockHash was rejecting inputs
like "-0x10" upfront with a generic IllegalArgumentException, which
methods mapped to INVALID_BLOCK_PARAMS ("Invalid block param (block
not found)"). The negative-number check already lives downstream in
AbstractBlockParameterOrBlockHashMethod and returns the more accurate
INVALID_BLOCK_NUMBER_PARAMS ("Invalid block number params") — accept
an optional leading minus so that path is reached.
Also update JsonRpcHttpServiceTest.ethGetStorageAtBlockNumber to pass
"0x0" instead of decimal "0" — the new contract is hex-only and this
test was the only remaining decimal usage in the api module.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* remove -0x carve out and update relevant tests
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix: align debug_getRaw* methods with execution-apis BlockNumberOrTag spec
debug_getRawBlock, debug_getRawHeader and debug_getRawReceipts now use
BlockParameter (BlockNumberOrTag) instead of BlockParameterOrBlockHash,
matching the execution-apis spec. Resolves the remaining
debug_getRawReceipts/get-invalid-number hive failure.
CHANGELOG breaking-changes list now explicitly names these three methods
and eth_getProof (which keeps BlockParameterOrBlockHash per its spec).
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* revert: drop DebugGetRawBlock/DebugGetRawHeader changes per maintainer review
Reverts both files to origin/main so this PR stays focused on the
block-parameter hex-prefix validation change.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* review comments
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Avoid blocking txpool save restore callers (#10561)
* Avoid blocking txpool save restore callers
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Add txpool save restore lock tests
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Address txpool save restore review comments
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix engine_newPayload invalid request type invalid status (#10525)
* fix: restore INVALID status for unknown execution request types in engine_newPayload
* changelog: engine_newPayload execution request validation error codes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
perf: cache last validated JWT token in EngineAuthService (#10559)
* perf: cache last validated JWT token in EngineAuthService
Engine API JWT tokens rotate at most once per minute (the CL updates iat
on a 60-second cycle). Under a CL reconnect burst, every engine API call
in that burst carries the same token string, causing repeated Jackson JSON
parsing (ByteQuadsCanonicalizer synchronized lock) and HMAC-SHA256
verification on the Vert.x event loop thread.
Cache the last successfully validated token in an AtomicReference. On a
cache hit (same raw token string), skip straight to the iat freshness
check — no Jackson, no HMAC, no locking. The slow path fires only on
token rotation (~once per minute) or on first call after restart.
The iat freshness check (issuedRecently) is still called on every request
so a cached token is correctly rejected once it goes stale.
Observed symptom: vert.x-eventloop-thread blocked for 15+ seconds in
ByteQuadsCanonicalizer.makeChild during a Prysm reconnect burst, causing
FilterManager timer contention and backward sync throughput collapse.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(discv5): IPv6 ENR auto-discovery via peer consensus (#9874) (#10468)
Add IPv6 address consensus mechanism to DiscV5 peer discovery:
- New NodeRecordManager tracks IPv6 address observations from peers
- New IpV6NewAddressHandler validates and applies consensus IPv6 addresses
- CLI option --ipv6-discovery-enabled (default: false) controls feature
- Updated PeerDiscoveryAgentFactoryV5 to integrate IPv6 consensus flow
Enhances DiscV5 peer discovery to support dual-stack IPv6 networks by
allowing nodes to discover and agree on IPv6 addresses through peer reports
when multiple peers report the same address, improving auto-discovery on
networks without hardcoded IPv6 bootnodes.
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Co-authored-by: Matilda Clerke <matilda.clerke@consensys.net>
Refactor: Extract EVMv2 stack manipulation unit tests (#10535)
* Extract NullaryOperationV2Test - Covers nullary fixed cost operations
* Extract BinaryOperationV2Test - Covers binary fixed cost operations
* Extract TernaryOperationV2Test - Covers MulModOperationV2 but will get used for at least AddMod later
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
eliminate flaky port collision (#10556)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix(at): prevent BftSyncAcceptanceTest port collision under parallel execution
The test used fixed ports derived from node names like "validator1".
When the 3 parameterized cases (ibft2/FULL, qbft/FULL, ibft2/SNAP) run
concurrently, identical names hash to identical ports, causing exit code 2
port-conflict failures on startup.
Prefix node names with testName+syncMode so each parameterized case gets
a distinct hash and therefore distinct fixed ports.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Acceptance Tests: if error creating ports file, make it obvious (#10555)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: use non-zero exit code on disk-full shutdown (#10254)
* fix: use non-zero exit code on disk-full shutdown
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* test: cover non-NoSpace RocksDB IO errors
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* fix: log exception details on disk-full instead of bare message
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
optimize tracePreExecution tracePostExecution (#10541)
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Fix IndexOutOfBoundsException race condition in TransactionBroadcaster (#10482)
* Fix IndexOutOfBoundsException race condition in TransactionBroadcaster
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* test: add regression test for IndexOutOfBoundsException race condition in TransactionBroadcaster
When peerCount() and streamAvailablePeers() are called sequentially, peers can
disconnect between the two calls. This causes numPeersToSendFullTransactions
(calculated from peerCount) to exceed the actual number of peers returned by
streamAvailablePeers(), causing subList() to throw IndexOutOfBoundsException.
The new test reproduces this scenario: peerCount() returns 9 (sqrt = 3 full-tx
peers) but only 2 peers are available when streamAvailablePeers() is called.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Fix spotless formatting
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix: correct off-by-one in debug_accountAt transaction index validation (#10464)
* fix: correct off-by-one in debug_accountAt transaction index validation (#10463)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* docs: add changelog entry for debug_accountAt off-by-one fix
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
perf: parallelize block body DB lookups in engine_getPayloadBodies methods (#10532)
* perf: parallelize block body DB lookups in engine_getPayloadBodies methods
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* added benchmark
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* review: address reviewer comments on engine_getPayloadBodies parallelization
- CHANGELOG: add PR link #10532
- JMH benchmark: remove @Fork(1) annotation (gradle JMH plugin overrides
to 3 forks; annotation was misleading)
- JMH benchmark: update run command to -Pincludes=EngineGetPayloadBodiesParallel
so it doesn't run all benchmarks in the module
* review: add --no-daemon to benchmark run command and document in BENCHMARKING.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Make snap/2 BAL fetching strict (#10542)
* Make BAL-fetching peer task retry on incomplete data
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove IncompleteResultsException
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Require Java 25 to build (#10539)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Prepare snap sync downloader selection for snap/2 (#10545)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Remove optimization to apply BALs before flat db heal (#10538)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Replace Address.hashCache Guava LoadingCache with Caffeine (#10235)
* Replace Address.hashCache Guava LoadingCache with Caffeine
Under heavy miss rate (pre-EIP-150 DoS-era blocks spam BALANCE/EXTCODESIZE
against tens of thousands of pseudo-random addresses per tx) Guava's per-segment
ReentrantLock serialises parallel tx executors on every account-touching EVM
opcode. A thread dump of a stuck import thread on a Bonsai full-sync showed the
thread parked on LocalCache$Segment.storeLoadedValue.
Caffeine's load path is CAS-based (no segment write lock) and already the
in-house cache library used elsewhere in Besu.
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* test: move addressHash correctness tests into existing vm/AddressTest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove unused evm arg from FixedCostOperations (#10533)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Enable NullAway static null-safety analysis for datatypes module (#10394)
* Enable NullAway static null-safety analysis for datatypes module
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
* pin nullaway version centrally in platform/build.gradle
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
---------
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
Add experimental CLI option to advertise snap/2 (#10536)
* Add experimental CLI option to advertise snap/2
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove condition
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Fix tests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: QBFT/IBFT2 legacy RoundChange and Proposal encoding (#10499)
## Problem
QBFT RoundChange and Proposal messages failed to decode against
pre-26.1.0 peers because the BAL (blockAccessList) field was always
included in the RLP encoding even when absent, causing a decode error
on the receiving side.
## Changes
### Core fix
- Encode RoundChange and Proposal without blockAccessList when the field
is absent (null), matching the legacy wire format
- Fix QBFT ProposalPayload signature verification under legacy encoding
### Legacy interop flag
- Add `--Xbft-legacy-protocol-encoding` flag (UnstableBftOptions) to
force legacy encoding for IBFT2/QBFT, enabling interop with
pre-26.1.0 peers
- Rename from earlier `--Xqbft-legacy-roundchange-encoding` and extend
to cover IBFT2 as well
- Rename `BftOptions` → `UnstableBftOptions`, move to
`options/unstable/`, support bare flag form
- Document flag limitation when BAL is present (CHANGELOG + javadoc)
### Refactoring
- Make `useLegacyEncoding` constructors private; expose
`withLegacyEncoding()` factory methods on message wrappers
- Drop legacy constructors; always omit BAL in legacy encoding mode
- Use typed `getArgument` overloads in QBFT codec mocks
### Tests
- ProposalMessageTest and RoundChangeMessageTest for IBFT2
- Extended RoundChangeTest and ProposalTest for QBFT covering legacy
and standard encoding paths
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Co-authored-by: Cedric <53888545+ghostant-1017@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
feat(api): implement eth_baseFee JSON-RPC method (#10457)
* feat(api): implement eth_baseFee JSON-RPC method
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
* chore(changelog): add eth_baseFee entry
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
---------
Signed-off-by: William Morriss <wjmelements@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Decouple snap data requests from `SnapWorldDownloadState` (#10530)
* Replace SnapWorldDownloadState by SnapRangeRequestContext in snap range requests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename SnapRangeRequestContext to SnapRequestContext
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: reject non-hex block numbers in BlockParameter (#10515)
* fix: reject non-hex block numbers in BlockParameter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: detect blob tx violations (missing/mismatched sidecar) (#10510)
* disconnect for invalid blob tx data
* peertask: exit retry loop immediately on MalformedRlpFromPeerException
After disconnecting a peer for malformed RLP, return PEER_DISCONNECTED
instead of INVALID_RESPONSE so the inner retry loop exits without the
1-second sleep. This allows consumedAnnouncements() to run promptly,
freeing the hash for the good peer's fetcher to pick up.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fixup: use fromAnnouncements factory in BufferedGetPooledTransactionsFromPeerFetcher
Completes the refactor from the blob-peer-disconnect-violations fix:
swaps the removed public List<TransactionAnnouncement> constructor for
the new fromAnnouncements() factory method.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: Peer Tracker incorrectly evicts peers pre-validation (#10511)
* stream connected peers
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-0x-prefixed tx hash in debug_getRawTransaction (#10505)
* fix: use Jackson HashDeserializer to enforce 0x prefix on all Hash RPC params
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge PivotSyncDownloader with SnapSyncDownloader (#10528)
* Merge PivotSyncDownloader with SnapSyncDownloader
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Further cleanup
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Simplify wiring bidirectional references between state and chain downloader (#10529)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix unavailable BAL handling in snap (#10519)
* Fix unavailable BAL handling in snap
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add tests for snap.GetBlockAccessListsFromPeerTask
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Enable NullAway for metrics core (#10453)
* Enable NullAway for metrics core
* Remove unused Jakarta NotNull annotations
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
---------
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths (#10527)
* perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths
* nit: rename INSTANCE to WITHOUT_STACKTRACE for clarity
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless CancellationException in AbstractEthTask (#10526)
executeSubTask() is called by every eth task subclass whenever a sub-task
is dispatched. When the parent task has already been cancelled, it previously
allocated a fresh CancellationException — capturing a full JVM stack trace —
on every call. At high task-cancellation rates (sync, peer churn, shutdown)
this adds unnecessary allocation pressure and CPU overhead from the native
stack-walk.
Replace with a stackless singleton following the same pattern as the
RlpxAgent peer-gate fix (besu-eth/besu#10510) and Netty's
StacklessClosedChannelException.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
use stackless singleton for peer-gate rejection in RlpxAgent (#10523)
Allocating a fresh RuntimeException with full stack trace on every
outbound peer-gate rejection causes measurable GC pressure at high
connection-attempt rates (observed ~1.5 throws/sec during chain-head
stalls, per JFR in besu-eth/besu#10498).
Replace the per-call allocation with a stackless singleton sentinel,
following the same pattern as Netty's StacklessClosedChannelException.
The LOG.trace call is updated to use parameterised formatting to avoid
string concatenation when trace logging is disabled.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
testing_buildBlockV1: exclude null fields from result (#10492)
* exclude fields from block building result when they are null
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Consider maxFeePerBlobGas when sorting tx in the layered txpool (#10513)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix(jsonrpc): eth_capabilities state/stateproofs disabled detection (#10377)
Check genesis world state availability via WorldStateArchive.isWorldStateAvailable().
If genesis state is not available (e.g. SNAP sync nodes using Bonsai), state
and stateproofs now correctly report disabled=true.
Fixes #10371
Signed-off-by: Arshdeep Singh <arshdeep.ssingh777@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Rename EthashConfigOptions to FixedDifficultyConfigOptions (#10507)
* Rename EthashConfigOptions to FixedDifficultyConfigOptions
* Support fixeddifficulty as a genesis config key alias for ethash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
testing_buildBlockV1 - error if tx provided but not applied (#10486)
* when transactions are explicitly provided, return an error if any were not applied
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* deterministic ordering
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: `miner_changeTargetGasLimit` silently ignores valid gas limit on PoW/BFT networks (#10460)
* fix: apply target gas limit in AbstractMinerExecutor.changeTargetGasLimit
The changeTargetGasLimit method in AbstractMinerExecutor contained an
empty if-block that validated the input but never applied the new gas
limit to miningConfiguration. This caused miner_changeTargetGasLimit
RPC calls to silently succeed without actually updating the target gas
limit on PoW and BFT networks.
Add the missing miningConfiguration.setTargetGasLimit(newTargetGasLimit)
call to ensure the target gas limit is properly updated.
Add AbstractMinerExecutorTest with regression tests to verify the gas
limit is correctly persisted to MiningConfiguration after calling
changeTargetGasLimit.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Update copyright notice in AbstractMinerExecutorTest.java
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
feat: Add cross-block code caching for improved performance (#10390)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix LayeredKeyValueStorage.isClosed() duplicated execution (#10508)
* Fix LayeredKeyValueStorage.isClosed() O(N) recursion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Lazy RLP decoding for GetReceiptsMessage (#10450)
* GetReceiptsMessage lazy decoding
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
fix flaky test on BalStateRootCommitterFactoryTest (#10500)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
refactor: replace eager string concatenation with SLF4J parameterized logging (#10352)
* refactor: replace eager string concatenation (#10329)
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Add txsSelectionHighScore metric for per-included-tx selection time (#10265)
* Add txsSelectionHighScore metric for per-included-tx selection time
Expose, alongside the existing txsSelection timing, the aggregate
evaluation time of transactions that were actually committed into the
block. The accumulator is updated in SelectedPendingAction.runOnCommit,
so by construction it excludes invalid, rejected, rolled-back, and
timeout-killed txs.
BlockCreationTiming gains a registerValue(step, duration) that stores
standalone durations printed as-is, without advancing the delta chain
of stopwatch-based register(step) entries.
Fixes #9179
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
* Address review feedback for txsSelectionHighScore
- CHANGELOG: trimmed to a one-line high-level entry
- BlockTransactionSelector: capture the per-tx evaluation time once in
handleTransactionSelected and thread it through SelectedPendingAction,
so the same canonical value is used both in the existing per-tx TRACE
log (L762) and in the high-score accumulator on commit
- TransactionSelectionResults: include the running cumulative selection
time in the per-tx TRACE log emitted by updateSelected
- TransactionSelectionResultsTest: import TransactionSelectionResult
constants statically; drop unhelpful inline-comment annotations
- AbstractBlockTransactionSelectorTest: remove the
selectedTxsEvaluationTimeReflectsOnlyIncludedTransactions test that
the maintainer flagged as not adding value
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
* Preserve standalone values across registerAll merge
Without this fix, BlockMiner.mineBlock() created an outer
Bl…
fab-10
added a commit
to fab-10/besu
that referenced
this pull request
Jun 25, 2026
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Reorg and document newPayloadV1
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts:
# ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV1.java
WIP: engine_newPayload refactor in progress
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Rename FcU result data structures to follow the spec
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove unrelated changes
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix rebase
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Move new implementation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Add support for fail on unknown JSON properties unless are null
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove previous engine_forkchoiceUpdated implementation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Apply suggestions from code review
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
engine_forkchoiceUpdated refactor
Refactor the engine_forkchoiceUpdated V1-V4 hierarchy into a sealed,
version-scheduled implementation under
ethereum.api.jsonrpc.internal.methods.engine.forkchoiceupdated, driven
by a small VersionScheduler that maps each method version to its active
hard-fork range. Introduces typed payload-attribute and forkchoice-state
parameter classes (PayloadAttributesV1-V4, ForkchoiceStateV1) and
adjusts the merge block-creation layer (PayloadIdentifier,
MergeCoordinator, TransitionCoordinator, PreparePayloadArgsBuilder)
accordingly.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
# ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonRpcParameter.java
align block number position in log lines (#10632)
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
Co-authored-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods (#10662)
* feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods
* chore(pow-removal): remove remote sealer / PoW job constants from MiningConfiguration.Unstable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: skip DNSDaemon when --discovery-dns-url is blank or empty (#10666)
Signed-off-by: Usman Saleem <usman@usmans.info>
lazy GetStorageRangeMessage (#10660)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
feat(pow-removal): Phase 1 - remove PoW mining infrastructure (#10656)
* feat(pow-removal): Phase 1 - remove PoW mining infrastructure
Delete all PoW-specific mining code: PoWBlockCreator, PoWBlockMiner,
PoWMinerExecutor, PoWMiningCoordinator, AbstractMinerExecutor,
AbstractMiningCoordinator, IncrementingNonceGenerator, RandomNonceGenerator,
PoWSolver, PoWSolverInputs, PoWObserver.
* fix: pass miningConfiguration to NoopMiningCoordinator in MainnetBesuControllerBuilder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - downloaded storage range tracker (#10609)
* Add storage range tracker
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track all downloaded storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Registrer full range for accounts with empty storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add RangeManager tests asserting starts of generated ranges are increasing
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add test that generated ranges start with min
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
pathbased package refactoring (#10641)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
lazy decoding of GetByteCodeMessage (#10652)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
uprev web3j to 5.0.3 (#10627)
* uprev web3j and add dependency links in acceptance-tests gradle files
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: initialize profilers list before adding gc in jmh config (#10651)
-PgcProfiler=true silently did nothing when -PasyncProfiler was not also
provided
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
upgrade license report plugin (#10650)
* upgrade license report plugin
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory (#10524)
* perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory
Replaces the per-request 100-block scan in eth_gasPrice / eth_maxPriorityFeePerGas
with a per-head FeeOracleSnapshot computed off the block-import thread (when an
EthScheduler is available) and cached by chain-head hash. A cold path on the request
side self-heals: the first caller after a head change computes inline and seeds the
snapshot for subsequent callers. Bounds (miner_setMinGasPrice /
miner_setMinPriorityFee) are still applied at read time against the live mining
config, so configuration changes take effect immediately and never get baked into
a stale snapshot.
eth_feeHistory gains a result cache for "latest" requests, keyed on
(headHash, blockCount, sortedPercentiles, RewardBounds snapshot, nextBlockHardforkId).
Historic-block queries bypass the cache. The pre-existing per-block reward cache now
stores unbounded rewards; request-specific bounding is applied per-call with a
mining-config snapshot taken at request entry. Other targeted wins:
- getBlobBaseFees reuses the previous header instead of issuing one parent-hash
RocksDB read per block (saves up to 255 reads per feeHistory-256 request).
- getNextBaseFee / getNextBlobFee skip the chainHead+1 storage lookup when the
block can't exist (the "latest" case).
- getBlockHeaders uses the bulk Blockchain.getBlockHeaders(start, count) API, which
walks parent hashes from the in-memory header cache.
- Rewards loop is sequential again (fork-join split overhead dominated cache-hit
cases for big ranges).
- TransactionInfo no longer carries the Transaction reference.
DefaultBlockchain.getBlockBody / getTxReceipts now populate the in-memory cache on
read miss (matching the existing getBlockHeader(Hash) pattern). Refactors the three
populate-on-miss accessors into a single getCached<T> helper. Without this fix the
--cache-last-blocks cache only ever held blocks imported since startup, making it
useless for fee-oracle scans of pre-existing chain history.
Tests updated to mock the new access pattern (getBlockHeaders + getBlockBody by
hash). New test latestResultCacheMissesWhenNextBlockHardforkChanges pins the
HardforkId component of the cache key.
Measured on Hoodi via json-bench (k6, 20 RPS x 30s, post-restart, fresh JIT):
test baseline p95 fork p95 speedup
eth_gasPrice 11.64 ms 3.18 ms 3.66x
eth_maxPriorityFeePerGas 10.34 ms 3.21 ms 3.22x
eth_feeHistory (256 blocks) 12.72 ms 5.50 ms 2.31x
eth_feeHistory (5 blocks) 4.74 ms 3.58 ms 1.32x (HTTP/JSON floor)
hive rpc-compat: identical 22 pre-existing failures on both images (zero
regressions); eth_feeHistory/fee-history passes on both. eth_gasPrice and
eth_maxPriorityFeePerGas have no execution-apis fixtures; behavioural coverage is
in the updated unit tests.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: chain-time fork resolution, memory-bound fee caches, explicit receipts check
- Resolve next-block protocol specs from the chain head timestamp instead
of System.currentTimeMillis() in EthFeeHistory and BlockchainQueries
(gasPrice, gasPriceLowerBound, getNextBlockBaseFee, blob-fee fallback):
the wall clock is not a trusted time source and its millisecond scale
would resolve future timestamp-scheduled forks as already active.
- Rename the per-block reward cache (perBlockRewardsCache) and bound both
EthFeeHistory caches by approximate bytes with MemoryBoundCache weighers
(key + value) instead of entry counts.
- Replace the implicit ArrayIndexOutOfBoundsException on a receipts/body
count mismatch with an explicit Preconditions.checkState and add a
regression test.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: fix BlockchainQueriesLogCacheTest, trim verbose comments
- BlockchainQueriesLogCacheTest: clear the construction-time fee-oracle
observer registration so per-test verifyNoMoreInteractions checks only
the log-cache query calls.
- Condense verbose comments across EthFeeHistory and BlockchainQueries to
one line of rationale where non-obvious; drop narration of self-evident code.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Remove unnecessary comments that restate the code
Drop PR-added comments that narrated what the code already says (cache
field/weigher descriptions, a redundant cache-policy note, a self-evident
delegating-method doc); keep only one-line rationale for non-obvious cases.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Defer reward percentile sort until after cache-key path
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* move rewards.filter after isPresent check and resolve return cached emptyList
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Luis Pinto <luis.pinto@consensys.net>
Fix SnapWorldStateDownloader losing active downloadState reference (#10349)
`run()` built a new `SnapWorldDownloadState` but never stored it on `this.downloadState`, so the reentrant guard, `cancel()`, and the inflight/progress gauges all saw `null`. Store the new state on the `AtomicReference` right after construction so those paths observe the live download.
Signed-off-by: Dee <DeeADouble@proton.me>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Add behaviour change notice for rpc-tx-feecap (#10640)
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
changelog rotation for 26.6.1 (#10637)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Thread startKeyHash through v2 snap range probing
Follow-up to #10634 (review by macfarla).
- SnapV2AccountRangeRequest and SnapV2StorageRangeRequest now pass the
explicit startKeyHash to findNewBeginElementInRange, matching their v1
counterparts. Previously the empty-receivedKeys case probed from
MIN_RANGE instead of the actual range start.
- Add a Create2Operation regression test mirroring the CreateOperation
one, covering the EIP-3860 oversized-initcode early abort so the shared
getInputSize stack-index contract is exercised for the CREATE2 layout.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
revert log level change back to error (#10626)
* revert log level change back to error
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(engine): return SYNCING when parent world state is not immediately cached (#10600)
* fix(engine): return SYNCING when parent world state is not immediately cached
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
optimizations, refactorings, and improved test coverage (#10634)
* evm: drop dead try/catch in Memory.calculateNewActiveWords
Words.clampedAdd is total — it saturates rather than throwing — so
the ArithmeticException branch was unreachable. Compute the saturated
byte size directly and short-circuit to the gas-overflow sentinel
when it exceeds MAX_BYTES, which is what the catch arm was trying to
express. No behaviour change on the supported range; downstream
gas accounting in memoryCost() clamps to Long.MAX_VALUE as before.
Signed-off-by: jflo <justin+github@florentine.us>
* evm: evaluate EIP-3860 initcode-size limit before initcode resolution
The CREATE/CREATE2 size check currently runs after the initcode has
been resolved from memory and before state gas is charged. Per
EIP-3860 the limit is an early exceptional abort, so checking the
stack-declared size first keeps the abort cheap and side-effect-free:
the operation no longer expands memory based on an unvalidated
length, and the ordering aligns with the regular-gas / state-gas
separation introduced in this branch.
Adds a covering test that pushes an out-of-range size and asserts
the operation halts with CODE_TOO_LARGE without growing memory.
Signed-off-by: jflo <justin+github@florentine.us>
* Validate RLPx frame size lower bound in deframer
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* Probe full snap range for omitted in-range leaves
findNewBeginElementInRange previously short-circuited when the responder
returned no keys, leaving the caller to assume the requested range was
fully covered. Plumb the request's start hash through the helper and
probe from that origin instead, so an empty-keys response that should
have included data still surfaces a follow-up request.
The probe also relies on visitAll throwing when an in-range node is
missing. That signal is absent when a responder supplies enough proof
nodes to make every leaf reachable through the InnerNodeDiscoveryManager
— the walk completes cleanly even though most leaves were not echoed
back in the keys map. Iterate the inner-node registry afterwards and
surface the lowest in-range leaf that the responder did not include, so
the caller schedules the follow-up fetch.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Agentic PR guidance for Contributors (#10414)
* hoooooo boy those links are borked, probably forever
Signed-off-by: jflo <justin+github@florentine.us>
* Apply suggestion from @macfarla
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
snap/2 - invalid range proof handling (#10598)
* Handle invalid range proofs
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address code review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
remove not trusted root computation (#10622)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
remove bal size check between transaction (#10621)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
snap/2 - fix BAL retry handling for partial responses (#10593)
* Fix GetBlockAccessLists retry mechanism
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename test helper class
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix BFT invalid block production with `prevrandao` (#10611)
* Recreate for issue with PREVRANDAO op code and QBFT consensus
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Lint
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Fix compilation errors
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix prevrandao on BFT block creation
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add a test for IBFT2
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Chain height assertion is relative, not absolute
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update the changelog
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix copyright wording
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Tidy up test comments
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update existing unit test to check mix hash
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Update the BFT soak test to include upgrading to `Osaka` (#10607)
* Update the BFT soak test from shanghai to osaka
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove hard-coded contract address
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix incorrect test assertion
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Ensure shanghai and osaka upgrades are done individually
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Make sure assertions are less brittle
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove extraneous line
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove unnecessary fork additions to genesis file for Osaka upgrade
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix for Bonsai Archive from PR 10503
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Don't have both shanghai and osaka tasks download solc
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/pathbased/bonsai/storage/BonsaiArchiveWorldStateLayerStorage.java
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update acceptance-tests/tests/osaka/osakacontracts/SimpleStorageOsaka.sol
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add comments to build and test files
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(discv5): lower verbose logs to trace (#10566)
Signed-off-by: sueun-dev <57546981+sueun-dev@users.noreply.github.com>
Co-authored-by: Usman Saleem <usman@usmans.info>
Enable DiscV5 by default in acceptance tests and fix cluster harness (#10619)
The BootNodesGenesisSetupTest was silently broken: it used the V4 genesis
key ("bootnodes") while DiscV5 was the default, so the genesis bootnode
config was never exercised. The harness wired peers independently, making
it pass regardless of the config under test.
Acceptance test DSL:
- ProcessBesuNodeRunner: emit --Xv5-discovery-enabled when discoveryV5Enabled=true,
fixing a long-standing gap where BesuNodeConfigurationBuilder.discoveryV5Enabled()
was silently ignored in process mode
- AdminNodeInfoTransaction: new Transaction<Map<String,Object>> backed by
admin_nodeInfo RPC, returning the full result map (enr, enode, id, etc.)
- AdminRequestFactory / AdminTransactions / AdminConditions: expose nodeInfo()
- BesuNode: add helpers to fetch ENR/enode from admin_nodeInfo at runtime
- Cluster: enable DiscV5 by default; close cluster in teardown
- NodeConfiguration: add discoveryV5Enabled flag (explicit per-node control)
BootNodesGenesisSetupTest: replace the broken test with two scoped tests:
- shouldConnectNodesViaV4EnodeBootnodesInGenesis: disables DiscV5, uses
"bootnodes" genesis key with enode:// URIs, asserts peer identity via
admin.hasPeer() not just count
- shouldConnectNodesViaV5EnrBootnodesInGenesis: uses "v5bootnodes" genesis
key with a real ENR fetched from admin_nodeInfo at runtime; both tests
use awaitPeerDiscovery=false so the harness does not wire peers
Other fixes:
- Disable DiscV5 for secp256r1 nodes in acceptance tests (unsupported)
- Fix cluster harness breaking auth-enabled nodes via admin_nodeInfo call
- Fix London fork timing regression in ExtendTransactionValidatorPluginTest
Fixes #9689
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Optmize memory usage of the bal parallel execution (#10606)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix chain height (#10608)
* drive SyncState bestChainHeight from engine_newPayload in PoS
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Demote closed channel exception log level (#10616)
* Demote ClosedChannelException log level to DEBUG
* Use supplier lambda in atTrace to avoid eager requestBodyAsJson evaluation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix isSyncing() during full sync on post-merge networks (#10613)
* Fix isSyncing() incorrectly returning false during full sync on post-merge networks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - pivot catch-up lifecycle management (#10590)
* BAL-based pivot catch-up lifecycle management
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs after headers, remove unused method
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs in a separate stage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Update discovery v5 library to 26.6.0 (#10612)
* Update discovery v5 library to 26.6.0
-- Fixes handshake resend
-- hive tests
Signed-off-by: Usman Saleem <usman@usmans.info>
* Update CHANGELOG entry for DiscV5 library update
Signed-off-by: Usman Saleem <usman@usmans.info>
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Fix WS TLS support in acceptance DSL (#10432)
* Fix WS TLS support in acceptance DSL
WS URLs now switch to / when is true, and forwards the matching flags (keystore/truststore, PEM, password or password-file, client auth) to the spawned node. Adds / accessors so the runner can pass the configured path through.
Signed-off-by: Dee <DeeADouble@proton.me>
* Trust self-signed certs in acceptance DSL ws/https clientsThe previous commit only addressed the server side. The DSL's
WebSocketClient (used both for the endpoint probe and the live RPC
service) and the login OkHttpClient were still plain TCP, so any wss://
or https:// hop silently failed the TLS handshake before the request
left the test. This wires both clients through a trust-all
SSLSocketFactory whenever ws-ssl is enabled, scoped to the acceptance
tests via a package-private helper.
Signed-off-by: Dee <DeeADouble@proton.me>
* Cover WS TLS DSL client flows
Disable endpoint identification for the acceptance-test WebSocket client
when using the insecure TLS helper, matching the existing trust-all
behavior for self-signed test certificates.
Add acceptance coverage for WS TLS with JKS inline passwords, JKS
password files, PEM key/cert configuration, and client auth with JKS and
PEM trust material.
Signed-off-by: Dee <DeeADouble@proton.me>
* Format WS TLS acceptance test
Signed-off-by: Dee <DeeADouble@proton.me>
* formatting and copyright header
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Dee <DeeADouble@proton.me>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Check the bad block manager when receiving a new block from the network (#10212)
* check the bad block manager when receiving a new block from the network. This allows to mark a whole fork invalid and signaling this to the CL at the next fcu
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level, improved comments in tests
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level to debug for not important events
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* addressed pr comments
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* make tests stricter
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
---------
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
snap/2 - track downloaded ranges (#10579)
* Add tracking of downloaded ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Iterate over children only once in SnapV2PersistDataStep
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Fix/eth capabilities oldest block when state is enabled (#10597)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Revert release process changes (#10604)
* Revert "feat(publish-release): add workflow_dispatch trigger, gated via environment (#10491)"
This reverts commit c8ca8a029a7feef70a10fc82afd97d6317aebdfd.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "fix(publish-release): keep gh release download in workspace cwd (#10490)"
This reverts commit be72aa2ae9fca47dfe5a00abf5d8117d01f4c972.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "proposed adjustments to release process (#10411)"
This reverts commit f027e9a7a99a2b91976e604e533517a64a836045.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "Gate final-version docker tags on release publish, not draft (#10306)"
This reverts commit f3e26cf2def9dd530fb0acf2014c3e25a15dbe59.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Reapply java 21 -> 25 lost in revert
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
downgrade duplicate engine api timeout log to debug (#10595)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
chore: tidy up some references to java 21 (#10596)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Enrich `/readiness` health endpoint with diagnostic details (#10412)
* Enrich /readiness health endpoint with diagnostic details (#10400)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Defensive copy for HealthCheckResult and add error field for invalid params
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Remove redundant isHealthy from HealthCheck interface
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Default omitted block parameter to latest on eth state methods (#10587)
* Default omitted block parameter to latest on eth state methods
eth_getBalance, eth_getCode, eth_getStorageAt, eth_getTransactionCount,
eth_getProof and eth_getStorageValues read the block parameter with
getRequiredParameter, so omitting it returned -32602 'Invalid block
param (block not found)'. Read it with getOptionalParameter and default
to BlockParameterOrBlockHash.LATEST when absent, per execution-apis
(Block required:false, default 'latest'). Adds a LATEST constant to
BlockParameterOrBlockHash.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: eth_getProof defaults to latest when block omitted
Replace errorWhenNoBlockNumberSupplied (which asserted the old
throw-on-missing behavior) with a test asserting an omitted block now
resolves to latest, matching the other state methods and the spec.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: assert latest response is success before casting in getProof default-block test
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Centralize optional-block defaulting and build LATEST without JSON parsing
Address review feedback (fab-10): move the 'optional block param, default
latest' logic into a shared blockParameterOrBlockHashWithLatestDefault helper on
AbstractBlockParameterOrBlockHashMethod, and have the six state methods delegate
to it with their param index. Build BlockParameterOrBlockHash.LATEST via a
private field-setting constructor instead of routing the constant through the
JSON-parsing constructor.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Add CHANGELOG entry for optional block parameter on eth state methods
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Move CHANGELOG entry to Unreleased section
Updated breaking changes and upcoming changes in the changelog to reflect new RPC compatibility and deprecations.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking (#10354)
* Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking
Resolves #10336. The JSON-RPC response serialization and streaming can block when the websocket write queue is full. Moving this logic to executeBlocking prevents slow clients from exhausting Vert.x event loop threads.
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* false for ordering to match HTTP JSON RPC
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: daniellehrner <daniel.lehrner@consensys.net>
Create snap/2-specific request classes and pipeline steps (#10560)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
chore: rotate changelog for 26.6.0 release (#10591)
* chore: rotate changelog for 26.6.0 release
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix PluginVerifier catalog not found when running from IntelliJ (#10585)
* copyArtifactsCatalogToResources task
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Add new payload listener (#10570)
* add NewPayloadListener for engine_newPayload events
Mirrors the existing UnverifiedForkchoiceListener pattern so other components
can observe headers delivered by the consensus layer without coupling to the
JSON-RPC layer. The listener fires for every engine_newPayload request after
the block hash has been verified against the payload contents, but before the
"syncing" early-return — so listeners receive headers even while the node is
snap-syncing.
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Add static-pivot snap/2 world state download skeleton (#10548)
* SnapV2 skeleton for static pivot
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track downloaded account ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Merge `PivotSyncState` into `SnapSyncProcessState` (#10549)
* Merge PivotSyncState with SnapSyncProcessState
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove mutable EMPTY_SYNC_STATE, make setCurrentHeader package-private
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Disallow empty change set for storage slot (#10582)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Integrate NullAway for nullability checks in ethstats package (#10520)
* feat: apply NullAway to ethstats module
* test: fix NullAway violations in ethstats test code
* test(ethstats): align successful AsyncResult cause() with Vert.x contract
* test(ethstats): add guard-path tests for sendBlockReport preconditions
Signed-off-by: mykim <kimminyong2034@gmail.com>
---------
Signed-off-by: mykim <kimminyong2034@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
kurtosis nightly task: pin ethereum-package (#10583)
* pin ethereum-package
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* full sha
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
nightly kurtosis interop assertoor test (#10569)
* nightly kurtosis interop assertoor test
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
add eth_getTransactionBySenderAndNonce RPC (#10501)
* storage index
* Add eth_getTransactionBySenderAndNonce RPC method
* Check transaction pool before index in eth_getTransactionBySenderAndNonce
* Add tx-sender-nonce-index-enabled to everything_config.toml test fixture
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Use `develop` tag name instead versioned (#10576)
ci: extract reusable docker.yml and migrate develop.yml to GHA (#10366)
* ci: extract reusable docker.yml and migrate develop.yml to GHA
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
* Apply suggestion from @joshuafernandes
equivalent and simpler
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Fix typo
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Fixed - logging cleanup for invalid blocks #10160 (#10180)
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-hex block numbers in debug_getRawReceipts, and eth_getProof (#10240)
* fix: reject non-hex block numbers in debug_getRawBlock, debug_getRawHeader, debug_getRawReceipts
The Hive rpc-compat suite sends decimal strings like "2" (no 0x prefix)
as block parameters and expects a -32602 INVALID_PARAMS error. Besu was
silently accepting these via Long.decode() in BlockParameter, which
accepts both decimal and hex strings.
Add pre-validation in the blockParameter()/blockParameterOrBlockHash()
overrides of each affected method: if the raw parameter is not a named
block tag (earliest/latest/pending/finalized/safe) and does not start
with "0x", throw InvalidJsonRpcParameters(-32602) immediately.
Fixes Hive rpc-compat failures:
debug_getRawBlock/get-invalid-number
debug_getRawHeader/get-invalid-number
debug_getRawReceipts/get-invalid-number
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: use BlockParameterOrBlockHash in debug_getRawBlock and debug_getRawHeader
Switch DebugGetRawBlock and DebugGetRawHeader from AbstractBlockParameterMethod
to AbstractBlockParameterOrBlockHashMethod so they accept block hashes as well
as block numbers, matching the pattern already used by DebugGetRawReceipts.
Move the hex-prefix validation into BlockParameterOrBlockHash itself so it
applies to all methods using that parameter type rather than being duplicated
per method. Update DebugSetHeadTest to pass hex block numbers accordingly.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: remove redundant hex validation from DebugGetRawReceipts
The per-method check in blockParameterOrBlockHash was already superseded
by the validation added to BlockParameterOrBlockHash itself.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* chore: fix spotless formatting and add changelog entry
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: add eth_getProof + debug_getRawTransaction hex validation per maintainer review
- Fix EthGetProofTest: replace decimal block numbers (String.valueOf(500/501))
with hex equivalents ("0x1f4" / "0x1f5") — needed because BlockParameterOrBlockHash
now rejects non-0x-prefixed numbers
- Add 0x prefix check to DebugGetRawTransaction for the transaction hash parameter,
fixing the hive rpc-compat debug_getRawTransaction/get-invalid-hash test failure
- CHANGELOG: add eth_getProof and debug_getRawTransaction to the affected-methods list;
move the block-number-hex note from Upcoming Breaking Changes to Breaking Changes
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: revert DebugGetRawTransaction change and consolidate CHANGELOG
Per maintainer feedback, keep this PR focused on block param hex
validation only. Reverted the 0x prefix check added to
DebugGetRawTransaction and removed the duplicate bug-fixes entry
from CHANGELOG — the breaking change entry already covers it.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* test: derive hex block numbers from blockNumber field in EthGetProofTest
Replace hardcoded "0x1f4" / "0x1f5" with "0x" + Long.toHexString(blockNumber)
and "0x" + Long.toHexString(blockNumber + 1) so the strings stay in sync with
the blockNumber field if it ever changes.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: allow negative hex block params to flow to downstream check
The hex-prefix check in BlockParameterOrBlockHash was rejecting inputs
like "-0x10" upfront with a generic IllegalArgumentException, which
methods mapped to INVALID_BLOCK_PARAMS ("Invalid block param (block
not found)"). The negative-number check already lives downstream in
AbstractBlockParameterOrBlockHashMethod and returns the more accurate
INVALID_BLOCK_NUMBER_PARAMS ("Invalid block number params") — accept
an optional leading minus so that path is reached.
Also update JsonRpcHttpServiceTest.ethGetStorageAtBlockNumber to pass
"0x0" instead of decimal "0" — the new contract is hex-only and this
test was the only remaining decimal usage in the api module.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* remove -0x carve out and update relevant tests
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix: align debug_getRaw* methods with execution-apis BlockNumberOrTag spec
debug_getRawBlock, debug_getRawHeader and debug_getRawReceipts now use
BlockParameter (BlockNumberOrTag) instead of BlockParameterOrBlockHash,
matching the execution-apis spec. Resolves the remaining
debug_getRawReceipts/get-invalid-number hive failure.
CHANGELOG breaking-changes list now explicitly names these three methods
and eth_getProof (which keeps BlockParameterOrBlockHash per its spec).
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* revert: drop DebugGetRawBlock/DebugGetRawHeader changes per maintainer review
Reverts both files to origin/main so this PR stays focused on the
block-parameter hex-prefix validation change.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* review comments
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Avoid blocking txpool save restore callers (#10561)
* Avoid blocking txpool save restore callers
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Add txpool save restore lock tests
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Address txpool save restore review comments
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix engine_newPayload invalid request type invalid status (#10525)
* fix: restore INVALID status for unknown execution request types in engine_newPayload
* changelog: engine_newPayload execution request validation error codes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
perf: cache last validated JWT token in EngineAuthService (#10559)
* perf: cache last validated JWT token in EngineAuthService
Engine API JWT tokens rotate at most once per minute (the CL updates iat
on a 60-second cycle). Under a CL reconnect burst, every engine API call
in that burst carries the same token string, causing repeated Jackson JSON
parsing (ByteQuadsCanonicalizer synchronized lock) and HMAC-SHA256
verification on the Vert.x event loop thread.
Cache the last successfully validated token in an AtomicReference. On a
cache hit (same raw token string), skip straight to the iat freshness
check — no Jackson, no HMAC, no locking. The slow path fires only on
token rotation (~once per minute) or on first call after restart.
The iat freshness check (issuedRecently) is still called on every request
so a cached token is correctly rejected once it goes stale.
Observed symptom: vert.x-eventloop-thread blocked for 15+ seconds in
ByteQuadsCanonicalizer.makeChild during a Prysm reconnect burst, causing
FilterManager timer contention and backward sync throughput collapse.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(discv5): IPv6 ENR auto-discovery via peer consensus (#9874) (#10468)
Add IPv6 address consensus mechanism to DiscV5 peer discovery:
- New NodeRecordManager tracks IPv6 address observations from peers
- New IpV6NewAddressHandler validates and applies consensus IPv6 addresses
- CLI option --ipv6-discovery-enabled (default: false) controls feature
- Updated PeerDiscoveryAgentFactoryV5 to integrate IPv6 consensus flow
Enhances DiscV5 peer discovery to support dual-stack IPv6 networks by
allowing nodes to discover and agree on IPv6 addresses through peer reports
when multiple peers report the same address, improving auto-discovery on
networks without hardcoded IPv6 bootnodes.
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Co-authored-by: Matilda Clerke <matilda.clerke@consensys.net>
Refactor: Extract EVMv2 stack manipulation unit tests (#10535)
* Extract NullaryOperationV2Test - Covers nullary fixed cost operations
* Extract BinaryOperationV2Test - Covers binary fixed cost operations
* Extract TernaryOperationV2Test - Covers MulModOperationV2 but will get used for at least AddMod later
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
eliminate flaky port collision (#10556)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix(at): prevent BftSyncAcceptanceTest port collision under parallel execution
The test used fixed ports derived from node names like "validator1".
When the 3 parameterized cases (ibft2/FULL, qbft/FULL, ibft2/SNAP) run
concurrently, identical names hash to identical ports, causing exit code 2
port-conflict failures on startup.
Prefix node names with testName+syncMode so each parameterized case gets
a distinct hash and therefore distinct fixed ports.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Acceptance Tests: if error creating ports file, make it obvious (#10555)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: use non-zero exit code on disk-full shutdown (#10254)
* fix: use non-zero exit code on disk-full shutdown
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* test: cover non-NoSpace RocksDB IO errors
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* fix: log exception details on disk-full instead of bare message
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
optimize tracePreExecution tracePostExecution (#10541)
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Fix IndexOutOfBoundsException race condition in TransactionBroadcaster (#10482)
* Fix IndexOutOfBoundsException race condition in TransactionBroadcaster
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* test: add regression test for IndexOutOfBoundsException race condition in TransactionBroadcaster
When peerCount() and streamAvailablePeers() are called sequentially, peers can
disconnect between the two calls. This causes numPeersToSendFullTransactions
(calculated from peerCount) to exceed the actual number of peers returned by
streamAvailablePeers(), causing subList() to throw IndexOutOfBoundsException.
The new test reproduces this scenario: peerCount() returns 9 (sqrt = 3 full-tx
peers) but only 2 peers are available when streamAvailablePeers() is called.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Fix spotless formatting
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix: correct off-by-one in debug_accountAt transaction index validation (#10464)
* fix: correct off-by-one in debug_accountAt transaction index validation (#10463)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* docs: add changelog entry for debug_accountAt off-by-one fix
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
perf: parallelize block body DB lookups in engine_getPayloadBodies methods (#10532)
* perf: parallelize block body DB lookups in engine_getPayloadBodies methods
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* added benchmark
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* review: address reviewer comments on engine_getPayloadBodies parallelization
- CHANGELOG: add PR link #10532
- JMH benchmark: remove @Fork(1) annotation (gradle JMH plugin overrides
to 3 forks; annotation was misleading)
- JMH benchmark: update run command to -Pincludes=EngineGetPayloadBodiesParallel
so it doesn't run all benchmarks in the module
* review: add --no-daemon to benchmark run command and document in BENCHMARKING.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Make snap/2 BAL fetching strict (#10542)
* Make BAL-fetching peer task retry on incomplete data
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove IncompleteResultsException
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Require Java 25 to build (#10539)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Prepare snap sync downloader selection for snap/2 (#10545)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Remove optimization to apply BALs before flat db heal (#10538)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Replace Address.hashCache Guava LoadingCache with Caffeine (#10235)
* Replace Address.hashCache Guava LoadingCache with Caffeine
Under heavy miss rate (pre-EIP-150 DoS-era blocks spam BALANCE/EXTCODESIZE
against tens of thousands of pseudo-random addresses per tx) Guava's per-segment
ReentrantLock serialises parallel tx executors on every account-touching EVM
opcode. A thread dump of a stuck import thread on a Bonsai full-sync showed the
thread parked on LocalCache$Segment.storeLoadedValue.
Caffeine's load path is CAS-based (no segment write lock) and already the
in-house cache library used elsewhere in Besu.
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* test: move addressHash correctness tests into existing vm/AddressTest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove unused evm arg from FixedCostOperations (#10533)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Enable NullAway static null-safety analysis for datatypes module (#10394)
* Enable NullAway static null-safety analysis for datatypes module
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
* pin nullaway version centrally in platform/build.gradle
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
---------
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
Add experimental CLI option to advertise snap/2 (#10536)
* Add experimental CLI option to advertise snap/2
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove condition
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Fix tests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: QBFT/IBFT2 legacy RoundChange and Proposal encoding (#10499)
## Problem
QBFT RoundChange and Proposal messages failed to decode against
pre-26.1.0 peers because the BAL (blockAccessList) field was always
included in the RLP encoding even when absent, causing a decode error
on the receiving side.
## Changes
### Core fix
- Encode RoundChange and Proposal without blockAccessList when the field
is absent (null), matching the legacy wire format
- Fix QBFT ProposalPayload signature verification under legacy encoding
### Legacy interop flag
- Add `--Xbft-legacy-protocol-encoding` flag (UnstableBftOptions) to
force legacy encoding for IBFT2/QBFT, enabling interop with
pre-26.1.0 peers
- Rename from earlier `--Xqbft-legacy-roundchange-encoding` and extend
to cover IBFT2 as well
- Rename `BftOptions` → `UnstableBftOptions`, move to
`options/unstable/`, support bare flag form
- Document flag limitation when BAL is present (CHANGELOG + javadoc)
### Refactoring
- Make `useLegacyEncoding` constructors private; expose
`withLegacyEncoding()` factory methods on message wrappers
- Drop legacy constructors; always omit BAL in legacy encoding mode
- Use typed `getArgument` overloads in QBFT codec mocks
### Tests
- ProposalMessageTest and RoundChangeMessageTest for IBFT2
- Extended RoundChangeTest and ProposalTest for QBFT covering legacy
and standard encoding paths
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Co-authored-by: Cedric <53888545+ghostant-1017@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
feat(api): implement eth_baseFee JSON-RPC method (#10457)
* feat(api): implement eth_baseFee JSON-RPC method
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
* chore(changelog): add eth_baseFee entry
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
---------
Signed-off-by: William Morriss <wjmelements@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Decouple snap data requests from `SnapWorldDownloadState` (#10530)
* Replace SnapWorldDownloadState by SnapRangeRequestContext in snap range requests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename SnapRangeRequestContext to SnapRequestContext
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: reject non-hex block numbers in BlockParameter (#10515)
* fix: reject non-hex block numbers in BlockParameter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: detect blob tx violations (missing/mismatched sidecar) (#10510)
* disconnect for invalid blob tx data
* peertask: exit retry loop immediately on MalformedRlpFromPeerException
After disconnecting a peer for malformed RLP, return PEER_DISCONNECTED
instead of INVALID_RESPONSE so the inner retry loop exits without the
1-second sleep. This allows consumedAnnouncements() to run promptly,
freeing the hash for the good peer's fetcher to pick up.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fixup: use fromAnnouncements factory in BufferedGetPooledTransactionsFromPeerFetcher
Completes the refactor from the blob-peer-disconnect-violations fix:
swaps the removed public List<TransactionAnnouncement> constructor for
the new fromAnnouncements() factory method.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: Peer Tracker incorrectly evicts peers pre-validation (#10511)
* stream connected peers
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-0x-prefixed tx hash in debug_getRawTransaction (#10505)
* fix: use Jackson HashDeserializer to enforce 0x prefix on all Hash RPC params
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge PivotSyncDownloader with SnapSyncDownloader (#10528)
* Merge PivotSyncDownloader with SnapSyncDownloader
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Further cleanup
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Simplify wiring bidirectional references between state and chain downloader (#10529)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix unavailable BAL handling in snap (#10519)
* Fix unavailable BAL handling in snap
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add tests for snap.GetBlockAccessListsFromPeerTask
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Enable NullAway for metrics core (#10453)
* Enable NullAway for metrics core
* Remove unused Jakarta NotNull annotations
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
---------
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths (#10527)
* perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths
* nit: rename INSTANCE to WITHOUT_STACKTRACE for clarity
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless CancellationException in AbstractEthTask (#10526)
executeSubTask() is called by every eth task subclass whenever a sub-task
is dispatched. When the parent task has already been cancelled, it previously
allocated a fresh CancellationException — capturing a full JVM stack trace —
on every call. At high task-cancellation rates (sync, peer churn, shutdown)
this adds unnecessary allocation pressure and CPU overhead from the native
stack-walk.
Replace with a stackless singleton following the same pattern as the
RlpxAgent peer-gate fix (besu-eth/besu#10510) and Netty's
StacklessClosedChannelException.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
use stackless singleton for peer-gate rejection in RlpxAgent (#10523)
Allocating a fresh RuntimeException with full stack trace on every
outbound peer-gate rejection causes measurable GC pressure at high
connection-attempt rates (observed ~1.5 throws/sec during chain-head
stalls, per JFR in besu-eth/besu#10498).
Replace the per-call allocation with a stackless singleton sentinel,
following the same pattern as Netty's StacklessClosedChannelException.
The LOG.trace call is updated to use parameterised formatting to avoid
string concatenation when trace logging is disabled.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
testing_buildBlockV1: exclude null fields from result (#10492)
* exclude fields from block building result when they are null
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Consider maxFeePerBlobGas when sorting tx in the layered txpool (#10513)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix(jsonrpc): eth_capabilities state/stateproofs disabled detection (#10377)
Check genesis world state availability via WorldStateArchive.isWorldStateAvailable().
If genesis state is not available (e.g. SNAP sync nodes using Bonsai), state
and stateproofs now correctly report disabled=true.
Fixes #10371
Signed-off-by: Arshdeep Singh <arshdeep.ssingh777@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Rename EthashConfigOptions to FixedDifficultyConfigOptions (#10507)
* Rename EthashConfigOptions to FixedDifficultyConfigOptions
* Support fixeddifficulty as a genesis config key alias for ethash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
testing_buildBlockV1 - error if tx provided but not applied (#10486)
* when transactions are explicitly provided, return an error if any were not applied
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* deterministic ordering
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: `miner_changeTargetGasLimit` silently ignores valid gas limit on PoW/BFT networks (#10460)
* fix: apply target gas limit in AbstractMinerExecutor.changeTargetGasLimit
The changeTargetGasLimit method in AbstractMinerExecutor contained an
empty if-block that validated the input but never applied the new gas
limit to miningConfiguration. This caused miner_changeTargetGasLimit
RPC calls to silently succeed without actually updating the target gas
limit on PoW and BFT networks.
Add the missing miningConfiguration.setTargetGasLimit(newTargetGasLimit)
call to ensure the target gas limit is properly updated.
Add AbstractMinerExecutorTest with regression tests to verify the gas
limit is correctly persisted to MiningConfiguration after calling
changeTargetGasLimit.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Update copyright notice in AbstractMinerExecutorTest.java
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
feat: Add cross-block code caching for improved performance (#10390)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix LayeredKeyValueStorage.isClosed() duplicated execution (#10508)
* Fix LayeredKeyValueStorage.isClosed() O(N) recursion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Lazy RLP decoding for GetReceiptsMessage (#10450)
* GetReceiptsMessage lazy decoding
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
fix flaky test on BalStateRootCommitterFactoryTest (#10500)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
refactor: replace eager string concatenation with SLF4J parameterized logging (#10352)
* refactor: replace eager string concatenation (#10329)
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Add txsSelectionHighScore metric for per-included-tx selection time (#10265)
* Add txsSelectionHighScore metric for per-included-tx selection time
Expose, alongside the existing txsSelection timing, the aggregate
evaluation time of transactions that were actually committed into the
block. The accumulator is updated in SelectedPendingAction.runOnCommit,
so by construction it excludes invalid, rejected, rolled-back, and
timeout-killed txs.
BlockCreationTiming gains a registerValue(step, duration) that stores
standalone durations printed as-is, without advancing the delta chain
of stopwatch-based register(step) entries.
Fixes #9179
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
* Address review feedback for txsSelectionHighScore
- C…
fab-10
pushed a commit
to fab-10/besu
that referenced
this pull request
Jun 25, 2026
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Merge EngineNewPayloadV3ValidationTest into EngineNewPayloadV3Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fixes following the refactor of EngineNewPayloadV3Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fixes following the refactor of EngineNewPayloadV2Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fixes following the refactor of EngineNewPayloadV1Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
First pass of refactor newPayload code complete
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Reorg and document newPayloadV1
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts:
# ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV1.java
WIP: engine_newPayload refactor in progress
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Rename FcU result data structures to follow the spec
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove unrelated changes
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix rebase
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Move new implementation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Add support for fail on unknown JSON properties unless are null
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove previous engine_forkchoiceUpdated implementation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Apply suggestions from code review
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
engine_forkchoiceUpdated refactor
Refactor the engine_forkchoiceUpdated V1-V4 hierarchy into a sealed,
version-scheduled implementation under
ethereum.api.jsonrpc.internal.methods.engine.forkchoiceupdated, driven
by a small VersionScheduler that maps each method version to its active
hard-fork range. Introduces typed payload-attribute and forkchoice-state
parameter classes (PayloadAttributesV1-V4, ForkchoiceStateV1) and
adjusts the merge block-creation layer (PayloadIdentifier,
MergeCoordinator, TransitionCoordinator, PreparePayloadArgsBuilder)
accordingly.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
# ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonRpcParameter.java
align block number position in log lines (#10632)
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
Co-authored-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods (#10662)
* feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods
* chore(pow-removal): remove remote sealer / PoW job constants from MiningConfiguration.Unstable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: skip DNSDaemon when --discovery-dns-url is blank or empty (#10666)
Signed-off-by: Usman Saleem <usman@usmans.info>
lazy GetStorageRangeMessage (#10660)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
feat(pow-removal): Phase 1 - remove PoW mining infrastructure (#10656)
* feat(pow-removal): Phase 1 - remove PoW mining infrastructure
Delete all PoW-specific mining code: PoWBlockCreator, PoWBlockMiner,
PoWMinerExecutor, PoWMiningCoordinator, AbstractMinerExecutor,
AbstractMiningCoordinator, IncrementingNonceGenerator, RandomNonceGenerator,
PoWSolver, PoWSolverInputs, PoWObserver.
* fix: pass miningConfiguration to NoopMiningCoordinator in MainnetBesuControllerBuilder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - downloaded storage range tracker (#10609)
* Add storage range tracker
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track all downloaded storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Registrer full range for accounts with empty storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add RangeManager tests asserting starts of generated ranges are increasing
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add test that generated ranges start with min
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
pathbased package refactoring (#10641)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
lazy decoding of GetByteCodeMessage (#10652)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
uprev web3j to 5.0.3 (#10627)
* uprev web3j and add dependency links in acceptance-tests gradle files
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: initialize profilers list before adding gc in jmh config (#10651)
-PgcProfiler=true silently did nothing when -PasyncProfiler was not also
provided
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
upgrade license report plugin (#10650)
* upgrade license report plugin
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory (#10524)
* perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory
Replaces the per-request 100-block scan in eth_gasPrice / eth_maxPriorityFeePerGas
with a per-head FeeOracleSnapshot computed off the block-import thread (when an
EthScheduler is available) and cached by chain-head hash. A cold path on the request
side self-heals: the first caller after a head change computes inline and seeds the
snapshot for subsequent callers. Bounds (miner_setMinGasPrice /
miner_setMinPriorityFee) are still applied at read time against the live mining
config, so configuration changes take effect immediately and never get baked into
a stale snapshot.
eth_feeHistory gains a result cache for "latest" requests, keyed on
(headHash, blockCount, sortedPercentiles, RewardBounds snapshot, nextBlockHardforkId).
Historic-block queries bypass the cache. The pre-existing per-block reward cache now
stores unbounded rewards; request-specific bounding is applied per-call with a
mining-config snapshot taken at request entry. Other targeted wins:
- getBlobBaseFees reuses the previous header instead of issuing one parent-hash
RocksDB read per block (saves up to 255 reads per feeHistory-256 request).
- getNextBaseFee / getNextBlobFee skip the chainHead+1 storage lookup when the
block can't exist (the "latest" case).
- getBlockHeaders uses the bulk Blockchain.getBlockHeaders(start, count) API, which
walks parent hashes from the in-memory header cache.
- Rewards loop is sequential again (fork-join split overhead dominated cache-hit
cases for big ranges).
- TransactionInfo no longer carries the Transaction reference.
DefaultBlockchain.getBlockBody / getTxReceipts now populate the in-memory cache on
read miss (matching the existing getBlockHeader(Hash) pattern). Refactors the three
populate-on-miss accessors into a single getCached<T> helper. Without this fix the
--cache-last-blocks cache only ever held blocks imported since startup, making it
useless for fee-oracle scans of pre-existing chain history.
Tests updated to mock the new access pattern (getBlockHeaders + getBlockBody by
hash). New test latestResultCacheMissesWhenNextBlockHardforkChanges pins the
HardforkId component of the cache key.
Measured on Hoodi via json-bench (k6, 20 RPS x 30s, post-restart, fresh JIT):
test baseline p95 fork p95 speedup
eth_gasPrice 11.64 ms 3.18 ms 3.66x
eth_maxPriorityFeePerGas 10.34 ms 3.21 ms 3.22x
eth_feeHistory (256 blocks) 12.72 ms 5.50 ms 2.31x
eth_feeHistory (5 blocks) 4.74 ms 3.58 ms 1.32x (HTTP/JSON floor)
hive rpc-compat: identical 22 pre-existing failures on both images (zero
regressions); eth_feeHistory/fee-history passes on both. eth_gasPrice and
eth_maxPriorityFeePerGas have no execution-apis fixtures; behavioural coverage is
in the updated unit tests.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: chain-time fork resolution, memory-bound fee caches, explicit receipts check
- Resolve next-block protocol specs from the chain head timestamp instead
of System.currentTimeMillis() in EthFeeHistory and BlockchainQueries
(gasPrice, gasPriceLowerBound, getNextBlockBaseFee, blob-fee fallback):
the wall clock is not a trusted time source and its millisecond scale
would resolve future timestamp-scheduled forks as already active.
- Rename the per-block reward cache (perBlockRewardsCache) and bound both
EthFeeHistory caches by approximate bytes with MemoryBoundCache weighers
(key + value) instead of entry counts.
- Replace the implicit ArrayIndexOutOfBoundsException on a receipts/body
count mismatch with an explicit Preconditions.checkState and add a
regression test.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: fix BlockchainQueriesLogCacheTest, trim verbose comments
- BlockchainQueriesLogCacheTest: clear the construction-time fee-oracle
observer registration so per-test verifyNoMoreInteractions checks only
the log-cache query calls.
- Condense verbose comments across EthFeeHistory and BlockchainQueries to
one line of rationale where non-obvious; drop narration of self-evident code.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Remove unnecessary comments that restate the code
Drop PR-added comments that narrated what the code already says (cache
field/weigher descriptions, a redundant cache-policy note, a self-evident
delegating-method doc); keep only one-line rationale for non-obvious cases.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Defer reward percentile sort until after cache-key path
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* move rewards.filter after isPresent check and resolve return cached emptyList
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Luis Pinto <luis.pinto@consensys.net>
Fix SnapWorldStateDownloader losing active downloadState reference (#10349)
`run()` built a new `SnapWorldDownloadState` but never stored it on `this.downloadState`, so the reentrant guard, `cancel()`, and the inflight/progress gauges all saw `null`. Store the new state on the `AtomicReference` right after construction so those paths observe the live download.
Signed-off-by: Dee <DeeADouble@proton.me>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Add behaviour change notice for rpc-tx-feecap (#10640)
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
changelog rotation for 26.6.1 (#10637)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Thread startKeyHash through v2 snap range probing
Follow-up to #10634 (review by macfarla).
- SnapV2AccountRangeRequest and SnapV2StorageRangeRequest now pass the
explicit startKeyHash to findNewBeginElementInRange, matching their v1
counterparts. Previously the empty-receivedKeys case probed from
MIN_RANGE instead of the actual range start.
- Add a Create2Operation regression test mirroring the CreateOperation
one, covering the EIP-3860 oversized-initcode early abort so the shared
getInputSize stack-index contract is exercised for the CREATE2 layout.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
revert log level change back to error (#10626)
* revert log level change back to error
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(engine): return SYNCING when parent world state is not immediately cached (#10600)
* fix(engine): return SYNCING when parent world state is not immediately cached
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
optimizations, refactorings, and improved test coverage (#10634)
* evm: drop dead try/catch in Memory.calculateNewActiveWords
Words.clampedAdd is total — it saturates rather than throwing — so
the ArithmeticException branch was unreachable. Compute the saturated
byte size directly and short-circuit to the gas-overflow sentinel
when it exceeds MAX_BYTES, which is what the catch arm was trying to
express. No behaviour change on the supported range; downstream
gas accounting in memoryCost() clamps to Long.MAX_VALUE as before.
Signed-off-by: jflo <justin+github@florentine.us>
* evm: evaluate EIP-3860 initcode-size limit before initcode resolution
The CREATE/CREATE2 size check currently runs after the initcode has
been resolved from memory and before state gas is charged. Per
EIP-3860 the limit is an early exceptional abort, so checking the
stack-declared size first keeps the abort cheap and side-effect-free:
the operation no longer expands memory based on an unvalidated
length, and the ordering aligns with the regular-gas / state-gas
separation introduced in this branch.
Adds a covering test that pushes an out-of-range size and asserts
the operation halts with CODE_TOO_LARGE without growing memory.
Signed-off-by: jflo <justin+github@florentine.us>
* Validate RLPx frame size lower bound in deframer
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* Probe full snap range for omitted in-range leaves
findNewBeginElementInRange previously short-circuited when the responder
returned no keys, leaving the caller to assume the requested range was
fully covered. Plumb the request's start hash through the helper and
probe from that origin instead, so an empty-keys response that should
have included data still surfaces a follow-up request.
The probe also relies on visitAll throwing when an in-range node is
missing. That signal is absent when a responder supplies enough proof
nodes to make every leaf reachable through the InnerNodeDiscoveryManager
— the walk completes cleanly even though most leaves were not echoed
back in the keys map. Iterate the inner-node registry afterwards and
surface the lowest in-range leaf that the responder did not include, so
the caller schedules the follow-up fetch.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Agentic PR guidance for Contributors (#10414)
* hoooooo boy those links are borked, probably forever
Signed-off-by: jflo <justin+github@florentine.us>
* Apply suggestion from @macfarla
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
snap/2 - invalid range proof handling (#10598)
* Handle invalid range proofs
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address code review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
remove not trusted root computation (#10622)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
remove bal size check between transaction (#10621)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
snap/2 - fix BAL retry handling for partial responses (#10593)
* Fix GetBlockAccessLists retry mechanism
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename test helper class
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix BFT invalid block production with `prevrandao` (#10611)
* Recreate for issue with PREVRANDAO op code and QBFT consensus
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Lint
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Fix compilation errors
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix prevrandao on BFT block creation
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add a test for IBFT2
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Chain height assertion is relative, not absolute
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update the changelog
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix copyright wording
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Tidy up test comments
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update existing unit test to check mix hash
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Update the BFT soak test to include upgrading to `Osaka` (#10607)
* Update the BFT soak test from shanghai to osaka
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove hard-coded contract address
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix incorrect test assertion
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Ensure shanghai and osaka upgrades are done individually
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Make sure assertions are less brittle
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove extraneous line
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove unnecessary fork additions to genesis file for Osaka upgrade
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix for Bonsai Archive from PR 10503
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Don't have both shanghai and osaka tasks download solc
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/pathbased/bonsai/storage/BonsaiArchiveWorldStateLayerStorage.java
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update acceptance-tests/tests/osaka/osakacontracts/SimpleStorageOsaka.sol
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add comments to build and test files
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(discv5): lower verbose logs to trace (#10566)
Signed-off-by: sueun-dev <57546981+sueun-dev@users.noreply.github.com>
Co-authored-by: Usman Saleem <usman@usmans.info>
Enable DiscV5 by default in acceptance tests and fix cluster harness (#10619)
The BootNodesGenesisSetupTest was silently broken: it used the V4 genesis
key ("bootnodes") while DiscV5 was the default, so the genesis bootnode
config was never exercised. The harness wired peers independently, making
it pass regardless of the config under test.
Acceptance test DSL:
- ProcessBesuNodeRunner: emit --Xv5-discovery-enabled when discoveryV5Enabled=true,
fixing a long-standing gap where BesuNodeConfigurationBuilder.discoveryV5Enabled()
was silently ignored in process mode
- AdminNodeInfoTransaction: new Transaction<Map<String,Object>> backed by
admin_nodeInfo RPC, returning the full result map (enr, enode, id, etc.)
- AdminRequestFactory / AdminTransactions / AdminConditions: expose nodeInfo()
- BesuNode: add helpers to fetch ENR/enode from admin_nodeInfo at runtime
- Cluster: enable DiscV5 by default; close cluster in teardown
- NodeConfiguration: add discoveryV5Enabled flag (explicit per-node control)
BootNodesGenesisSetupTest: replace the broken test with two scoped tests:
- shouldConnectNodesViaV4EnodeBootnodesInGenesis: disables DiscV5, uses
"bootnodes" genesis key with enode:// URIs, asserts peer identity via
admin.hasPeer() not just count
- shouldConnectNodesViaV5EnrBootnodesInGenesis: uses "v5bootnodes" genesis
key with a real ENR fetched from admin_nodeInfo at runtime; both tests
use awaitPeerDiscovery=false so the harness does not wire peers
Other fixes:
- Disable DiscV5 for secp256r1 nodes in acceptance tests (unsupported)
- Fix cluster harness breaking auth-enabled nodes via admin_nodeInfo call
- Fix London fork timing regression in ExtendTransactionValidatorPluginTest
Fixes #9689
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Optmize memory usage of the bal parallel execution (#10606)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix chain height (#10608)
* drive SyncState bestChainHeight from engine_newPayload in PoS
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Demote closed channel exception log level (#10616)
* Demote ClosedChannelException log level to DEBUG
* Use supplier lambda in atTrace to avoid eager requestBodyAsJson evaluation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix isSyncing() during full sync on post-merge networks (#10613)
* Fix isSyncing() incorrectly returning false during full sync on post-merge networks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - pivot catch-up lifecycle management (#10590)
* BAL-based pivot catch-up lifecycle management
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs after headers, remove unused method
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs in a separate stage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Update discovery v5 library to 26.6.0 (#10612)
* Update discovery v5 library to 26.6.0
-- Fixes handshake resend
-- hive tests
Signed-off-by: Usman Saleem <usman@usmans.info>
* Update CHANGELOG entry for DiscV5 library update
Signed-off-by: Usman Saleem <usman@usmans.info>
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Fix WS TLS support in acceptance DSL (#10432)
* Fix WS TLS support in acceptance DSL
WS URLs now switch to / when is true, and forwards the matching flags (keystore/truststore, PEM, password or password-file, client auth) to the spawned node. Adds / accessors so the runner can pass the configured path through.
Signed-off-by: Dee <DeeADouble@proton.me>
* Trust self-signed certs in acceptance DSL ws/https clientsThe previous commit only addressed the server side. The DSL's
WebSocketClient (used both for the endpoint probe and the live RPC
service) and the login OkHttpClient were still plain TCP, so any wss://
or https:// hop silently failed the TLS handshake before the request
left the test. This wires both clients through a trust-all
SSLSocketFactory whenever ws-ssl is enabled, scoped to the acceptance
tests via a package-private helper.
Signed-off-by: Dee <DeeADouble@proton.me>
* Cover WS TLS DSL client flows
Disable endpoint identification for the acceptance-test WebSocket client
when using the insecure TLS helper, matching the existing trust-all
behavior for self-signed test certificates.
Add acceptance coverage for WS TLS with JKS inline passwords, JKS
password files, PEM key/cert configuration, and client auth with JKS and
PEM trust material.
Signed-off-by: Dee <DeeADouble@proton.me>
* Format WS TLS acceptance test
Signed-off-by: Dee <DeeADouble@proton.me>
* formatting and copyright header
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Dee <DeeADouble@proton.me>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Check the bad block manager when receiving a new block from the network (#10212)
* check the bad block manager when receiving a new block from the network. This allows to mark a whole fork invalid and signaling this to the CL at the next fcu
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level, improved comments in tests
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level to debug for not important events
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* addressed pr comments
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* make tests stricter
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
---------
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
snap/2 - track downloaded ranges (#10579)
* Add tracking of downloaded ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Iterate over children only once in SnapV2PersistDataStep
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Fix/eth capabilities oldest block when state is enabled (#10597)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Revert release process changes (#10604)
* Revert "feat(publish-release): add workflow_dispatch trigger, gated via environment (#10491)"
This reverts commit c8ca8a029a7feef70a10fc82afd97d6317aebdfd.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "fix(publish-release): keep gh release download in workspace cwd (#10490)"
This reverts commit be72aa2ae9fca47dfe5a00abf5d8117d01f4c972.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "proposed adjustments to release process (#10411)"
This reverts commit f027e9a7a99a2b91976e604e533517a64a836045.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "Gate final-version docker tags on release publish, not draft (#10306)"
This reverts commit f3e26cf2def9dd530fb0acf2014c3e25a15dbe59.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Reapply java 21 -> 25 lost in revert
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
downgrade duplicate engine api timeout log to debug (#10595)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
chore: tidy up some references to java 21 (#10596)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Enrich `/readiness` health endpoint with diagnostic details (#10412)
* Enrich /readiness health endpoint with diagnostic details (#10400)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Defensive copy for HealthCheckResult and add error field for invalid params
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Remove redundant isHealthy from HealthCheck interface
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Default omitted block parameter to latest on eth state methods (#10587)
* Default omitted block parameter to latest on eth state methods
eth_getBalance, eth_getCode, eth_getStorageAt, eth_getTransactionCount,
eth_getProof and eth_getStorageValues read the block parameter with
getRequiredParameter, so omitting it returned -32602 'Invalid block
param (block not found)'. Read it with getOptionalParameter and default
to BlockParameterOrBlockHash.LATEST when absent, per execution-apis
(Block required:false, default 'latest'). Adds a LATEST constant to
BlockParameterOrBlockHash.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: eth_getProof defaults to latest when block omitted
Replace errorWhenNoBlockNumberSupplied (which asserted the old
throw-on-missing behavior) with a test asserting an omitted block now
resolves to latest, matching the other state methods and the spec.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: assert latest response is success before casting in getProof default-block test
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Centralize optional-block defaulting and build LATEST without JSON parsing
Address review feedback (fab-10): move the 'optional block param, default
latest' logic into a shared blockParameterOrBlockHashWithLatestDefault helper on
AbstractBlockParameterOrBlockHashMethod, and have the six state methods delegate
to it with their param index. Build BlockParameterOrBlockHash.LATEST via a
private field-setting constructor instead of routing the constant through the
JSON-parsing constructor.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Add CHANGELOG entry for optional block parameter on eth state methods
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Move CHANGELOG entry to Unreleased section
Updated breaking changes and upcoming changes in the changelog to reflect new RPC compatibility and deprecations.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking (#10354)
* Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking
Resolves #10336. The JSON-RPC response serialization and streaming can block when the websocket write queue is full. Moving this logic to executeBlocking prevents slow clients from exhausting Vert.x event loop threads.
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* false for ordering to match HTTP JSON RPC
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: daniellehrner <daniel.lehrner@consensys.net>
Create snap/2-specific request classes and pipeline steps (#10560)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
chore: rotate changelog for 26.6.0 release (#10591)
* chore: rotate changelog for 26.6.0 release
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix PluginVerifier catalog not found when running from IntelliJ (#10585)
* copyArtifactsCatalogToResources task
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Add new payload listener (#10570)
* add NewPayloadListener for engine_newPayload events
Mirrors the existing UnverifiedForkchoiceListener pattern so other components
can observe headers delivered by the consensus layer without coupling to the
JSON-RPC layer. The listener fires for every engine_newPayload request after
the block hash has been verified against the payload contents, but before the
"syncing" early-return — so listeners receive headers even while the node is
snap-syncing.
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Add static-pivot snap/2 world state download skeleton (#10548)
* SnapV2 skeleton for static pivot
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track downloaded account ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Merge `PivotSyncState` into `SnapSyncProcessState` (#10549)
* Merge PivotSyncState with SnapSyncProcessState
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove mutable EMPTY_SYNC_STATE, make setCurrentHeader package-private
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Disallow empty change set for storage slot (#10582)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Integrate NullAway for nullability checks in ethstats package (#10520)
* feat: apply NullAway to ethstats module
* test: fix NullAway violations in ethstats test code
* test(ethstats): align successful AsyncResult cause() with Vert.x contract
* test(ethstats): add guard-path tests for sendBlockReport preconditions
Signed-off-by: mykim <kimminyong2034@gmail.com>
---------
Signed-off-by: mykim <kimminyong2034@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
kurtosis nightly task: pin ethereum-package (#10583)
* pin ethereum-package
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* full sha
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
nightly kurtosis interop assertoor test (#10569)
* nightly kurtosis interop assertoor test
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
add eth_getTransactionBySenderAndNonce RPC (#10501)
* storage index
* Add eth_getTransactionBySenderAndNonce RPC method
* Check transaction pool before index in eth_getTransactionBySenderAndNonce
* Add tx-sender-nonce-index-enabled to everything_config.toml test fixture
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Use `develop` tag name instead versioned (#10576)
ci: extract reusable docker.yml and migrate develop.yml to GHA (#10366)
* ci: extract reusable docker.yml and migrate develop.yml to GHA
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
* Apply suggestion from @joshuafernandes
equivalent and simpler
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Fix typo
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Fixed - logging cleanup for invalid blocks #10160 (#10180)
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-hex block numbers in debug_getRawReceipts, and eth_getProof (#10240)
* fix: reject non-hex block numbers in debug_getRawBlock, debug_getRawHeader, debug_getRawReceipts
The Hive rpc-compat suite sends decimal strings like "2" (no 0x prefix)
as block parameters and expects a -32602 INVALID_PARAMS error. Besu was
silently accepting these via Long.decode() in BlockParameter, which
accepts both decimal and hex strings.
Add pre-validation in the blockParameter()/blockParameterOrBlockHash()
overrides of each affected method: if the raw parameter is not a named
block tag (earliest/latest/pending/finalized/safe) and does not start
with "0x", throw InvalidJsonRpcParameters(-32602) immediately.
Fixes Hive rpc-compat failures:
debug_getRawBlock/get-invalid-number
debug_getRawHeader/get-invalid-number
debug_getRawReceipts/get-invalid-number
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: use BlockParameterOrBlockHash in debug_getRawBlock and debug_getRawHeader
Switch DebugGetRawBlock and DebugGetRawHeader from AbstractBlockParameterMethod
to AbstractBlockParameterOrBlockHashMethod so they accept block hashes as well
as block numbers, matching the pattern already used by DebugGetRawReceipts.
Move the hex-prefix validation into BlockParameterOrBlockHash itself so it
applies to all methods using that parameter type rather than being duplicated
per method. Update DebugSetHeadTest to pass hex block numbers accordingly.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: remove redundant hex validation from DebugGetRawReceipts
The per-method check in blockParameterOrBlockHash was already superseded
by the validation added to BlockParameterOrBlockHash itself.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* chore: fix spotless formatting and add changelog entry
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: add eth_getProof + debug_getRawTransaction hex validation per maintainer review
- Fix EthGetProofTest: replace decimal block numbers (String.valueOf(500/501))
with hex equivalents ("0x1f4" / "0x1f5") — needed because BlockParameterOrBlockHash
now rejects non-0x-prefixed numbers
- Add 0x prefix check to DebugGetRawTransaction for the transaction hash parameter,
fixing the hive rpc-compat debug_getRawTransaction/get-invalid-hash test failure
- CHANGELOG: add eth_getProof and debug_getRawTransaction to the affected-methods list;
move the block-number-hex note from Upcoming Breaking Changes to Breaking Changes
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: revert DebugGetRawTransaction change and consolidate CHANGELOG
Per maintainer feedback, keep this PR focused on block param hex
validation only. Reverted the 0x prefix check added to
DebugGetRawTransaction and removed the duplicate bug-fixes entry
from CHANGELOG — the breaking change entry already covers it.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* test: derive hex block numbers from blockNumber field in EthGetProofTest
Replace hardcoded "0x1f4" / "0x1f5" with "0x" + Long.toHexString(blockNumber)
and "0x" + Long.toHexString(blockNumber + 1) so the strings stay in sync with
the blockNumber field if it ever changes.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: allow negative hex block params to flow to downstream check
The hex-prefix check in BlockParameterOrBlockHash was rejecting inputs
like "-0x10" upfront with a generic IllegalArgumentException, which
methods mapped to INVALID_BLOCK_PARAMS ("Invalid block param (block
not found)"). The negative-number check already lives downstream in
AbstractBlockParameterOrBlockHashMethod and returns the more accurate
INVALID_BLOCK_NUMBER_PARAMS ("Invalid block number params") — accept
an optional leading minus so that path is reached.
Also update JsonRpcHttpServiceTest.ethGetStorageAtBlockNumber to pass
"0x0" instead of decimal "0" — the new contract is hex-only and this
test was the only remaining decimal usage in the api module.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* remove -0x carve out and update relevant tests
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix: align debug_getRaw* methods with execution-apis BlockNumberOrTag spec
debug_getRawBlock, debug_getRawHeader and debug_getRawReceipts now use
BlockParameter (BlockNumberOrTag) instead of BlockParameterOrBlockHash,
matching the execution-apis spec. Resolves the remaining
debug_getRawReceipts/get-invalid-number hive failure.
CHANGELOG breaking-changes list now explicitly names these three methods
and eth_getProof (which keeps BlockParameterOrBlockHash per its spec).
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* revert: drop DebugGetRawBlock/DebugGetRawHeader changes per maintainer review
Reverts both files to origin/main so this PR stays focused on the
block-parameter hex-prefix validation change.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* review comments
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Avoid blocking txpool save restore callers (#10561)
* Avoid blocking txpool save restore callers
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Add txpool save restore lock tests
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Address txpool save restore review comments
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix engine_newPayload invalid request type invalid status (#10525)
* fix: restore INVALID status for unknown execution request types in engine_newPayload
* changelog: engine_newPayload execution request validation error codes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
perf: cache last validated JWT token in EngineAuthService (#10559)
* perf: cache last validated JWT token in EngineAuthService
Engine API JWT tokens rotate at most once per minute (the CL updates iat
on a 60-second cycle). Under a CL reconnect burst, every engine API call
in that burst carries the same token string, causing repeated Jackson JSON
parsing (ByteQuadsCanonicalizer synchronized lock) and HMAC-SHA256
verification on the Vert.x event loop thread.
Cache the last successfully validated token in an AtomicReference. On a
cache hit (same raw token string), skip straight to the iat freshness
check — no Jackson, no HMAC, no locking. The slow path fires only on
token rotation (~once per minute) or on first call after restart.
The iat freshness check (issuedRecently) is still called on every request
so a cached token is correctly rejected once it goes stale.
Observed symptom: vert.x-eventloop-thread blocked for 15+ seconds in
ByteQuadsCanonicalizer.makeChild during a Prysm reconnect burst, causing
FilterManager timer contention and backward sync throughput collapse.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(discv5): IPv6 ENR auto-discovery via peer consensus (#9874) (#10468)
Add IPv6 address consensus mechanism to DiscV5 peer discovery:
- New NodeRecordManager tracks IPv6 address observations from peers
- New IpV6NewAddressHandler validates and applies consensus IPv6 addresses
- CLI option --ipv6-discovery-enabled (default: false) controls feature
- Updated PeerDiscoveryAgentFactoryV5 to integrate IPv6 consensus flow
Enhances DiscV5 peer discovery to support dual-stack IPv6 networks by
allowing nodes to discover and agree on IPv6 addresses through peer reports
when multiple peers report the same address, improving auto-discovery on
networks without hardcoded IPv6 bootnodes.
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Co-authored-by: Matilda Clerke <matilda.clerke@consensys.net>
Refactor: Extract EVMv2 stack manipulation unit tests (#10535)
* Extract NullaryOperationV2Test - Covers nullary fixed cost operations
* Extract BinaryOperationV2Test - Covers binary fixed cost operations
* Extract TernaryOperationV2Test - Covers MulModOperationV2 but will get used for at least AddMod later
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
eliminate flaky port collision (#10556)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix(at): prevent BftSyncAcceptanceTest port collision under parallel execution
The test used fixed ports derived from node names like "validator1".
When the 3 parameterized cases (ibft2/FULL, qbft/FULL, ibft2/SNAP) run
concurrently, identical names hash to identical ports, causing exit code 2
port-conflict failures on startup.
Prefix node names with testName+syncMode so each parameterized case gets
a distinct hash and therefore distinct fixed ports.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Acceptance Tests: if error creating ports file, make it obvious (#10555)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: use non-zero exit code on disk-full shutdown (#10254)
* fix: use non-zero exit code on disk-full shutdown
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* test: cover non-NoSpace RocksDB IO errors
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* fix: log exception details on disk-full instead of bare message
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
optimize tracePreExecution tracePostExecution (#10541)
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Fix IndexOutOfBoundsException race condition in TransactionBroadcaster (#10482)
* Fix IndexOutOfBoundsException race condition in TransactionBroadcaster
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* test: add regression test for IndexOutOfBoundsException race condition in TransactionBroadcaster
When peerCount() and streamAvailablePeers() are called sequentially, peers can
disconnect between the two calls. This causes numPeersToSendFullTransactions
(calculated from peerCount) to exceed the actual number of peers returned by
streamAvailablePeers(), causing subList() to throw IndexOutOfBoundsException.
The new test reproduces this scenario: peerCount() returns 9 (sqrt = 3 full-tx
peers) but only 2 peers are available when streamAvailablePeers() is called.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Fix spotless formatting
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix: correct off-by-one in debug_accountAt transaction index validation (#10464)
* fix: correct off-by-one in debug_accountAt transaction index validation (#10463)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* docs: add changelog entry for debug_accountAt off-by-one fix
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
perf: parallelize block body DB lookups in engine_getPayloadBodies methods (#10532)
* perf: parallelize block body DB lookups in engine_getPayloadBodies methods
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* added benchmark
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* review: address reviewer comments on engine_getPayloadBodies parallelization
- CHANGELOG: add PR link #10532
- JMH benchmark: remove @Fork(1) annotation (gradle JMH plugin overrides
to 3 forks; annotation was misleading)
- JMH benchmark: update run command to -Pincludes=EngineGetPayloadBodiesParallel
so it doesn't run all benchmarks in the module
* review: add --no-daemon to benchmark run command and document in BENCHMARKING.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Make snap/2 BAL fetching strict (#10542)
* Make BAL-fetching peer task retry on incomplete data
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove IncompleteResultsException
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Require Java 25 to build (#10539)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Prepare snap sync downloader selection for snap/2 (#10545)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Remove optimization to apply BALs before flat db heal (#10538)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Replace Address.hashCache Guava LoadingCache with Caffeine (#10235)
* Replace Address.hashCache Guava LoadingCache with Caffeine
Under heavy miss rate (pre-EIP-150 DoS-era blocks spam BALANCE/EXTCODESIZE
against tens of thousands of pseudo-random addresses per tx) Guava's per-segment
ReentrantLock serialises parallel tx executors on every account-touching EVM
opcode. A thread dump of a stuck import thread on a Bonsai full-sync showed the
thread parked on LocalCache$Segment.storeLoadedValue.
Caffeine's load path is CAS-based (no segment write lock) and already the
in-house cache library used elsewhere in Besu.
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* test: move addressHash correctness tests into existing vm/AddressTest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove unused evm arg from FixedCostOperations (#10533)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Enable NullAway static null-safety analysis for datatypes module (#10394)
* Enable NullAway static null-safety analysis for datatypes module
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
* pin nullaway version centrally in platform/build.gradle
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
---------
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
Add experimental CLI option to advertise snap/2 (#10536)
* Add experimental CLI option to advertise snap/2
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove condition
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Fix tests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: QBFT/IBFT2 legacy RoundChange and Proposal encoding (#10499)
## Problem
QBFT RoundChange and Proposal messages failed to decode against
pre-26.1.0 peers because the BAL (blockAccessList) field was always
included in the RLP encoding even when absent, causing a decode error
on the receiving side.
## Changes
### Core fix
- Encode RoundChange and Proposal without blockAccessList when the field
is absent (null), matching the legacy wire format
- Fix QBFT ProposalPayload signature verification under legacy encoding
### Legacy interop flag
- Add `--Xbft-legacy-protocol-encoding` flag (UnstableBftOptions) to
force legacy encoding for IBFT2/QBFT, enabling interop with
pre-26.1.0 peers
- Rename from earlier `--Xqbft-legacy-roundchange-encoding` and extend
to cover IBFT2 as well
- Rename `BftOptions` → `UnstableBftOptions`, move to
`options/unstable/`, support bare flag form
- Document flag limitation when BAL is present (CHANGELOG + javadoc)
### Refactoring
- Make `useLegacyEncoding` constructors private; expose
`withLegacyEncoding()` factory methods on message wrappers
- Drop legacy constructors; always omit BAL in legacy encoding mode
- Use typed `getArgument` overloads in QBFT codec mocks
### Tests
- ProposalMessageTest and RoundChangeMessageTest for IBFT2
- Extended RoundChangeTest and ProposalTest for QBFT covering legacy
and standard encoding paths
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Co-authored-by: Cedric <53888545+ghostant-1017@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
feat(api): implement eth_baseFee JSON-RPC method (#10457)
* feat(api): implement eth_baseFee JSON-RPC method
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
* chore(changelog): add eth_baseFee entry
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
---------
Signed-off-by: William Morriss <wjmelements@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Decouple snap data requests from `SnapWorldDownloadState` (#10530)
* Replace SnapWorldDownloadState by SnapRangeRequestContext in snap range requests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename SnapRangeRequestContext to SnapRequestContext
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: reject non-hex block numbers in BlockParameter (#10515)
* fix: reject non-hex block numbers in BlockParameter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: detect blob tx violations (missing/mismatched sidecar) (#10510)
* disconnect for invalid blob tx data
* peertask: exit retry loop immediately on MalformedRlpFromPeerException
After disconnecting a peer for malformed RLP, return PEER_DISCONNECTED
instead of INVALID_RESPONSE so the inner retry loop exits without the
1-second sleep. This allows consumedAnnouncements() to run promptly,
freeing the hash for the good peer's fetcher to pick up.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fixup: use fromAnnouncements factory in BufferedGetPooledTransactionsFromPeerFetcher
Completes the refactor from the blob-peer-disconnect-violations fix:
swaps the removed public List<TransactionAnnouncement> constructor for
the new fromAnnouncements() factory method.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: Peer Tracker incorrectly evicts peers pre-validation (#10511)
* stream connected peers
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-0x-prefixed tx hash in debug_getRawTransaction (#10505)
* fix: use Jackson HashDeserializer to enforce 0x prefix on all Hash RPC params
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge PivotSyncDownloader with SnapSyncDownloader (#10528)
* Merge PivotSyncDownloader with SnapSyncDownloader
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Further cleanup
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Simplify wiring bidirectional references between state and chain downloader (#10529)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix unavailable BAL handling in snap (#10519)
* Fix unavailable BAL handling in snap
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add tests for snap.GetBlockAccessListsFromPeerTask
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Enable NullAway for metrics core (#10453)
* Enable NullAway for metrics core
* Remove unused Jakarta NotNull annotations
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
---------
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths (#10527)
* perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths
* nit: rename INSTANCE to WITHOUT_STACKTRACE for clarity
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless CancellationException in AbstractEthTask (#10526)
executeSubTask() is called by every eth task subclass whenever a sub-task
is dispatched. When the parent task has already been cancelled, it previously
allocated a fresh CancellationException — capturing a full JVM stack trace —
on every call. At high task-cancellation rates (sync, peer churn, shutdown)
this adds unnecessary allocation pressure and CPU overhead from the native
stack-walk.
Replace with a stackless singleton following the same pattern as the
RlpxAgent peer-gate fix (besu-eth/besu#10510) and Netty's
StacklessClosedChannelException.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
use stackless singleton for peer-gate rejection in RlpxAgent (#10523)
Allocating a fresh RuntimeException with full stack trace on every
outbound peer-gate rejection causes measurable GC pressure at high
connection-attempt rates (observed ~1.5 throws/sec during chain-head
stalls, per JFR in besu-eth/besu#10498).
Replace the per-call allocation with a stackless singleton sentinel,
following the same pattern as Netty's StacklessClosedChannelException.
The LOG.trace call is updated to use parameterised formatting to avoid
string concatenation when trace logging is disabled.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
testing_buildBlockV1: exclude null fields from result (#10492)
* exclude fields from block building result when they are null
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Consider maxFeePerBlobGas when sorting tx in the layered txpool (#10513)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix(jsonrpc): eth_capabilities state/stateproofs disabled detection (#10377)
Check genesis world state availability via WorldStateArchive.isWorldStateAvailable().
If genesis state is not available (e.g. SNAP sync nodes using Bonsai), state
and stateproofs now correctly report disabled=true.
Fixes #10371
Signed-off-by: Arshdeep Singh <arshdeep.ssingh777@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Rename EthashConfigOptions to FixedDifficultyConfigOptions (#10507)
* Rename EthashConfigOptions to FixedDifficultyConfigOptions
* Support fixeddifficulty as a genesis config key alias for ethash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
testing_buildBlockV1 - error if tx provided but not applied (#10486)
* when transactions are explicitly provided, return an error if any were not applied
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* deterministic ordering
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: `miner_changeTargetGasLimit` silently ignores valid gas limit on PoW/BFT networks (#10460)
* fix: apply target gas limit in AbstractMinerExecutor.changeTargetGasLimit
The changeTargetGasLimit method in AbstractMinerExecutor contained an
empty if-block that validated the input but never applied the new gas
limit to miningConfiguration. This caused miner_changeTargetGasLimit
RPC calls to silently succeed without actually updating the target gas
limit on PoW and BFT networks.
Add the missing miningConfiguration.setTargetGasLimit(newTargetGasLimit)
call to ensure the target gas limit is properly updated.
Add AbstractMinerExecutorTest with regression tests to verify the gas
limit is correctly persisted to MiningConfiguration after calling
changeTargetGasLimit.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Update copyright notice in AbstractMinerExecutorTest.java
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
feat: Add cross-block code caching for improved performance (#10390)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix LayeredKeyValueStorage.isClosed() duplicated execution (#10508)
* Fix LayeredKeyValueStorage.isClosed() O(N) recursion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Lazy RLP decoding for GetReceiptsMessage (#10450)
* GetReceiptsMessage lazy decoding
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
fix flaky test on BalStateRootCommitterFactoryTest (#10500)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
refactor: replace eager string concatenation with SLF4J parameterized logging (#10352)
* refactor: replace eager string concatenation (#10329)
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Add txsSelectionHighScore metric for per-included-tx selection time (#10265)
* Add txsSelectionHighScore metric for per-included-tx selection time
Expose, alongside the existing txs…
fab-10
added a commit
to fab-10/besu
that referenced
this pull request
Jun 25, 2026
Share ExecutionPayload structures across getPayload and newPayload versions.
Move Besu JSON serializers and deserializers into reusable core Jackson codecs.
Add JSON-RPC mapper factory and wire response/parameter serialization to the Besu module.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix issues surfaced by Hive tests
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove trace log that causes issues
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix rebase
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Refactor of EngineNewPayloadV4Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Refactor of EngineNewPayloadV4Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Merge EngineNewPayloadV3ValidationTest into EngineNewPayloadV3Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fixes following the refactor of EngineNewPayloadV3Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fixes following the refactor of EngineNewPayloadV2Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fixes following the refactor of EngineNewPayloadV1Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
First pass of refactor newPayload code complete
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Reorg and document newPayloadV1
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts:
# ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV1.java
WIP: engine_newPayload refactor in progress
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Rename FcU result data structures to follow the spec
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove unrelated changes
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix rebase
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Move new implementation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Add support for fail on unknown JSON properties unless are null
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove previous engine_forkchoiceUpdated implementation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Apply suggestions from code review
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
engine_forkchoiceUpdated refactor
Refactor the engine_forkchoiceUpdated V1-V4 hierarchy into a sealed,
version-scheduled implementation under
ethereum.api.jsonrpc.internal.methods.engine.forkchoiceupdated, driven
by a small VersionScheduler that maps each method version to its active
hard-fork range. Introduces typed payload-attribute and forkchoice-state
parameter classes (PayloadAttributesV1-V4, ForkchoiceStateV1) and
adjusts the merge block-creation layer (PayloadIdentifier,
MergeCoordinator, TransitionCoordinator, PreparePayloadArgsBuilder)
accordingly.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
# ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonRpcParameter.java
align block number position in log lines (#10632)
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
Co-authored-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods (#10662)
* feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods
* chore(pow-removal): remove remote sealer / PoW job constants from MiningConfiguration.Unstable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: skip DNSDaemon when --discovery-dns-url is blank or empty (#10666)
Signed-off-by: Usman Saleem <usman@usmans.info>
lazy GetStorageRangeMessage (#10660)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
feat(pow-removal): Phase 1 - remove PoW mining infrastructure (#10656)
* feat(pow-removal): Phase 1 - remove PoW mining infrastructure
Delete all PoW-specific mining code: PoWBlockCreator, PoWBlockMiner,
PoWMinerExecutor, PoWMiningCoordinator, AbstractMinerExecutor,
AbstractMiningCoordinator, IncrementingNonceGenerator, RandomNonceGenerator,
PoWSolver, PoWSolverInputs, PoWObserver.
* fix: pass miningConfiguration to NoopMiningCoordinator in MainnetBesuControllerBuilder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - downloaded storage range tracker (#10609)
* Add storage range tracker
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track all downloaded storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Registrer full range for accounts with empty storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add RangeManager tests asserting starts of generated ranges are increasing
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add test that generated ranges start with min
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
pathbased package refactoring (#10641)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
lazy decoding of GetByteCodeMessage (#10652)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
uprev web3j to 5.0.3 (#10627)
* uprev web3j and add dependency links in acceptance-tests gradle files
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: initialize profilers list before adding gc in jmh config (#10651)
-PgcProfiler=true silently did nothing when -PasyncProfiler was not also
provided
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
upgrade license report plugin (#10650)
* upgrade license report plugin
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory (#10524)
* perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory
Replaces the per-request 100-block scan in eth_gasPrice / eth_maxPriorityFeePerGas
with a per-head FeeOracleSnapshot computed off the block-import thread (when an
EthScheduler is available) and cached by chain-head hash. A cold path on the request
side self-heals: the first caller after a head change computes inline and seeds the
snapshot for subsequent callers. Bounds (miner_setMinGasPrice /
miner_setMinPriorityFee) are still applied at read time against the live mining
config, so configuration changes take effect immediately and never get baked into
a stale snapshot.
eth_feeHistory gains a result cache for "latest" requests, keyed on
(headHash, blockCount, sortedPercentiles, RewardBounds snapshot, nextBlockHardforkId).
Historic-block queries bypass the cache. The pre-existing per-block reward cache now
stores unbounded rewards; request-specific bounding is applied per-call with a
mining-config snapshot taken at request entry. Other targeted wins:
- getBlobBaseFees reuses the previous header instead of issuing one parent-hash
RocksDB read per block (saves up to 255 reads per feeHistory-256 request).
- getNextBaseFee / getNextBlobFee skip the chainHead+1 storage lookup when the
block can't exist (the "latest" case).
- getBlockHeaders uses the bulk Blockchain.getBlockHeaders(start, count) API, which
walks parent hashes from the in-memory header cache.
- Rewards loop is sequential again (fork-join split overhead dominated cache-hit
cases for big ranges).
- TransactionInfo no longer carries the Transaction reference.
DefaultBlockchain.getBlockBody / getTxReceipts now populate the in-memory cache on
read miss (matching the existing getBlockHeader(Hash) pattern). Refactors the three
populate-on-miss accessors into a single getCached<T> helper. Without this fix the
--cache-last-blocks cache only ever held blocks imported since startup, making it
useless for fee-oracle scans of pre-existing chain history.
Tests updated to mock the new access pattern (getBlockHeaders + getBlockBody by
hash). New test latestResultCacheMissesWhenNextBlockHardforkChanges pins the
HardforkId component of the cache key.
Measured on Hoodi via json-bench (k6, 20 RPS x 30s, post-restart, fresh JIT):
test baseline p95 fork p95 speedup
eth_gasPrice 11.64 ms 3.18 ms 3.66x
eth_maxPriorityFeePerGas 10.34 ms 3.21 ms 3.22x
eth_feeHistory (256 blocks) 12.72 ms 5.50 ms 2.31x
eth_feeHistory (5 blocks) 4.74 ms 3.58 ms 1.32x (HTTP/JSON floor)
hive rpc-compat: identical 22 pre-existing failures on both images (zero
regressions); eth_feeHistory/fee-history passes on both. eth_gasPrice and
eth_maxPriorityFeePerGas have no execution-apis fixtures; behavioural coverage is
in the updated unit tests.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: chain-time fork resolution, memory-bound fee caches, explicit receipts check
- Resolve next-block protocol specs from the chain head timestamp instead
of System.currentTimeMillis() in EthFeeHistory and BlockchainQueries
(gasPrice, gasPriceLowerBound, getNextBlockBaseFee, blob-fee fallback):
the wall clock is not a trusted time source and its millisecond scale
would resolve future timestamp-scheduled forks as already active.
- Rename the per-block reward cache (perBlockRewardsCache) and bound both
EthFeeHistory caches by approximate bytes with MemoryBoundCache weighers
(key + value) instead of entry counts.
- Replace the implicit ArrayIndexOutOfBoundsException on a receipts/body
count mismatch with an explicit Preconditions.checkState and add a
regression test.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: fix BlockchainQueriesLogCacheTest, trim verbose comments
- BlockchainQueriesLogCacheTest: clear the construction-time fee-oracle
observer registration so per-test verifyNoMoreInteractions checks only
the log-cache query calls.
- Condense verbose comments across EthFeeHistory and BlockchainQueries to
one line of rationale where non-obvious; drop narration of self-evident code.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Remove unnecessary comments that restate the code
Drop PR-added comments that narrated what the code already says (cache
field/weigher descriptions, a redundant cache-policy note, a self-evident
delegating-method doc); keep only one-line rationale for non-obvious cases.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Defer reward percentile sort until after cache-key path
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* move rewards.filter after isPresent check and resolve return cached emptyList
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Luis Pinto <luis.pinto@consensys.net>
Fix SnapWorldStateDownloader losing active downloadState reference (#10349)
`run()` built a new `SnapWorldDownloadState` but never stored it on `this.downloadState`, so the reentrant guard, `cancel()`, and the inflight/progress gauges all saw `null`. Store the new state on the `AtomicReference` right after construction so those paths observe the live download.
Signed-off-by: Dee <DeeADouble@proton.me>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Add behaviour change notice for rpc-tx-feecap (#10640)
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
changelog rotation for 26.6.1 (#10637)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Thread startKeyHash through v2 snap range probing
Follow-up to #10634 (review by macfarla).
- SnapV2AccountRangeRequest and SnapV2StorageRangeRequest now pass the
explicit startKeyHash to findNewBeginElementInRange, matching their v1
counterparts. Previously the empty-receivedKeys case probed from
MIN_RANGE instead of the actual range start.
- Add a Create2Operation regression test mirroring the CreateOperation
one, covering the EIP-3860 oversized-initcode early abort so the shared
getInputSize stack-index contract is exercised for the CREATE2 layout.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
revert log level change back to error (#10626)
* revert log level change back to error
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(engine): return SYNCING when parent world state is not immediately cached (#10600)
* fix(engine): return SYNCING when parent world state is not immediately cached
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
optimizations, refactorings, and improved test coverage (#10634)
* evm: drop dead try/catch in Memory.calculateNewActiveWords
Words.clampedAdd is total — it saturates rather than throwing — so
the ArithmeticException branch was unreachable. Compute the saturated
byte size directly and short-circuit to the gas-overflow sentinel
when it exceeds MAX_BYTES, which is what the catch arm was trying to
express. No behaviour change on the supported range; downstream
gas accounting in memoryCost() clamps to Long.MAX_VALUE as before.
Signed-off-by: jflo <justin+github@florentine.us>
* evm: evaluate EIP-3860 initcode-size limit before initcode resolution
The CREATE/CREATE2 size check currently runs after the initcode has
been resolved from memory and before state gas is charged. Per
EIP-3860 the limit is an early exceptional abort, so checking the
stack-declared size first keeps the abort cheap and side-effect-free:
the operation no longer expands memory based on an unvalidated
length, and the ordering aligns with the regular-gas / state-gas
separation introduced in this branch.
Adds a covering test that pushes an out-of-range size and asserts
the operation halts with CODE_TOO_LARGE without growing memory.
Signed-off-by: jflo <justin+github@florentine.us>
* Validate RLPx frame size lower bound in deframer
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* Probe full snap range for omitted in-range leaves
findNewBeginElementInRange previously short-circuited when the responder
returned no keys, leaving the caller to assume the requested range was
fully covered. Plumb the request's start hash through the helper and
probe from that origin instead, so an empty-keys response that should
have included data still surfaces a follow-up request.
The probe also relies on visitAll throwing when an in-range node is
missing. That signal is absent when a responder supplies enough proof
nodes to make every leaf reachable through the InnerNodeDiscoveryManager
— the walk completes cleanly even though most leaves were not echoed
back in the keys map. Iterate the inner-node registry afterwards and
surface the lowest in-range leaf that the responder did not include, so
the caller schedules the follow-up fetch.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Agentic PR guidance for Contributors (#10414)
* hoooooo boy those links are borked, probably forever
Signed-off-by: jflo <justin+github@florentine.us>
* Apply suggestion from @macfarla
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
snap/2 - invalid range proof handling (#10598)
* Handle invalid range proofs
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address code review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
remove not trusted root computation (#10622)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
remove bal size check between transaction (#10621)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
snap/2 - fix BAL retry handling for partial responses (#10593)
* Fix GetBlockAccessLists retry mechanism
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename test helper class
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix BFT invalid block production with `prevrandao` (#10611)
* Recreate for issue with PREVRANDAO op code and QBFT consensus
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Lint
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Fix compilation errors
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix prevrandao on BFT block creation
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add a test for IBFT2
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Chain height assertion is relative, not absolute
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update the changelog
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix copyright wording
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Tidy up test comments
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update existing unit test to check mix hash
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Update the BFT soak test to include upgrading to `Osaka` (#10607)
* Update the BFT soak test from shanghai to osaka
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove hard-coded contract address
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix incorrect test assertion
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Ensure shanghai and osaka upgrades are done individually
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Make sure assertions are less brittle
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove extraneous line
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove unnecessary fork additions to genesis file for Osaka upgrade
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix for Bonsai Archive from PR 10503
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Don't have both shanghai and osaka tasks download solc
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/pathbased/bonsai/storage/BonsaiArchiveWorldStateLayerStorage.java
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update acceptance-tests/tests/osaka/osakacontracts/SimpleStorageOsaka.sol
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add comments to build and test files
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(discv5): lower verbose logs to trace (#10566)
Signed-off-by: sueun-dev <57546981+sueun-dev@users.noreply.github.com>
Co-authored-by: Usman Saleem <usman@usmans.info>
Enable DiscV5 by default in acceptance tests and fix cluster harness (#10619)
The BootNodesGenesisSetupTest was silently broken: it used the V4 genesis
key ("bootnodes") while DiscV5 was the default, so the genesis bootnode
config was never exercised. The harness wired peers independently, making
it pass regardless of the config under test.
Acceptance test DSL:
- ProcessBesuNodeRunner: emit --Xv5-discovery-enabled when discoveryV5Enabled=true,
fixing a long-standing gap where BesuNodeConfigurationBuilder.discoveryV5Enabled()
was silently ignored in process mode
- AdminNodeInfoTransaction: new Transaction<Map<String,Object>> backed by
admin_nodeInfo RPC, returning the full result map (enr, enode, id, etc.)
- AdminRequestFactory / AdminTransactions / AdminConditions: expose nodeInfo()
- BesuNode: add helpers to fetch ENR/enode from admin_nodeInfo at runtime
- Cluster: enable DiscV5 by default; close cluster in teardown
- NodeConfiguration: add discoveryV5Enabled flag (explicit per-node control)
BootNodesGenesisSetupTest: replace the broken test with two scoped tests:
- shouldConnectNodesViaV4EnodeBootnodesInGenesis: disables DiscV5, uses
"bootnodes" genesis key with enode:// URIs, asserts peer identity via
admin.hasPeer() not just count
- shouldConnectNodesViaV5EnrBootnodesInGenesis: uses "v5bootnodes" genesis
key with a real ENR fetched from admin_nodeInfo at runtime; both tests
use awaitPeerDiscovery=false so the harness does not wire peers
Other fixes:
- Disable DiscV5 for secp256r1 nodes in acceptance tests (unsupported)
- Fix cluster harness breaking auth-enabled nodes via admin_nodeInfo call
- Fix London fork timing regression in ExtendTransactionValidatorPluginTest
Fixes #9689
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Optmize memory usage of the bal parallel execution (#10606)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix chain height (#10608)
* drive SyncState bestChainHeight from engine_newPayload in PoS
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Demote closed channel exception log level (#10616)
* Demote ClosedChannelException log level to DEBUG
* Use supplier lambda in atTrace to avoid eager requestBodyAsJson evaluation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix isSyncing() during full sync on post-merge networks (#10613)
* Fix isSyncing() incorrectly returning false during full sync on post-merge networks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - pivot catch-up lifecycle management (#10590)
* BAL-based pivot catch-up lifecycle management
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs after headers, remove unused method
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs in a separate stage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Update discovery v5 library to 26.6.0 (#10612)
* Update discovery v5 library to 26.6.0
-- Fixes handshake resend
-- hive tests
Signed-off-by: Usman Saleem <usman@usmans.info>
* Update CHANGELOG entry for DiscV5 library update
Signed-off-by: Usman Saleem <usman@usmans.info>
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Fix WS TLS support in acceptance DSL (#10432)
* Fix WS TLS support in acceptance DSL
WS URLs now switch to / when is true, and forwards the matching flags (keystore/truststore, PEM, password or password-file, client auth) to the spawned node. Adds / accessors so the runner can pass the configured path through.
Signed-off-by: Dee <DeeADouble@proton.me>
* Trust self-signed certs in acceptance DSL ws/https clientsThe previous commit only addressed the server side. The DSL's
WebSocketClient (used both for the endpoint probe and the live RPC
service) and the login OkHttpClient were still plain TCP, so any wss://
or https:// hop silently failed the TLS handshake before the request
left the test. This wires both clients through a trust-all
SSLSocketFactory whenever ws-ssl is enabled, scoped to the acceptance
tests via a package-private helper.
Signed-off-by: Dee <DeeADouble@proton.me>
* Cover WS TLS DSL client flows
Disable endpoint identification for the acceptance-test WebSocket client
when using the insecure TLS helper, matching the existing trust-all
behavior for self-signed test certificates.
Add acceptance coverage for WS TLS with JKS inline passwords, JKS
password files, PEM key/cert configuration, and client auth with JKS and
PEM trust material.
Signed-off-by: Dee <DeeADouble@proton.me>
* Format WS TLS acceptance test
Signed-off-by: Dee <DeeADouble@proton.me>
* formatting and copyright header
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Dee <DeeADouble@proton.me>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Check the bad block manager when receiving a new block from the network (#10212)
* check the bad block manager when receiving a new block from the network. This allows to mark a whole fork invalid and signaling this to the CL at the next fcu
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level, improved comments in tests
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level to debug for not important events
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* addressed pr comments
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* make tests stricter
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
---------
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
snap/2 - track downloaded ranges (#10579)
* Add tracking of downloaded ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Iterate over children only once in SnapV2PersistDataStep
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Fix/eth capabilities oldest block when state is enabled (#10597)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Revert release process changes (#10604)
* Revert "feat(publish-release): add workflow_dispatch trigger, gated via environment (#10491)"
This reverts commit c8ca8a029a7feef70a10fc82afd97d6317aebdfd.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "fix(publish-release): keep gh release download in workspace cwd (#10490)"
This reverts commit be72aa2ae9fca47dfe5a00abf5d8117d01f4c972.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "proposed adjustments to release process (#10411)"
This reverts commit f027e9a7a99a2b91976e604e533517a64a836045.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "Gate final-version docker tags on release publish, not draft (#10306)"
This reverts commit f3e26cf2def9dd530fb0acf2014c3e25a15dbe59.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Reapply java 21 -> 25 lost in revert
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
downgrade duplicate engine api timeout log to debug (#10595)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
chore: tidy up some references to java 21 (#10596)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Enrich `/readiness` health endpoint with diagnostic details (#10412)
* Enrich /readiness health endpoint with diagnostic details (#10400)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Defensive copy for HealthCheckResult and add error field for invalid params
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Remove redundant isHealthy from HealthCheck interface
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Default omitted block parameter to latest on eth state methods (#10587)
* Default omitted block parameter to latest on eth state methods
eth_getBalance, eth_getCode, eth_getStorageAt, eth_getTransactionCount,
eth_getProof and eth_getStorageValues read the block parameter with
getRequiredParameter, so omitting it returned -32602 'Invalid block
param (block not found)'. Read it with getOptionalParameter and default
to BlockParameterOrBlockHash.LATEST when absent, per execution-apis
(Block required:false, default 'latest'). Adds a LATEST constant to
BlockParameterOrBlockHash.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: eth_getProof defaults to latest when block omitted
Replace errorWhenNoBlockNumberSupplied (which asserted the old
throw-on-missing behavior) with a test asserting an omitted block now
resolves to latest, matching the other state methods and the spec.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: assert latest response is success before casting in getProof default-block test
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Centralize optional-block defaulting and build LATEST without JSON parsing
Address review feedback (fab-10): move the 'optional block param, default
latest' logic into a shared blockParameterOrBlockHashWithLatestDefault helper on
AbstractBlockParameterOrBlockHashMethod, and have the six state methods delegate
to it with their param index. Build BlockParameterOrBlockHash.LATEST via a
private field-setting constructor instead of routing the constant through the
JSON-parsing constructor.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Add CHANGELOG entry for optional block parameter on eth state methods
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Move CHANGELOG entry to Unreleased section
Updated breaking changes and upcoming changes in the changelog to reflect new RPC compatibility and deprecations.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking (#10354)
* Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking
Resolves #10336. The JSON-RPC response serialization and streaming can block when the websocket write queue is full. Moving this logic to executeBlocking prevents slow clients from exhausting Vert.x event loop threads.
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* false for ordering to match HTTP JSON RPC
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: daniellehrner <daniel.lehrner@consensys.net>
Create snap/2-specific request classes and pipeline steps (#10560)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
chore: rotate changelog for 26.6.0 release (#10591)
* chore: rotate changelog for 26.6.0 release
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix PluginVerifier catalog not found when running from IntelliJ (#10585)
* copyArtifactsCatalogToResources task
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Add new payload listener (#10570)
* add NewPayloadListener for engine_newPayload events
Mirrors the existing UnverifiedForkchoiceListener pattern so other components
can observe headers delivered by the consensus layer without coupling to the
JSON-RPC layer. The listener fires for every engine_newPayload request after
the block hash has been verified against the payload contents, but before the
"syncing" early-return — so listeners receive headers even while the node is
snap-syncing.
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Add static-pivot snap/2 world state download skeleton (#10548)
* SnapV2 skeleton for static pivot
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track downloaded account ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Merge `PivotSyncState` into `SnapSyncProcessState` (#10549)
* Merge PivotSyncState with SnapSyncProcessState
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove mutable EMPTY_SYNC_STATE, make setCurrentHeader package-private
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Disallow empty change set for storage slot (#10582)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Integrate NullAway for nullability checks in ethstats package (#10520)
* feat: apply NullAway to ethstats module
* test: fix NullAway violations in ethstats test code
* test(ethstats): align successful AsyncResult cause() with Vert.x contract
* test(ethstats): add guard-path tests for sendBlockReport preconditions
Signed-off-by: mykim <kimminyong2034@gmail.com>
---------
Signed-off-by: mykim <kimminyong2034@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
kurtosis nightly task: pin ethereum-package (#10583)
* pin ethereum-package
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* full sha
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
nightly kurtosis interop assertoor test (#10569)
* nightly kurtosis interop assertoor test
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
add eth_getTransactionBySenderAndNonce RPC (#10501)
* storage index
* Add eth_getTransactionBySenderAndNonce RPC method
* Check transaction pool before index in eth_getTransactionBySenderAndNonce
* Add tx-sender-nonce-index-enabled to everything_config.toml test fixture
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Use `develop` tag name instead versioned (#10576)
ci: extract reusable docker.yml and migrate develop.yml to GHA (#10366)
* ci: extract reusable docker.yml and migrate develop.yml to GHA
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
* Apply suggestion from @joshuafernandes
equivalent and simpler
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Fix typo
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Fixed - logging cleanup for invalid blocks #10160 (#10180)
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-hex block numbers in debug_getRawReceipts, and eth_getProof (#10240)
* fix: reject non-hex block numbers in debug_getRawBlock, debug_getRawHeader, debug_getRawReceipts
The Hive rpc-compat suite sends decimal strings like "2" (no 0x prefix)
as block parameters and expects a -32602 INVALID_PARAMS error. Besu was
silently accepting these via Long.decode() in BlockParameter, which
accepts both decimal and hex strings.
Add pre-validation in the blockParameter()/blockParameterOrBlockHash()
overrides of each affected method: if the raw parameter is not a named
block tag (earliest/latest/pending/finalized/safe) and does not start
with "0x", throw InvalidJsonRpcParameters(-32602) immediately.
Fixes Hive rpc-compat failures:
debug_getRawBlock/get-invalid-number
debug_getRawHeader/get-invalid-number
debug_getRawReceipts/get-invalid-number
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: use BlockParameterOrBlockHash in debug_getRawBlock and debug_getRawHeader
Switch DebugGetRawBlock and DebugGetRawHeader from AbstractBlockParameterMethod
to AbstractBlockParameterOrBlockHashMethod so they accept block hashes as well
as block numbers, matching the pattern already used by DebugGetRawReceipts.
Move the hex-prefix validation into BlockParameterOrBlockHash itself so it
applies to all methods using that parameter type rather than being duplicated
per method. Update DebugSetHeadTest to pass hex block numbers accordingly.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: remove redundant hex validation from DebugGetRawReceipts
The per-method check in blockParameterOrBlockHash was already superseded
by the validation added to BlockParameterOrBlockHash itself.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* chore: fix spotless formatting and add changelog entry
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: add eth_getProof + debug_getRawTransaction hex validation per maintainer review
- Fix EthGetProofTest: replace decimal block numbers (String.valueOf(500/501))
with hex equivalents ("0x1f4" / "0x1f5") — needed because BlockParameterOrBlockHash
now rejects non-0x-prefixed numbers
- Add 0x prefix check to DebugGetRawTransaction for the transaction hash parameter,
fixing the hive rpc-compat debug_getRawTransaction/get-invalid-hash test failure
- CHANGELOG: add eth_getProof and debug_getRawTransaction to the affected-methods list;
move the block-number-hex note from Upcoming Breaking Changes to Breaking Changes
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: revert DebugGetRawTransaction change and consolidate CHANGELOG
Per maintainer feedback, keep this PR focused on block param hex
validation only. Reverted the 0x prefix check added to
DebugGetRawTransaction and removed the duplicate bug-fixes entry
from CHANGELOG — the breaking change entry already covers it.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* test: derive hex block numbers from blockNumber field in EthGetProofTest
Replace hardcoded "0x1f4" / "0x1f5" with "0x" + Long.toHexString(blockNumber)
and "0x" + Long.toHexString(blockNumber + 1) so the strings stay in sync with
the blockNumber field if it ever changes.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: allow negative hex block params to flow to downstream check
The hex-prefix check in BlockParameterOrBlockHash was rejecting inputs
like "-0x10" upfront with a generic IllegalArgumentException, which
methods mapped to INVALID_BLOCK_PARAMS ("Invalid block param (block
not found)"). The negative-number check already lives downstream in
AbstractBlockParameterOrBlockHashMethod and returns the more accurate
INVALID_BLOCK_NUMBER_PARAMS ("Invalid block number params") — accept
an optional leading minus so that path is reached.
Also update JsonRpcHttpServiceTest.ethGetStorageAtBlockNumber to pass
"0x0" instead of decimal "0" — the new contract is hex-only and this
test was the only remaining decimal usage in the api module.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* remove -0x carve out and update relevant tests
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix: align debug_getRaw* methods with execution-apis BlockNumberOrTag spec
debug_getRawBlock, debug_getRawHeader and debug_getRawReceipts now use
BlockParameter (BlockNumberOrTag) instead of BlockParameterOrBlockHash,
matching the execution-apis spec. Resolves the remaining
debug_getRawReceipts/get-invalid-number hive failure.
CHANGELOG breaking-changes list now explicitly names these three methods
and eth_getProof (which keeps BlockParameterOrBlockHash per its spec).
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* revert: drop DebugGetRawBlock/DebugGetRawHeader changes per maintainer review
Reverts both files to origin/main so this PR stays focused on the
block-parameter hex-prefix validation change.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* review comments
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Avoid blocking txpool save restore callers (#10561)
* Avoid blocking txpool save restore callers
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Add txpool save restore lock tests
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Address txpool save restore review comments
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix engine_newPayload invalid request type invalid status (#10525)
* fix: restore INVALID status for unknown execution request types in engine_newPayload
* changelog: engine_newPayload execution request validation error codes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
perf: cache last validated JWT token in EngineAuthService (#10559)
* perf: cache last validated JWT token in EngineAuthService
Engine API JWT tokens rotate at most once per minute (the CL updates iat
on a 60-second cycle). Under a CL reconnect burst, every engine API call
in that burst carries the same token string, causing repeated Jackson JSON
parsing (ByteQuadsCanonicalizer synchronized lock) and HMAC-SHA256
verification on the Vert.x event loop thread.
Cache the last successfully validated token in an AtomicReference. On a
cache hit (same raw token string), skip straight to the iat freshness
check — no Jackson, no HMAC, no locking. The slow path fires only on
token rotation (~once per minute) or on first call after restart.
The iat freshness check (issuedRecently) is still called on every request
so a cached token is correctly rejected once it goes stale.
Observed symptom: vert.x-eventloop-thread blocked for 15+ seconds in
ByteQuadsCanonicalizer.makeChild during a Prysm reconnect burst, causing
FilterManager timer contention and backward sync throughput collapse.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(discv5): IPv6 ENR auto-discovery via peer consensus (#9874) (#10468)
Add IPv6 address consensus mechanism to DiscV5 peer discovery:
- New NodeRecordManager tracks IPv6 address observations from peers
- New IpV6NewAddressHandler validates and applies consensus IPv6 addresses
- CLI option --ipv6-discovery-enabled (default: false) controls feature
- Updated PeerDiscoveryAgentFactoryV5 to integrate IPv6 consensus flow
Enhances DiscV5 peer discovery to support dual-stack IPv6 networks by
allowing nodes to discover and agree on IPv6 addresses through peer reports
when multiple peers report the same address, improving auto-discovery on
networks without hardcoded IPv6 bootnodes.
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Co-authored-by: Matilda Clerke <matilda.clerke@consensys.net>
Refactor: Extract EVMv2 stack manipulation unit tests (#10535)
* Extract NullaryOperationV2Test - Covers nullary fixed cost operations
* Extract BinaryOperationV2Test - Covers binary fixed cost operations
* Extract TernaryOperationV2Test - Covers MulModOperationV2 but will get used for at least AddMod later
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
eliminate flaky port collision (#10556)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix(at): prevent BftSyncAcceptanceTest port collision under parallel execution
The test used fixed ports derived from node names like "validator1".
When the 3 parameterized cases (ibft2/FULL, qbft/FULL, ibft2/SNAP) run
concurrently, identical names hash to identical ports, causing exit code 2
port-conflict failures on startup.
Prefix node names with testName+syncMode so each parameterized case gets
a distinct hash and therefore distinct fixed ports.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Acceptance Tests: if error creating ports file, make it obvious (#10555)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: use non-zero exit code on disk-full shutdown (#10254)
* fix: use non-zero exit code on disk-full shutdown
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* test: cover non-NoSpace RocksDB IO errors
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* fix: log exception details on disk-full instead of bare message
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
optimize tracePreExecution tracePostExecution (#10541)
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Fix IndexOutOfBoundsException race condition in TransactionBroadcaster (#10482)
* Fix IndexOutOfBoundsException race condition in TransactionBroadcaster
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* test: add regression test for IndexOutOfBoundsException race condition in TransactionBroadcaster
When peerCount() and streamAvailablePeers() are called sequentially, peers can
disconnect between the two calls. This causes numPeersToSendFullTransactions
(calculated from peerCount) to exceed the actual number of peers returned by
streamAvailablePeers(), causing subList() to throw IndexOutOfBoundsException.
The new test reproduces this scenario: peerCount() returns 9 (sqrt = 3 full-tx
peers) but only 2 peers are available when streamAvailablePeers() is called.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Fix spotless formatting
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix: correct off-by-one in debug_accountAt transaction index validation (#10464)
* fix: correct off-by-one in debug_accountAt transaction index validation (#10463)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* docs: add changelog entry for debug_accountAt off-by-one fix
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
perf: parallelize block body DB lookups in engine_getPayloadBodies methods (#10532)
* perf: parallelize block body DB lookups in engine_getPayloadBodies methods
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* added benchmark
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* review: address reviewer comments on engine_getPayloadBodies parallelization
- CHANGELOG: add PR link #10532
- JMH benchmark: remove @Fork(1) annotation (gradle JMH plugin overrides
to 3 forks; annotation was misleading)
- JMH benchmark: update run command to -Pincludes=EngineGetPayloadBodiesParallel
so it doesn't run all benchmarks in the module
* review: add --no-daemon to benchmark run command and document in BENCHMARKING.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Make snap/2 BAL fetching strict (#10542)
* Make BAL-fetching peer task retry on incomplete data
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove IncompleteResultsException
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Require Java 25 to build (#10539)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Prepare snap sync downloader selection for snap/2 (#10545)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Remove optimization to apply BALs before flat db heal (#10538)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Replace Address.hashCache Guava LoadingCache with Caffeine (#10235)
* Replace Address.hashCache Guava LoadingCache with Caffeine
Under heavy miss rate (pre-EIP-150 DoS-era blocks spam BALANCE/EXTCODESIZE
against tens of thousands of pseudo-random addresses per tx) Guava's per-segment
ReentrantLock serialises parallel tx executors on every account-touching EVM
opcode. A thread dump of a stuck import thread on a Bonsai full-sync showed the
thread parked on LocalCache$Segment.storeLoadedValue.
Caffeine's load path is CAS-based (no segment write lock) and already the
in-house cache library used elsewhere in Besu.
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* test: move addressHash correctness tests into existing vm/AddressTest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove unused evm arg from FixedCostOperations (#10533)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Enable NullAway static null-safety analysis for datatypes module (#10394)
* Enable NullAway static null-safety analysis for datatypes module
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
* pin nullaway version centrally in platform/build.gradle
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
---------
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
Add experimental CLI option to advertise snap/2 (#10536)
* Add experimental CLI option to advertise snap/2
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove condition
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Fix tests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: QBFT/IBFT2 legacy RoundChange and Proposal encoding (#10499)
## Problem
QBFT RoundChange and Proposal messages failed to decode against
pre-26.1.0 peers because the BAL (blockAccessList) field was always
included in the RLP encoding even when absent, causing a decode error
on the receiving side.
## Changes
### Core fix
- Encode RoundChange and Proposal without blockAccessList when the field
is absent (null), matching the legacy wire format
- Fix QBFT ProposalPayload signature verification under legacy encoding
### Legacy interop flag
- Add `--Xbft-legacy-protocol-encoding` flag (UnstableBftOptions) to
force legacy encoding for IBFT2/QBFT, enabling interop with
pre-26.1.0 peers
- Rename from earlier `--Xqbft-legacy-roundchange-encoding` and extend
to cover IBFT2 as well
- Rename `BftOptions` → `UnstableBftOptions`, move to
`options/unstable/`, support bare flag form
- Document flag limitation when BAL is present (CHANGELOG + javadoc)
### Refactoring
- Make `useLegacyEncoding` constructors private; expose
`withLegacyEncoding()` factory methods on message wrappers
- Drop legacy constructors; always omit BAL in legacy encoding mode
- Use typed `getArgument` overloads in QBFT codec mocks
### Tests
- ProposalMessageTest and RoundChangeMessageTest for IBFT2
- Extended RoundChangeTest and ProposalTest for QBFT covering legacy
and standard encoding paths
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Co-authored-by: Cedric <53888545+ghostant-1017@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
feat(api): implement eth_baseFee JSON-RPC method (#10457)
* feat(api): implement eth_baseFee JSON-RPC method
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
* chore(changelog): add eth_baseFee entry
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
---------
Signed-off-by: William Morriss <wjmelements@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Decouple snap data requests from `SnapWorldDownloadState` (#10530)
* Replace SnapWorldDownloadState by SnapRangeRequestContext in snap range requests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename SnapRangeRequestContext to SnapRequestContext
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: reject non-hex block numbers in BlockParameter (#10515)
* fix: reject non-hex block numbers in BlockParameter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: detect blob tx violations (missing/mismatched sidecar) (#10510)
* disconnect for invalid blob tx data
* peertask: exit retry loop immediately on MalformedRlpFromPeerException
After disconnecting a peer for malformed RLP, return PEER_DISCONNECTED
instead of INVALID_RESPONSE so the inner retry loop exits without the
1-second sleep. This allows consumedAnnouncements() to run promptly,
freeing the hash for the good peer's fetcher to pick up.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fixup: use fromAnnouncements factory in BufferedGetPooledTransactionsFromPeerFetcher
Completes the refactor from the blob-peer-disconnect-violations fix:
swaps the removed public List<TransactionAnnouncement> constructor for
the new fromAnnouncements() factory method.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: Peer Tracker incorrectly evicts peers pre-validation (#10511)
* stream connected peers
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-0x-prefixed tx hash in debug_getRawTransaction (#10505)
* fix: use Jackson HashDeserializer to enforce 0x prefix on all Hash RPC params
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge PivotSyncDownloader with SnapSyncDownloader (#10528)
* Merge PivotSyncDownloader with SnapSyncDownloader
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Further cleanup
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Simplify wiring bidirectional references between state and chain downloader (#10529)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix unavailable BAL handling in snap (#10519)
* Fix unavailable BAL handling in snap
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add tests for snap.GetBlockAccessListsFromPeerTask
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Enable NullAway for metrics core (#10453)
* Enable NullAway for metrics core
* Remove unused Jakarta NotNull annotations
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
---------
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths (#10527)
* perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths
* nit: rename INSTANCE to WITHOUT_STACKTRACE for clarity
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless CancellationException in AbstractEthTask (#10526)
executeSubTask() is called by every eth task subclass whenever a sub-task
is dispatched. When the parent task has already been cancelled, it previously
allocated a fresh CancellationException — capturing a full JVM stack trace —
on every call. At high task-cancellation rates (sync, peer churn, shutdown)
this adds unnecessary allocation pressure and CPU overhead from the native
stack-walk.
Replace with a stackless singleton following the same pattern as the
RlpxAgent peer-gate fix (besu-eth/besu#10510) and Netty's
StacklessClosedChannelException.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
use stackless singleton for peer-gate rejection in RlpxAgent (#10523)
Allocating a fresh RuntimeException with full stack trace on every
outbound peer-gate rejection causes measurable GC pressure at high
connection-attempt rates (observed ~1.5 throws/sec during chain-head
stalls, per JFR in besu-eth/besu#10498).
Replace the per-call allocation with a stackless singleton sentinel,
following the same pattern as Netty's StacklessClosedChannelException.
The LOG.trace call is updated to use parameterised formatting to avoid
string concatenation when trace logging is disabled.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
testing_buildBlockV1: exclude null fields from result (#10492)
* exclude fields from block building result when they are null
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Consider maxFeePerBlobGas when sorting tx in the layered txpool (#10513)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix(jsonrpc): eth_capabilities state/stateproofs disabled detection (#10377)
Check genesis world state availability via WorldStateArchive.isWorldStateAvailable().
If genesis state is not available (e.g. SNAP sync nodes using Bonsai), state
and stateproofs now correctly report disabled=true.
Fixes #10371
Signed-off-by: Arshdeep Singh <arshdeep.ssingh777@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Rename EthashConfigOptions to FixedDifficultyConfigOptions (#10507)
* Rename EthashConfigOptions to FixedDifficultyConfigOptions
* Support fixeddifficulty as a genesis config key alias for ethash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
testing_buildBlockV1 - error if tx provided but not applied (#10486)
* when transactions are explicitly provided, return an error if any were not applied
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* deterministic ordering
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: `miner_changeTargetGasLimit` silently ignores valid gas limit on PoW/BFT networks (#10460)
* fix: apply target gas limit in AbstractMinerExecutor.changeTargetGasLimit
The changeTargetGasLimit method in AbstractMinerExecutor contained an
empty if-block that validated the input but never applied the new gas
limit to miningConfiguration. This caused miner_changeTargetGasLimit
RPC calls to silently succeed without actually updating the target gas
limit on PoW and BFT networks.
Add the missing miningConfiguration.setTargetGasLimit(newTargetGasLimit)
call to ensure the target gas limit is properly updated.
Add AbstractMinerExecutorTest with regression tests to verify the gas
limit is correctly persisted to MiningConfiguration after calling
changeTargetGasLimit.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Update copyright notice in AbstractMinerExecutorTest.java
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
feat: Add cross-block code caching for improved performance (#10390)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix LayeredKeyValueStorage.isClosed() duplicated execution (#10508)
* Fix LayeredKeyValueStorage.isClosed() O(N) recursion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Lazy RLP decoding for GetReceiptsMessage (#10450)
* GetReceiptsMessage lazy decoding
Signed-off-by: stefan.pingel@…
fab-10
pushed a commit
to fab-10/besu
that referenced
this pull request
Jun 25, 2026
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
GetPayloadBodies methods and EngineExchangeTransitionConfigurationV1Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Refactor engine getPayload tests
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove optionals from data structure where they are mandatory
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Refactor engine payload JSON handling
Share ExecutionPayload structures across getPayload and newPayload versions.
Move Besu JSON serializers and deserializers into reusable core Jackson codecs.
Add JSON-RPC mapper factory and wire response/parameter serialization to the Besu module.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix issues surfaced by Hive tests
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove trace log that causes issues
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix rebase
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Refactor of EngineNewPayloadV4Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Refactor of EngineNewPayloadV4Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Merge EngineNewPayloadV3ValidationTest into EngineNewPayloadV3Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fixes following the refactor of EngineNewPayloadV3Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fixes following the refactor of EngineNewPayloadV2Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fixes following the refactor of EngineNewPayloadV1Test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
First pass of refactor newPayload code complete
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Reorg and document newPayloadV1
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts:
# ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV1.java
WIP: engine_newPayload refactor in progress
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Rename FcU result data structures to follow the spec
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove unrelated changes
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix rebase
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Move new implementation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Add support for fail on unknown JSON properties unless are null
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Remove previous engine_forkchoiceUpdated implementation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Apply suggestions from code review
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
engine_forkchoiceUpdated refactor
Refactor the engine_forkchoiceUpdated V1-V4 hierarchy into a sealed,
version-scheduled implementation under
ethereum.api.jsonrpc.internal.methods.engine.forkchoiceupdated, driven
by a small VersionScheduler that maps each method version to its active
hard-fork range. Introduces typed payload-attribute and forkchoice-state
parameter classes (PayloadAttributesV1-V4, ForkchoiceStateV1) and
adjusts the merge block-creation layer (PayloadIdentifier,
MergeCoordinator, TransitionCoordinator, PreparePayloadArgsBuilder)
accordingly.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
# ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/JsonRpcParameter.java
align block number position in log lines (#10632)
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
Co-authored-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods (#10662)
* feat(pow-removal): Phase 3 - remove miner_start, miner_stop, eth_mining RPC methods
* chore(pow-removal): remove remote sealer / PoW job constants from MiningConfiguration.Unstable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: skip DNSDaemon when --discovery-dns-url is blank or empty (#10666)
Signed-off-by: Usman Saleem <usman@usmans.info>
lazy GetStorageRangeMessage (#10660)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
feat(pow-removal): Phase 1 - remove PoW mining infrastructure (#10656)
* feat(pow-removal): Phase 1 - remove PoW mining infrastructure
Delete all PoW-specific mining code: PoWBlockCreator, PoWBlockMiner,
PoWMinerExecutor, PoWMiningCoordinator, AbstractMinerExecutor,
AbstractMiningCoordinator, IncrementingNonceGenerator, RandomNonceGenerator,
PoWSolver, PoWSolverInputs, PoWObserver.
* fix: pass miningConfiguration to NoopMiningCoordinator in MainnetBesuControllerBuilder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - downloaded storage range tracker (#10609)
* Add storage range tracker
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track all downloaded storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Registrer full range for accounts with empty storage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add RangeManager tests asserting starts of generated ranges are increasing
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add test that generated ranges start with min
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
pathbased package refactoring (#10641)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
lazy decoding of GetByteCodeMessage (#10652)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
uprev web3j to 5.0.3 (#10627)
* uprev web3j and add dependency links in acceptance-tests gradle files
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: initialize profilers list before adding gc in jmh config (#10651)
-PgcProfiler=true silently did nothing when -PasyncProfiler was not also
provided
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
upgrade license report plugin (#10650)
* upgrade license report plugin
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory (#10524)
* perf(api): per-head fee oracle snapshot + result cache for eth_feeHistory
Replaces the per-request 100-block scan in eth_gasPrice / eth_maxPriorityFeePerGas
with a per-head FeeOracleSnapshot computed off the block-import thread (when an
EthScheduler is available) and cached by chain-head hash. A cold path on the request
side self-heals: the first caller after a head change computes inline and seeds the
snapshot for subsequent callers. Bounds (miner_setMinGasPrice /
miner_setMinPriorityFee) are still applied at read time against the live mining
config, so configuration changes take effect immediately and never get baked into
a stale snapshot.
eth_feeHistory gains a result cache for "latest" requests, keyed on
(headHash, blockCount, sortedPercentiles, RewardBounds snapshot, nextBlockHardforkId).
Historic-block queries bypass the cache. The pre-existing per-block reward cache now
stores unbounded rewards; request-specific bounding is applied per-call with a
mining-config snapshot taken at request entry. Other targeted wins:
- getBlobBaseFees reuses the previous header instead of issuing one parent-hash
RocksDB read per block (saves up to 255 reads per feeHistory-256 request).
- getNextBaseFee / getNextBlobFee skip the chainHead+1 storage lookup when the
block can't exist (the "latest" case).
- getBlockHeaders uses the bulk Blockchain.getBlockHeaders(start, count) API, which
walks parent hashes from the in-memory header cache.
- Rewards loop is sequential again (fork-join split overhead dominated cache-hit
cases for big ranges).
- TransactionInfo no longer carries the Transaction reference.
DefaultBlockchain.getBlockBody / getTxReceipts now populate the in-memory cache on
read miss (matching the existing getBlockHeader(Hash) pattern). Refactors the three
populate-on-miss accessors into a single getCached<T> helper. Without this fix the
--cache-last-blocks cache only ever held blocks imported since startup, making it
useless for fee-oracle scans of pre-existing chain history.
Tests updated to mock the new access pattern (getBlockHeaders + getBlockBody by
hash). New test latestResultCacheMissesWhenNextBlockHardforkChanges pins the
HardforkId component of the cache key.
Measured on Hoodi via json-bench (k6, 20 RPS x 30s, post-restart, fresh JIT):
test baseline p95 fork p95 speedup
eth_gasPrice 11.64 ms 3.18 ms 3.66x
eth_maxPriorityFeePerGas 10.34 ms 3.21 ms 3.22x
eth_feeHistory (256 blocks) 12.72 ms 5.50 ms 2.31x
eth_feeHistory (5 blocks) 4.74 ms 3.58 ms 1.32x (HTTP/JSON floor)
hive rpc-compat: identical 22 pre-existing failures on both images (zero
regressions); eth_feeHistory/fee-history passes on both. eth_gasPrice and
eth_maxPriorityFeePerGas have no execution-apis fixtures; behavioural coverage is
in the updated unit tests.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: chain-time fork resolution, memory-bound fee caches, explicit receipts check
- Resolve next-block protocol specs from the chain head timestamp instead
of System.currentTimeMillis() in EthFeeHistory and BlockchainQueries
(gasPrice, gasPriceLowerBound, getNextBlockBaseFee, blob-fee fallback):
the wall clock is not a trusted time source and its millisecond scale
would resolve future timestamp-scheduled forks as already active.
- Rename the per-block reward cache (perBlockRewardsCache) and bound both
EthFeeHistory caches by approximate bytes with MemoryBoundCache weighers
(key + value) instead of entry counts.
- Replace the implicit ArrayIndexOutOfBoundsException on a receipts/body
count mismatch with an explicit Preconditions.checkState and add a
regression test.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Address review: fix BlockchainQueriesLogCacheTest, trim verbose comments
- BlockchainQueriesLogCacheTest: clear the construction-time fee-oracle
observer registration so per-test verifyNoMoreInteractions checks only
the log-cache query calls.
- Condense verbose comments across EthFeeHistory and BlockchainQueries to
one line of rationale where non-obvious; drop narration of self-evident code.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Remove unnecessary comments that restate the code
Drop PR-added comments that narrated what the code already says (cache
field/weigher descriptions, a redundant cache-policy note, a self-evident
delegating-method doc); keep only one-line rationale for non-obvious cases.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Defer reward percentile sort until after cache-key path
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* move rewards.filter after isPresent check and resolve return cached emptyList
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Luis Pinto <luis.pinto@consensys.net>
Fix SnapWorldStateDownloader losing active downloadState reference (#10349)
`run()` built a new `SnapWorldDownloadState` but never stored it on `this.downloadState`, so the reentrant guard, `cancel()`, and the inflight/progress gauges all saw `null`. Store the new state on the `AtomicReference` right after construction so those paths observe the live download.
Signed-off-by: Dee <DeeADouble@proton.me>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Add behaviour change notice for rpc-tx-feecap (#10640)
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
changelog rotation for 26.6.1 (#10637)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Thread startKeyHash through v2 snap range probing
Follow-up to #10634 (review by macfarla).
- SnapV2AccountRangeRequest and SnapV2StorageRangeRequest now pass the
explicit startKeyHash to findNewBeginElementInRange, matching their v1
counterparts. Previously the empty-receivedKeys case probed from
MIN_RANGE instead of the actual range start.
- Add a Create2Operation regression test mirroring the CreateOperation
one, covering the EIP-3860 oversized-initcode early abort so the shared
getInputSize stack-index contract is exercised for the CREATE2 layout.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
revert log level change back to error (#10626)
* revert log level change back to error
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(engine): return SYNCING when parent world state is not immediately cached (#10600)
* fix(engine): return SYNCING when parent world state is not immediately cached
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
optimizations, refactorings, and improved test coverage (#10634)
* evm: drop dead try/catch in Memory.calculateNewActiveWords
Words.clampedAdd is total — it saturates rather than throwing — so
the ArithmeticException branch was unreachable. Compute the saturated
byte size directly and short-circuit to the gas-overflow sentinel
when it exceeds MAX_BYTES, which is what the catch arm was trying to
express. No behaviour change on the supported range; downstream
gas accounting in memoryCost() clamps to Long.MAX_VALUE as before.
Signed-off-by: jflo <justin+github@florentine.us>
* evm: evaluate EIP-3860 initcode-size limit before initcode resolution
The CREATE/CREATE2 size check currently runs after the initcode has
been resolved from memory and before state gas is charged. Per
EIP-3860 the limit is an early exceptional abort, so checking the
stack-declared size first keeps the abort cheap and side-effect-free:
the operation no longer expands memory based on an unvalidated
length, and the ordering aligns with the regular-gas / state-gas
separation introduced in this branch.
Adds a covering test that pushes an out-of-range size and asserts
the operation halts with CODE_TOO_LARGE without growing memory.
Signed-off-by: jflo <justin+github@florentine.us>
* Validate RLPx frame size lower bound in deframer
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* Probe full snap range for omitted in-range leaves
findNewBeginElementInRange previously short-circuited when the responder
returned no keys, leaving the caller to assume the requested range was
fully covered. Plumb the request's start hash through the helper and
probe from that origin instead, so an empty-keys response that should
have included data still surfaces a follow-up request.
The probe also relies on visitAll throwing when an in-range node is
missing. That signal is absent when a responder supplies enough proof
nodes to make every leaf reachable through the InnerNodeDiscoveryManager
— the walk completes cleanly even though most leaves were not echoed
back in the keys map. Iterate the inner-node registry afterwards and
surface the lowest in-range leaf that the responder did not include, so
the caller schedules the follow-up fetch.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Agentic PR guidance for Contributors (#10414)
* hoooooo boy those links are borked, probably forever
Signed-off-by: jflo <justin+github@florentine.us>
* Apply suggestion from @macfarla
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: jflo <justin+github@florentine.us>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
snap/2 - invalid range proof handling (#10598)
* Handle invalid range proofs
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address code review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
remove not trusted root computation (#10622)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
remove bal size check between transaction (#10621)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
snap/2 - fix BAL retry handling for partial responses (#10593)
* Fix GetBlockAccessLists retry mechanism
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename test helper class
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix BFT invalid block production with `prevrandao` (#10611)
* Recreate for issue with PREVRANDAO op code and QBFT consensus
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Lint
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
* Fix compilation errors
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix prevrandao on BFT block creation
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add a test for IBFT2
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Chain height assertion is relative, not absolute
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update the changelog
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix copyright wording
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Tidy up test comments
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update existing unit test to check mix hash
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Update the BFT soak test to include upgrading to `Osaka` (#10607)
* Update the BFT soak test from shanghai to osaka
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove hard-coded contract address
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix incorrect test assertion
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Ensure shanghai and osaka upgrades are done individually
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Make sure assertions are less brittle
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove extraneous line
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Remove unnecessary fork additions to genesis file for Osaka upgrade
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Fix for Bonsai Archive from PR 10503
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Don't have both shanghai and osaka tasks download solc
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/pathbased/bonsai/storage/BonsaiArchiveWorldStateLayerStorage.java
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Update acceptance-tests/tests/osaka/osakacontracts/SimpleStorageOsaka.sol
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
* Add comments to build and test files
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
---------
Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix(discv5): lower verbose logs to trace (#10566)
Signed-off-by: sueun-dev <57546981+sueun-dev@users.noreply.github.com>
Co-authored-by: Usman Saleem <usman@usmans.info>
Enable DiscV5 by default in acceptance tests and fix cluster harness (#10619)
The BootNodesGenesisSetupTest was silently broken: it used the V4 genesis
key ("bootnodes") while DiscV5 was the default, so the genesis bootnode
config was never exercised. The harness wired peers independently, making
it pass regardless of the config under test.
Acceptance test DSL:
- ProcessBesuNodeRunner: emit --Xv5-discovery-enabled when discoveryV5Enabled=true,
fixing a long-standing gap where BesuNodeConfigurationBuilder.discoveryV5Enabled()
was silently ignored in process mode
- AdminNodeInfoTransaction: new Transaction<Map<String,Object>> backed by
admin_nodeInfo RPC, returning the full result map (enr, enode, id, etc.)
- AdminRequestFactory / AdminTransactions / AdminConditions: expose nodeInfo()
- BesuNode: add helpers to fetch ENR/enode from admin_nodeInfo at runtime
- Cluster: enable DiscV5 by default; close cluster in teardown
- NodeConfiguration: add discoveryV5Enabled flag (explicit per-node control)
BootNodesGenesisSetupTest: replace the broken test with two scoped tests:
- shouldConnectNodesViaV4EnodeBootnodesInGenesis: disables DiscV5, uses
"bootnodes" genesis key with enode:// URIs, asserts peer identity via
admin.hasPeer() not just count
- shouldConnectNodesViaV5EnrBootnodesInGenesis: uses "v5bootnodes" genesis
key with a real ENR fetched from admin_nodeInfo at runtime; both tests
use awaitPeerDiscovery=false so the harness does not wire peers
Other fixes:
- Disable DiscV5 for secp256r1 nodes in acceptance tests (unsupported)
- Fix cluster harness breaking auth-enabled nodes via admin_nodeInfo call
- Fix London fork timing regression in ExtendTransactionValidatorPluginTest
Fixes #9689
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Optmize memory usage of the bal parallel execution (#10606)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix chain height (#10608)
* drive SyncState bestChainHeight from engine_newPayload in PoS
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Demote closed channel exception log level (#10616)
* Demote ClosedChannelException log level to DEBUG
* Use supplier lambda in atTrace to avoid eager requestBodyAsJson evaluation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix isSyncing() during full sync on post-merge networks (#10613)
* Fix isSyncing() incorrectly returning false during full sync on post-merge networks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
snap/2 - pivot catch-up lifecycle management (#10590)
* BAL-based pivot catch-up lifecycle management
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs after headers, remove unused method
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Download BALs in a separate stage
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Update discovery v5 library to 26.6.0 (#10612)
* Update discovery v5 library to 26.6.0
-- Fixes handshake resend
-- hive tests
Signed-off-by: Usman Saleem <usman@usmans.info>
* Update CHANGELOG entry for DiscV5 library update
Signed-off-by: Usman Saleem <usman@usmans.info>
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Fix WS TLS support in acceptance DSL (#10432)
* Fix WS TLS support in acceptance DSL
WS URLs now switch to / when is true, and forwards the matching flags (keystore/truststore, PEM, password or password-file, client auth) to the spawned node. Adds / accessors so the runner can pass the configured path through.
Signed-off-by: Dee <DeeADouble@proton.me>
* Trust self-signed certs in acceptance DSL ws/https clientsThe previous commit only addressed the server side. The DSL's
WebSocketClient (used both for the endpoint probe and the live RPC
service) and the login OkHttpClient were still plain TCP, so any wss://
or https:// hop silently failed the TLS handshake before the request
left the test. This wires both clients through a trust-all
SSLSocketFactory whenever ws-ssl is enabled, scoped to the acceptance
tests via a package-private helper.
Signed-off-by: Dee <DeeADouble@proton.me>
* Cover WS TLS DSL client flows
Disable endpoint identification for the acceptance-test WebSocket client
when using the insecure TLS helper, matching the existing trust-all
behavior for self-signed test certificates.
Add acceptance coverage for WS TLS with JKS inline passwords, JKS
password files, PEM key/cert configuration, and client auth with JKS and
PEM trust material.
Signed-off-by: Dee <DeeADouble@proton.me>
* Format WS TLS acceptance test
Signed-off-by: Dee <DeeADouble@proton.me>
* formatting and copyright header
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Dee <DeeADouble@proton.me>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Check the bad block manager when receiving a new block from the network (#10212)
* check the bad block manager when receiving a new block from the network. This allows to mark a whole fork invalid and signaling this to the CL at the next fcu
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level, improved comments in tests
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* changed log level to debug for not important events
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* addressed pr comments
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
* make tests stricter
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
---------
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
snap/2 - track downloaded ranges (#10579)
* Add tracking of downloaded ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Iterate over children only once in SnapV2PersistDataStep
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Fix/eth capabilities oldest block when state is enabled (#10597)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Revert release process changes (#10604)
* Revert "feat(publish-release): add workflow_dispatch trigger, gated via environment (#10491)"
This reverts commit c8ca8a029a7feef70a10fc82afd97d6317aebdfd.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "fix(publish-release): keep gh release download in workspace cwd (#10490)"
This reverts commit be72aa2ae9fca47dfe5a00abf5d8117d01f4c972.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "proposed adjustments to release process (#10411)"
This reverts commit f027e9a7a99a2b91976e604e533517a64a836045.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Revert "Gate final-version docker tags on release publish, not draft (#10306)"
This reverts commit f3e26cf2def9dd530fb0acf2014c3e25a15dbe59.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Reapply java 21 -> 25 lost in revert
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
downgrade duplicate engine api timeout log to debug (#10595)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
chore: tidy up some references to java 21 (#10596)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Enrich `/readiness` health endpoint with diagnostic details (#10412)
* Enrich /readiness health endpoint with diagnostic details (#10400)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Defensive copy for HealthCheckResult and add error field for invalid params
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* Remove redundant isHealthy from HealthCheck interface
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Default omitted block parameter to latest on eth state methods (#10587)
* Default omitted block parameter to latest on eth state methods
eth_getBalance, eth_getCode, eth_getStorageAt, eth_getTransactionCount,
eth_getProof and eth_getStorageValues read the block parameter with
getRequiredParameter, so omitting it returned -32602 'Invalid block
param (block not found)'. Read it with getOptionalParameter and default
to BlockParameterOrBlockHash.LATEST when absent, per execution-apis
(Block required:false, default 'latest'). Adds a LATEST constant to
BlockParameterOrBlockHash.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: eth_getProof defaults to latest when block omitted
Replace errorWhenNoBlockNumberSupplied (which asserted the old
throw-on-missing behavior) with a test asserting an omitted block now
resolves to latest, matching the other state methods and the spec.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* test: assert latest response is success before casting in getProof default-block test
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Centralize optional-block defaulting and build LATEST without JSON parsing
Address review feedback (fab-10): move the 'optional block param, default
latest' logic into a shared blockParameterOrBlockHashWithLatestDefault helper on
AbstractBlockParameterOrBlockHashMethod, and have the six state methods delegate
to it with their param index. Build BlockParameterOrBlockHash.LATEST via a
private field-setting constructor instead of routing the constant through the
JSON-parsing constructor.
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Add CHANGELOG entry for optional block parameter on eth state methods
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
* Move CHANGELOG entry to Unreleased section
Updated breaking changes and upcoming changes in the changelog to reflect new RPC compatibility and deprecations.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Chase Wright <chase.wright@ethereum.org>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking (#10354)
* Fix: Offload WebSocket serialization to worker thread to prevent EventLoop blocking
Resolves #10336. The JSON-RPC response serialization and streaming can block when the websocket write queue is full. Moving this logic to executeBlocking prevents slow clients from exhausting Vert.x event loop threads.
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* false for ordering to match HTTP JSON RPC
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: daniellehrner <daniel.lehrner@consensys.net>
Create snap/2-specific request classes and pipeline steps (#10560)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
chore: rotate changelog for 26.6.0 release (#10591)
* chore: rotate changelog for 26.6.0 release
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix PluginVerifier catalog not found when running from IntelliJ (#10585)
* copyArtifactsCatalogToResources task
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Add new payload listener (#10570)
* add NewPayloadListener for engine_newPayload events
Mirrors the existing UnverifiedForkchoiceListener pattern so other components
can observe headers delivered by the consensus layer without coupling to the
JSON-RPC layer. The listener fires for every engine_newPayload request after
the block hash has been verified against the payload contents, but before the
"syncing" early-return — so listeners receive headers even while the node is
snap-syncing.
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Add static-pivot snap/2 world state download skeleton (#10548)
* SnapV2 skeleton for static pivot
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Track downloaded account ranges
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Address review
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Merge `PivotSyncState` into `SnapSyncProcessState` (#10549)
* Merge PivotSyncState with SnapSyncProcessState
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove mutable EMPTY_SYNC_STATE, make setCurrentHeader package-private
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Disallow empty change set for storage slot (#10582)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Integrate NullAway for nullability checks in ethstats package (#10520)
* feat: apply NullAway to ethstats module
* test: fix NullAway violations in ethstats test code
* test(ethstats): align successful AsyncResult cause() with Vert.x contract
* test(ethstats): add guard-path tests for sendBlockReport preconditions
Signed-off-by: mykim <kimminyong2034@gmail.com>
---------
Signed-off-by: mykim <kimminyong2034@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
kurtosis nightly task: pin ethereum-package (#10583)
* pin ethereum-package
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* full sha
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
nightly kurtosis interop assertoor test (#10569)
* nightly kurtosis interop assertoor test
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
add eth_getTransactionBySenderAndNonce RPC (#10501)
* storage index
* Add eth_getTransactionBySenderAndNonce RPC method
* Check transaction pool before index in eth_getTransactionBySenderAndNonce
* Add tx-sender-nonce-index-enabled to everything_config.toml test fixture
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Use `develop` tag name instead versioned (#10576)
ci: extract reusable docker.yml and migrate develop.yml to GHA (#10366)
* ci: extract reusable docker.yml and migrate develop.yml to GHA
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
* Apply suggestion from @joshuafernandes
equivalent and simpler
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Fix typo
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Krishna Mewara <krishnamewara841@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Fixed - logging cleanup for invalid blocks #10160 (#10180)
Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-hex block numbers in debug_getRawReceipts, and eth_getProof (#10240)
* fix: reject non-hex block numbers in debug_getRawBlock, debug_getRawHeader, debug_getRawReceipts
The Hive rpc-compat suite sends decimal strings like "2" (no 0x prefix)
as block parameters and expects a -32602 INVALID_PARAMS error. Besu was
silently accepting these via Long.decode() in BlockParameter, which
accepts both decimal and hex strings.
Add pre-validation in the blockParameter()/blockParameterOrBlockHash()
overrides of each affected method: if the raw parameter is not a named
block tag (earliest/latest/pending/finalized/safe) and does not start
with "0x", throw InvalidJsonRpcParameters(-32602) immediately.
Fixes Hive rpc-compat failures:
debug_getRawBlock/get-invalid-number
debug_getRawHeader/get-invalid-number
debug_getRawReceipts/get-invalid-number
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: use BlockParameterOrBlockHash in debug_getRawBlock and debug_getRawHeader
Switch DebugGetRawBlock and DebugGetRawHeader from AbstractBlockParameterMethod
to AbstractBlockParameterOrBlockHashMethod so they accept block hashes as well
as block numbers, matching the pattern already used by DebugGetRawReceipts.
Move the hex-prefix validation into BlockParameterOrBlockHash itself so it
applies to all methods using that parameter type rather than being duplicated
per method. Update DebugSetHeadTest to pass hex block numbers accordingly.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* refactor: remove redundant hex validation from DebugGetRawReceipts
The per-method check in blockParameterOrBlockHash was already superseded
by the validation added to BlockParameterOrBlockHash itself.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* chore: fix spotless formatting and add changelog entry
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: add eth_getProof + debug_getRawTransaction hex validation per maintainer review
- Fix EthGetProofTest: replace decimal block numbers (String.valueOf(500/501))
with hex equivalents ("0x1f4" / "0x1f5") — needed because BlockParameterOrBlockHash
now rejects non-0x-prefixed numbers
- Add 0x prefix check to DebugGetRawTransaction for the transaction hash parameter,
fixing the hive rpc-compat debug_getRawTransaction/get-invalid-hash test failure
- CHANGELOG: add eth_getProof and debug_getRawTransaction to the affected-methods list;
move the block-number-hex note from Upcoming Breaking Changes to Breaking Changes
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: revert DebugGetRawTransaction change and consolidate CHANGELOG
Per maintainer feedback, keep this PR focused on block param hex
validation only. Reverted the 0x prefix check added to
DebugGetRawTransaction and removed the duplicate bug-fixes entry
from CHANGELOG — the breaking change entry already covers it.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* test: derive hex block numbers from blockNumber field in EthGetProofTest
Replace hardcoded "0x1f4" / "0x1f5" with "0x" + Long.toHexString(blockNumber)
and "0x" + Long.toHexString(blockNumber + 1) so the strings stay in sync with
the blockNumber field if it ever changes.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* fix: allow negative hex block params to flow to downstream check
The hex-prefix check in BlockParameterOrBlockHash was rejecting inputs
like "-0x10" upfront with a generic IllegalArgumentException, which
methods mapped to INVALID_BLOCK_PARAMS ("Invalid block param (block
not found)"). The negative-number check already lives downstream in
AbstractBlockParameterOrBlockHashMethod and returns the more accurate
INVALID_BLOCK_NUMBER_PARAMS ("Invalid block number params") — accept
an optional leading minus so that path is reached.
Also update JsonRpcHttpServiceTest.ethGetStorageAtBlockNumber to pass
"0x0" instead of decimal "0" — the new contract is hex-only and this
test was the only remaining decimal usage in the api module.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* remove -0x carve out and update relevant tests
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix: align debug_getRaw* methods with execution-apis BlockNumberOrTag spec
debug_getRawBlock, debug_getRawHeader and debug_getRawReceipts now use
BlockParameter (BlockNumberOrTag) instead of BlockParameterOrBlockHash,
matching the execution-apis spec. Resolves the remaining
debug_getRawReceipts/get-invalid-number hive failure.
CHANGELOG breaking-changes list now explicitly names these three methods
and eth_getProof (which keeps BlockParameterOrBlockHash per its spec).
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* revert: drop DebugGetRawBlock/DebugGetRawHeader changes per maintainer review
Reverts both files to origin/main so this PR stays focused on the
block-parameter hex-prefix validation change.
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
* review comments
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sridhar Panigrahi <sridharpanigrahi2006@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Avoid blocking txpool save restore callers (#10561)
* Avoid blocking txpool save restore callers
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Add txpool save restore lock tests
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Address txpool save restore review comments
Assisted-by: OpenAI Codex
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Fix engine_newPayload invalid request type invalid status (#10525)
* fix: restore INVALID status for unknown execution request types in engine_newPayload
* changelog: engine_newPayload execution request validation error codes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
perf: cache last validated JWT token in EngineAuthService (#10559)
* perf: cache last validated JWT token in EngineAuthService
Engine API JWT tokens rotate at most once per minute (the CL updates iat
on a 60-second cycle). Under a CL reconnect burst, every engine API call
in that burst carries the same token string, causing repeated Jackson JSON
parsing (ByteQuadsCanonicalizer synchronized lock) and HMAC-SHA256
verification on the Vert.x event loop thread.
Cache the last successfully validated token in an AtomicReference. On a
cache hit (same raw token string), skip straight to the iat freshness
check — no Jackson, no HMAC, no locking. The slow path fires only on
token rotation (~once per minute) or on first call after restart.
The iat freshness check (issuedRecently) is still called on every request
so a cached token is correctly rejected once it goes stale.
Observed symptom: vert.x-eventloop-thread blocked for 15+ seconds in
ByteQuadsCanonicalizer.makeChild during a Prysm reconnect burst, causing
FilterManager timer contention and backward sync throughput collapse.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(discv5): IPv6 ENR auto-discovery via peer consensus (#9874) (#10468)
Add IPv6 address consensus mechanism to DiscV5 peer discovery:
- New NodeRecordManager tracks IPv6 address observations from peers
- New IpV6NewAddressHandler validates and applies consensus IPv6 addresses
- CLI option --ipv6-discovery-enabled (default: false) controls feature
- Updated PeerDiscoveryAgentFactoryV5 to integrate IPv6 consensus flow
Enhances DiscV5 peer discovery to support dual-stack IPv6 networks by
allowing nodes to discover and agree on IPv6 addresses through peer reports
when multiple peers report the same address, improving auto-discovery on
networks without hardcoded IPv6 bootnodes.
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Co-authored-by: Matilda Clerke <matilda.clerke@consensys.net>
Refactor: Extract EVMv2 stack manipulation unit tests (#10535)
* Extract NullaryOperationV2Test - Covers nullary fixed cost operations
* Extract BinaryOperationV2Test - Covers binary fixed cost operations
* Extract TernaryOperationV2Test - Covers MulModOperationV2 but will get used for at least AddMod later
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
eliminate flaky port collision (#10556)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix(at): prevent BftSyncAcceptanceTest port collision under parallel execution
The test used fixed ports derived from node names like "validator1".
When the 3 parameterized cases (ibft2/FULL, qbft/FULL, ibft2/SNAP) run
concurrently, identical names hash to identical ports, causing exit code 2
port-conflict failures on startup.
Prefix node names with testName+syncMode so each parameterized case gets
a distinct hash and therefore distinct fixed ports.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Acceptance Tests: if error creating ports file, make it obvious (#10555)
* throw if there was an error creating ports file
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* surface the error later
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: use non-zero exit code on disk-full shutdown (#10254)
* fix: use non-zero exit code on disk-full shutdown
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* test: cover non-NoSpace RocksDB IO errors
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
* fix: log exception details on disk-full instead of bare message
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
---------
Signed-off-by: Alejandro <26930485+alejandroGM0@users.noreply.github.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
optimize tracePreExecution tracePostExecution (#10541)
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Fix IndexOutOfBoundsException race condition in TransactionBroadcaster (#10482)
* Fix IndexOutOfBoundsException race condition in TransactionBroadcaster
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* test: add regression test for IndexOutOfBoundsException race condition in TransactionBroadcaster
When peerCount() and streamAvailablePeers() are called sequentially, peers can
disconnect between the two calls. This causes numPeersToSendFullTransactions
(calculated from peerCount) to exceed the actual number of peers returned by
streamAvailablePeers(), causing subList() to throw IndexOutOfBoundsException.
The new test reproduces this scenario: peerCount() returns 9 (sqrt = 3 full-tx
peers) but only 2 peers are available when streamAvailablePeers() is called.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Fix spotless formatting
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix: correct off-by-one in debug_accountAt transaction index validation (#10464)
* fix: correct off-by-one in debug_accountAt transaction index validation (#10463)
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
* docs: add changelog entry for debug_accountAt off-by-one fix
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
---------
Signed-off-by: Nakshatra Sharma <nakshatra.sharma3012@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
perf: parallelize block body DB lookups in engine_getPayloadBodies methods (#10532)
* perf: parallelize block body DB lookups in engine_getPayloadBodies methods
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* added benchmark
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* review: address reviewer comments on engine_getPayloadBodies parallelization
- CHANGELOG: add PR link #10532
- JMH benchmark: remove @Fork(1) annotation (gradle JMH plugin overrides
to 3 forks; annotation was misleading)
- JMH benchmark: update run command to -Pincludes=EngineGetPayloadBodiesParallel
so it doesn't run all benchmarks in the module
* review: add --no-daemon to benchmark run command and document in BENCHMARKING.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Make snap/2 BAL fetching strict (#10542)
* Make BAL-fetching peer task retry on incomplete data
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove IncompleteResultsException
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Require Java 25 to build (#10539)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Prepare snap sync downloader selection for snap/2 (#10545)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Remove optimization to apply BALs before flat db heal (#10538)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Karim Taam <karim.t2am@gmail.com>
Replace Address.hashCache Guava LoadingCache with Caffeine (#10235)
* Replace Address.hashCache Guava LoadingCache with Caffeine
Under heavy miss rate (pre-EIP-150 DoS-era blocks spam BALANCE/EXTCODESIZE
against tens of thousands of pseudo-random addresses per tx) Guava's per-segment
ReentrantLock serialises parallel tx executors on every account-touching EVM
opcode. A thread dump of a stuck import thread on a Bonsai full-sync showed the
thread parked on LocalCache$Segment.storeLoadedValue.
Caffeine's load path is CAS-based (no segment write lock) and already the
in-house cache library used elsewhere in Besu.
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* test: move addressHash correctness tests into existing vm/AddressTest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove unused evm arg from FixedCostOperations (#10533)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Enable NullAway static null-safety analysis for datatypes module (#10394)
* Enable NullAway static null-safety analysis for datatypes module
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
* pin nullaway version centrally in platform/build.gradle
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
---------
Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
Add experimental CLI option to advertise snap/2 (#10536)
* Add experimental CLI option to advertise snap/2
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Remove condition
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Fix tests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: QBFT/IBFT2 legacy RoundChange and Proposal encoding (#10499)
## Problem
QBFT RoundChange and Proposal messages failed to decode against
pre-26.1.0 peers because the BAL (blockAccessList) field was always
included in the RLP encoding even when absent, causing a decode error
on the receiving side.
## Changes
### Core fix
- Encode RoundChange and Proposal without blockAccessList when the field
is absent (null), matching the legacy wire format
- Fix QBFT ProposalPayload signature verification under legacy encoding
### Legacy interop flag
- Add `--Xbft-legacy-protocol-encoding` flag (UnstableBftOptions) to
force legacy encoding for IBFT2/QBFT, enabling interop with
pre-26.1.0 peers
- Rename from earlier `--Xqbft-legacy-roundchange-encoding` and extend
to cover IBFT2 as well
- Rename `BftOptions` → `UnstableBftOptions`, move to
`options/unstable/`, support bare flag form
- Document flag limitation when BAL is present (CHANGELOG + javadoc)
### Refactoring
- Make `useLegacyEncoding` constructors private; expose
`withLegacyEncoding()` factory methods on message wrappers
- Drop legacy constructors; always omit BAL in legacy encoding mode
- Use typed `getArgument` overloads in QBFT codec mocks
### Tests
- ProposalMessageTest and RoundChangeMessageTest for IBFT2
- Extended RoundChangeTest and ProposalTest for QBFT covering legacy
and standard encoding paths
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Co-authored-by: Cedric <53888545+ghostant-1017@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
feat(api): implement eth_baseFee JSON-RPC method (#10457)
* feat(api): implement eth_baseFee JSON-RPC method
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
* chore(changelog): add eth_baseFee entry
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: William Morriss <wjmelements@gmail.com>
---------
Signed-off-by: William Morriss <wjmelements@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Decouple snap data requests from `SnapWorldDownloadState` (#10530)
* Replace SnapWorldDownloadState by SnapRangeRequestContext in snap range requests
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Rename SnapRangeRequestContext to SnapRequestContext
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
fix: reject non-hex block numbers in BlockParameter (#10515)
* fix: reject non-hex block numbers in BlockParameter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: detect blob tx violations (missing/mismatched sidecar) (#10510)
* disconnect for invalid blob tx data
* peertask: exit retry loop immediately on MalformedRlpFromPeerException
After disconnecting a peer for malformed RLP, return PEER_DISCONNECTED
instead of INVALID_RESPONSE so the inner retry loop exits without the
1-second sleep. This allows consumedAnnouncements() to run promptly,
freeing the hash for the good peer's fetcher to pick up.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* fixup: use fromAnnouncements factory in BufferedGetPooledTransactionsFromPeerFetcher
Completes the refactor from the blob-peer-disconnect-violations fix:
swaps the removed public List<TransactionAnnouncement> constructor for
the new fromAnnouncements() factory method.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: Peer Tracker incorrectly evicts peers pre-validation (#10511)
* stream connected peers
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: reject non-0x-prefixed tx hash in debug_getRawTransaction (#10505)
* fix: use Jackson HashDeserializer to enforce 0x prefix on all Hash RPC params
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge PivotSyncDownloader with SnapSyncDownloader (#10528)
* Merge PivotSyncDownloader with SnapSyncDownloader
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Further cleanup
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Simplify wiring bidirectional references between state and chain downloader (#10529)
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Fix unavailable BAL handling in snap (#10519)
* Fix unavailable BAL handling in snap
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
* Add tests for snap.GetBlockAccessListsFromPeerTask
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
---------
Signed-off-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Enable NullAway for metrics core (#10453)
* Enable NullAway for metrics core
* Remove unused Jakarta NotNull annotations
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
---------
Signed-off-by: abhay-dev2901 <abhaytp1998@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths (#10527)
* perf(eth): stackless singleton for NoAvailablePeersException in peer retry paths
* nit: rename INSTANCE to WITHOUT_STACKTRACE for clarity
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
perf(eth): stackless CancellationException in AbstractEthTask (#10526)
executeSubTask() is called by every eth task subclass whenever a sub-task
is dispatched. When the parent task has already been cancelled, it previously
allocated a fresh CancellationException — capturing a full JVM stack trace —
on every call. At high task-cancellation rates (sync, peer churn, shutdown)
this adds unnecessary allocation pressure and CPU overhead from the native
stack-walk.
Replace with a stackless singleton following the same pattern as the
RlpxAgent peer-gate fix (besu-eth/besu#10510) and Netty's
StacklessClosedChannelException.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
use stackless singleton for peer-gate rejection in RlpxAgent (#10523)
Allocating a fresh RuntimeException with full stack trace on every
outbound peer-gate rejection causes measurable GC pressure at high
connection-attempt rates (observed ~1.5 throws/sec during chain-head
stalls, per JFR in besu-eth/besu#10498).
Replace the per-call allocation with a stackless singleton sentinel,
following the same pattern as Netty's StacklessClosedChannelException.
The LOG.trace call is updated to use parameterised formatting to avoid
string concatenation when trace logging is disabled.
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
testing_buildBlockV1: exclude null fields from result (#10492)
* exclude fields from block building result when they are null
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Consider maxFeePerBlobGas when sorting tx in the layered txpool (#10513)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fix(jsonrpc): eth_capabilities state/stateproofs disabled detection (#10377)
Check genesis world state availability via WorldStateArchive.isWorldStateAvailable().
If genesis state is not available (e.g. SNAP sync nodes using Bonsai), state
and stateproofs now correctly report disabled=true.
Fixes #10371
Signed-off-by: Arshdeep Singh <arshdeep.ssingh777@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Rename EthashConfigOptions to FixedDifficultyConfigOptions (#10507)
* Rename EthashConfigOptions to FixedDifficultyConfigOptions
* Support fixeddifficulty as a genesis config key alias for ethash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
testing_buildBlockV1 - error if tx provided but not applied (#10486)
* when transactions are explicitly provided, return an error if any were not applied
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* changelog entry
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* deterministic ordering
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
fix: `miner_changeTargetGasLimit` silently ignores valid gas limit on PoW/BFT networks (#10460)
* fix: apply target gas limit in AbstractMinerExecutor.changeTargetGasLimit
The changeTargetGasLimit method in AbstractMinerExecutor contained an
empty if-block that validated the input but never applied the new gas
limit to miningConfiguration. This caused miner_changeTargetGasLimit
RPC calls to silently succeed without actually updating the target gas
limit on PoW and BFT networks.
Add the missing miningConfiguration.setTargetGasLimit(newTargetGasLimit)
call to ensure the target gas limit is properly updated.
Add AbstractMinerExecutorTest with regression tests to verify the gas
limit is correctly persisted to MiningConfiguration after calling
changeTargetGasLimit.
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
* Update copyright notice in AbstractMinerExecutorTest.java
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: rakshaak29 <rakshaak29@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
feat: Add cross-block code caching for improved performance (#10390)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Fix LayeredKeyValueStorage.isClosed() duplicate…
matkt
pushed a commit
to matkt/besu
that referenced
this pull request
Jul 30, 2026
* storage index * Add eth_getTransactionBySenderAndNonce RPC method * Check transaction pool before index in eth_getTransactionBySenderAndNonce * Add tx-sender-nonce-index-enabled to everything_config.toml test fixture Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Sally MacFarlane <macfarla.github@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.
Signed-off-by: Sally MacFarlane macfarla.github@gmail.com
PR description
Implements eth_getTransactionBySenderAndNonce, a new JSON-RPC method that returns a transaction given a sender address and nonce. Aligns with the implementations in geth ethereum/go-ethereum#33854 and reth paradigmxyz/reth#10540, and execution-apis PR ethereum/execution-apis#771
Parameters: (address: Address, nonce: QUANTITY) - sender address and nonce as hex quantity.
Return value: Full transaction object (matching eth_getTransactionByHash format), or null if not found. Pending transactions are returned without block metadata; mined transactions include block number, hash, and index.
Lookup priority:
Opt-out indexing (--tx-sender-nonce-index-enabled, default: true):
The sender+nonce → tx hash index adds one entry per tx (~60 bytes per tx). On mainnet this is significant (~150 GB for a full node), and existing nodes that upgrade without resyncing would silently return null for pre-upgrade transactions. (This matches geth's default behavior.) Disabling the flag on nodes running full sync would avoid the extra storage cost in the event of a resync. However since our default is SNAP, this PR makes the index enabled by default.
Fixed Issue(s)
Fixes #10284
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests