Skip to content

XDC - Add custom state sync allocation strategy#10399

Merged
cicr99 merged 2 commits intomasterfrom
feature/xdc-get-node-data-filter
Feb 6, 2026
Merged

XDC - Add custom state sync allocation strategy#10399
cicr99 merged 2 commits intomasterfrom
feature/xdc-get-node-data-filter

Conversation

@cicr99
Copy link
Copy Markdown
Contributor

@cicr99 cicr99 commented Feb 4, 2026

No description provided.

@cicr99 cicr99 requested review from Demuirgos and ak88 as code owners February 4, 2026 09:58
@cicr99 cicr99 added the xdc label Feb 4, 2026
@cicr99 cicr99 requested a review from batrr February 4, 2026 10:13
@cicr99 cicr99 merged commit 5d3c8fb into master Feb 6, 2026
83 checks passed
@cicr99 cicr99 deleted the feature/xdc-get-node-data-filter branch February 6, 2026 10:53
kamilchodola added a commit that referenced this pull request Feb 17, 2026
* Fixes 4 flaky test + refactors dbs (#10407)

* Fix XDC flaky reward test with correct signature for transaction

* Add Retry to LockFairnessTest

* fix GetMemoryOwner for managed dbs + refactors

* whitespace

* Decrease Retain_Some_PersistedNodes threshold to resolve flakiness

* fix review

* tiny refactor

* Parallelize Trie.Tests

* Parallelize Nethermind.Blockchain.Test

* Revert FilterManagerTests parall

* Update Dockerfiles (#10409)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* parallelize txpool test + fixes for parallel blockchain tests (#10418)

* Fix XDC flaky reward test with correct signature for transaction

* Add Retry to LockFairnessTest

* fix GetMemoryOwner for managed dbs + refactors

* whitespace

* Decrease Retain_Some_PersistedNodes threshold to resolve flakiness

* fix review

* tiny refactor

* Parallelize Trie.Tests

* Parallelize Nethermind.Blockchain.Test

* Revert FilterManagerTests parall

* parallelize some TxPool tests

* Try parallelize more tests

* make TxPool tests more parallelizable

* revert

* fix

* fix issues in Nethermind.Blockchain.Test

* more fixes

* more fixes

* FilterManagerTests nonparallelizable

* fix

* fix flaky test

* fix shutter test

* Add retry to Fuzz_accounts_with_storage

* retry flaky test

* add [NonParallelizable]

* XDC - Add custom state sync allocation strategy (#10399)

add custom state sync allocation strategy for xdc

* ProcessingStats Extensibility (#10420)

* processing stats extensibility

* improvement

* build fix

* fix

* fix: correct Bytes.BytesComparer length comparison ordering (#10353)

* fix: correct Bytes.BytesComparer length comparison ordering

The BytesComparer had inverted length comparison logic:
- null was considered greater than non-null (should be less)
- shorter arrays with same prefix were considered greater than longer
  arrays (should be less)

Fixed by inverting the return values for length-related comparisons:
- null < non-null
- [] < [x, ...] (empty < non-empty)
- [prefix] < [prefix, more] (shorter with same prefix < longer)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Switched to sequence compare to

* Address comment

* fix: handle null y in BytesComparer when x is non-null

Null arrays implicitly convert to empty ReadOnlySpan<byte> in
SequenceCompareTo, losing the null vs empty distinction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* Use CodeInfo type instead of ICodeInfo (#10423)

* Use CodeInfo type instead of ICodeInfo

Replace the ICodeInfo abstraction with a concrete CodeInfo type and adapt related APIs and implementations. CodeInfo was extended to carry precompile info, provide Code/CodeSpan, Version, IsPrecompile/IsEmpty semantics and background analysis. EofCodeInfo now derives from CodeInfo and provides EOF-specific data and versioning. PrecompileInfo was removed and precompiles are represented as CodeInfo (wrapping CachedPrecompile when needed).

API changes: ICodeInfoRepository, IOverridableCodeInfoRepository and IPrecompileProvider signatures and caches now use CodeInfo; CodeInfoFactory and CodeLruCache updated accordingly. Call sites across the VM, instruction implementations, tracers, transaction processing, repositories and tests were updated to use CodeInfo directly and to perform EOF checks using 'is EofCodeInfo' where appropriate. JumpDestinationAnalyzer.MachineCode was made accessible for CodeInfo.Code.

Overall this unifies EOF and precompile handling under a single CodeInfo model and simplifies caching and execution logic.

* Feedback

* Update CI workflows for Taiko/Surge integration tests (#10419)

* Add CI workflow for Surge integration tests and update workflow for Taiko

* Update CI workflow to reference the correct surge configuration file

* Update CI workflows to increase timeout for integration tests and adjust repository references

* Resolve comments

* Parallelizable does not work on all XDC tests (#10431)

remove broken Parallelizable

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Add JitAsm tool to be able to analyse the Jit output (#10432)

* Add JitAsm tool to be able to analyse the Jit output

* Spelling

* Address AGENTS.md LINQ guideline feedback on JitAsm PR (#10433)

* Initial plan

* Strengthen AGENTS.md LINQ guideline with explicit examples

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Spell

* feedback

* Feedback

* Improve initialization

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Update README with performance highlights of Nethermind (#10359)

* Update README with performance highlights of Nethermind

Revised description to emphasize performance metrics.

* Update README.md

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Update README.md

Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

* Update README with image sources and badges

* Add 'srcset' to cspell.json dictionary

* Remove cspell directives from README

Removed cspell directives from README.md.

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

* Auto-update fast sync settings (#10449)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* Update OP Superchain chains (#10448)

Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>

* Fix flaky tests: timing and race condition (#10455)

- PeerManagerTests: Increase After timeout from 1000ms to 3000ms in
  Will_not_stop_trying_on_rlpx_connection_failure to prevent false
  failures on loaded CI runners
- SyncServerTests: Use Interlocked.Increment in
  Broadcast_NewBlock_on_arrival_to_sqrt_of_peers to fix race condition
  where concurrent SyncPeerMock background threads could lose count
  increments
- Rename _travisDelay fields to _delay, _delayLong, _delayLonger

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Metrics and BlockStatistics extension (#10429)

* Metrics and BlockStatistics extension

* extensibility fixes

* AGENTS shouldn't be repetitive when adding code (#10460)

* more Agents changes (#10461)

* more Agents changes

avoid var, use testcases

* Revise testing guidelines and LINQ usage recommendations

Updated guidelines for adding tests and using LINQ.

* CodeInfo Extension (#10467)

refactoring & codeinfo changes

* fix: add missing yield break after shutdown response in `JsonRpcProcessor` (#10462)

* fix: add missing yield break after shutdown response

* Add test

* ensure pipereader is completed on shutdown early-exit

* cover pipereader completion when shutdown is requested

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Fix fuzz issue (#10459)

* Fix flaky network test (#10463)

* Update packages (#10421)

* Remove redundant allocation in Rlp.Encode<T> when input is already Rlp (#10468)

* Update Rlp.cs

* Add regression test for Rlp.Encode<T> with Rlp input

---------

Co-authored-by: Ben {chmark} Adams <thundercat@illyriad.co.uk>

* Add SeqlockCache (#10415)

* Add SeqlockCache and use for Accounts and Values

* Add tests

* Spelling

* By in

* Feedback

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix

* Feedback

* Change to 2 way cache

* 2-way skew-associative

* Add prefetch for way 1 and hash-bit alternating eviction

Prefetch way 1's cache line while checking way 0 to hide L2/L3
latency in the skew layout where ways are ~1MB apart. Use a hash
bit to alternate eviction when both ways are live instead of always
evicting way 0 — measured identical hit rates with zero extra memory.

* Add Volatile.Read/Write for _hashes in BlockhashProvider

Ensures cross-thread visibility of the prefetched hashes array on
ARM's weak memory model. On x86 (TSO) these are no-ops.

* Convert NodeStorageCache and PreBlockCaches.RlpCache to SeqlockCache

* Inline Address comparison in StorageCell.Equals for SeqlockCache hot path

Seal Address class and inline 20-byte comparison (Vector128 + uint) directly
in StorageCell.Equals to eliminate Address.Equals calls that the JIT refuses
to inline in deep chains. Adds ReferenceEquals fast-path.

* Outline cold paths in SeqlockCache and fix IsPersisted delegate allocation

Extract GetOrAddMiss as NoInlining to keep GetOrAdd hit path lean (2122 -> 748 bytes).
Change WriteEntry to NoInlining and collapse eviction tree to single call site.
Reuse cached _tryLoadRlp delegate in PreCachedTrieStore.IsPersisted.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add ability to override block fields in debug_ calls (#10405)

* Align tx sending error code (#10464)

* Optimize transaction processing via encoded-tx trie root and fast block re-encode (#10435)

* Add encoded-tx root calc and trie decode perf

Allow computing the transactions trie root directly from RLP-encoded transactions and update callers to use it. ExecutionPayload.TryGetBlock now passes the encoded Transactions to TxTrie.CalculateRoot. Implement TxTrie.CalculateRoot(ReadOnlySpan<byte[]>) and InitializeFromEncodedTransactions to populate the trie from encoded payloads and compute RootHash; use a TrackingCappedArrayPool and UpdateRootHash. Add a unit test to assert encoded and decoded transaction paths produce the same root. Also refine trie node RLP encoding parallelization: UseParallel now checks the node's non-null child count (only parallelize when >= 4 children and multiple CPU cores) to avoid parallel overhead on small branches.

* Fast block re-encode

* Feedback

* chore: Update .NET packages (#10482)

Update .NET packages

* Move tx block-format wrapping logic from BlockDecoder to TxDecoder (#10476)

* Move tx block-format wrapping logic from BlockDecoder to TxDecoder

Extract the legacy-vs-typed tx wrapping knowledge into static helpers
on TxDecoder (GetBlockFormatLength, WriteBlockFormat) so BlockDecoder
no longer directly checks TxType.Legacy for encoding decisions.

* Feedback

* Update Dockerfiles (#10485)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* fix: clear reference-type elements in Truncate to prevent pool memory leak (#10472)

* fix: clear reference-type elements in Truncate to prevent pool memory leak

* add helper

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Remove Vault and NDM remnants (#5462) (#10478)

- Remove Vault from ModuleType and spaceneth configs

- Remove NDM from Protocol, ProtocolParser, and tests

- Remove unused NDM timeout constants from Timeouts

- Update AddCapabilityMessageSerializer comment

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Faster FastHash (#10410)

* Faster FastHash

* Feedback

* Split FastHash into dispatcher + dedicated AES/CRC methods

Split monolithic FastHash into thin dispatcher + FastHashAesX64,
FastHashAesArm, and FastHashCrc. Eliminates XMM saves from CRC path,
removes ARM ternaries from x64 codegen, replaces MEMCPY tail with
CRC scalar processing, and simplifies 4-lane fold to 3 XOR + 1 AES.

AesX64 codegen: 294 bytes (was 564), CRC: no XMM registers at all.
AES/CRC ratio: 1.75x at 256B, 2x at 1024B.

* Optimize JSON-RPC request parsing and processing (#10453)

* Add encoded-tx root calc and trie decode perf

Allow computing the transactions trie root directly from RLP-encoded transactions and update callers to use it. ExecutionPayload.TryGetBlock now passes the encoded Transactions to TxTrie.CalculateRoot. Implement TxTrie.CalculateRoot(ReadOnlySpan<byte[]>) and InitializeFromEncodedTransactions to populate the trie from encoded payloads and compute RootHash; use a TrackingCappedArrayPool and UpdateRootHash. Add a unit test to assert encoded and decoded transaction paths produce the same root. Also refine trie node RLP encoding parallelization: UseParallel now checks the node's non-null child count (only parallelize when >= 4 children and multiple CPU cores) to avoid parallel overhead on small branches.

* Fast block re-encode

* Feedback

* Cache TokenValidationParameters as readonly field

Move TokenValidationParameters construction from per-request AuthenticateCore
to the constructor, eliminating repeated allocation on cache-miss auth path.

* Implement manual HS256 JWT fast validator with library fallback

Add zero-allocation manual JWT validation for known HS256 header formats.
Uses HMACSHA256.HashData (static) and CryptographicOperations.FixedTimeEquals
for signature verification. Handles iat and exp claims. Falls back to
Microsoft.IdentityModel for unrecognized header formats.

* Refactor ByteArrayConverter write path

Replace WriteRawValue with WriteStringValue(ReadOnlySpan<byte>) on the main
value-write path, eliminating manual quote handling. Raise stackalloc
threshold to 256 bytes. Use "0x0"u8 literal for zero-value fast path.
Delegate-based overload retained for property name writes.

* Add fixed-size fast path for 32-byte hash converters

Hash256Converter and ValueHash256Converter now use a dedicated 66-byte
stackalloc path (0x + 64 hex chars) that skips CountLeadingNibbleZeros,
ArrayPool, and the generic ByteArrayConverter write path.

* Direct numeric-to-hex for Long, ULong, UInt256 converters

Use BitOperations.LeadingZeroCount and nibble-extraction loop to write hex
directly without byte array intermediary. UInt256 uses LZCNT on limbs.
All paths use WriteStringValue instead of WriteRawValue. Zero values use
"0x0"u8 literal. ZeroPaddedHex uses fixed 66-byte stackalloc path.

* Replace ForcedNumberConversion AsyncLocal with ThreadStatic cache

GetFinalConversion() now reads from a ThreadStatic cache instead of
AsyncLocal on every call. The ThreadAwareAsyncLocal wrapper updates both
the AsyncLocal and ThreadStatic when Value is set, maintaining backward
compatibility with tracing/debug converters.

* Pool CancellationTokenSource with TryReset

BuildTimeoutCancellationToken now rents from a ConcurrentBag pool.
TryReset() returns CTS to pool on completion. Debugger-attached path
skips pooling. Eliminates per-request CTS allocation on hot path.

* Increase StreamPipeWriter minimumBufferSize from 4KB to 16KB

Reduces Grow calls during serialization of typical Engine API responses
(~5-20KB). Tradeoff: slightly higher per-connection memory baseline.

* Bypass BufferResponses for Engine API + call StartAsync before body

Authenticated single responses (Engine API) skip RecyclableStream
double-copy. Call StartAsync() before serialization to flush headers
early and avoid PinnedBlockMemoryPool.Rent allocations.

* Replace JsonRpcContext.Current AsyncLocal with ThreadStatic

Replace AsyncLocal<JsonRpcContext?> with [ThreadStatic] field and a
ThreadStaticAccessor wrapper that preserves the .Value API shape. This
eliminates the ExecutionContext capture cost on every JSON-RPC request.

* Use synchronous JsonSerializer.Serialize for PipeWriter path

Replace JsonSerializer.SerializeAsync(PipeWriter, ...) with synchronous
Utf8JsonWriter + JsonSerializer.Serialize. This eliminates the async
state machine allocation since PipeWriter implements IBufferWriter<byte>
and data is flushed by the caller's CompleteAsync().

* Eliminate CTS for Engine API path

Skip per-request CancellationTokenSource allocation for authenticated
Engine API requests. They use CancellationToken.None since they are from
trusted consensus clients and must complete for consensus. Connection
drops are handled by the PipeReader. Non-engine paths still use the
pooled CTS from T08.

* Engine API terminal middleware before routing/CORS

Add an early-pipeline middleware that intercepts authenticated engine
port POST requests before routing, CORS, response compression, and
WebSocket middleware. Engine API requests are handled directly, writing
to the response body without buffering. Non-engine requests pass through
to the standard middleware pipeline.

* Skip CountingPipeReader when Content-Length is known

In the engine API fast lane, use ctx.Request.BodyReader directly and
Content-Length for metrics, eliminating CountingPipeReader overhead.
In the standard handler, skip CountingPipeReader when Content-Length
is available and fall back to it only for chunked requests.

* Seal hot classes and capture concrete types

Seal EthereumJsonSerializer, JsonRpcProcessor, and JsonRpcService (no
subclasses exist). In Startup.cs, cast DI-resolved interfaces to their
concrete types and use those in middleware closures, enabling JIT
devirtualization of hot-path method calls.

* Micro-optimizations in request processing

- Replace LINQ Select in batch deserialization with explicit loop
- Use TryGetDecimal instead of GetRawText for numeric JSON-RPC id parsing
- Replace ElementAtOrDefault with bounds-checked indexed access in LogRequest
- Intern known engine method names via ValueEquals to avoid string allocation
- Remove unused System.Linq using from JsonRpcProcessor

* Startup warmup for serializer metadata

Add EthereumJsonSerializer.WarmupSerializer() that pre-serializes
instances to populate System.Text.Json metadata caches. Call it at
startup with JsonRpcSuccessResponse and JsonRpcErrorResponse to
eliminate cold-start serialization overhead on first engine request.

* Move log interpolation to NoInlining local/static functions

Keep string interpolation out of hot paths by moving log bodies to
[MethodImpl(MethodImplOptions.NoInlining)] functions so the JIT
does not inline the interpolation into callers.

* STJ source generation for engine, eth, debug, and trace API types

Add source-generated JsonSerializerContext instances for all major RPC
type families to eliminate reflection-based metadata lookup on hot paths.

- EngineApiJsonContext: 19 engine API types (payloads, forkchoice, blobs)
- FacadeJsonContext: BlockForRpc, TransactionForRpc, FilterLog, SyncingResult
- EthRpcJsonContext: receipts, fee history, account proofs, plus debug/trace
  types (GethLikeTxTrace, ParityTxTraceFromStore, ChainLevelForRpc, etc.)
- JsonRpcResponseJsonContext: success/error response envelope types

Infrastructure changes:
- AddTypeInfoResolver() on EthereumJsonSerializer with version-tracked
  propagation to all existing serializer instances
- Cache JsonTypeInfo on ExpectedParameter for typed deserialization
- WriteJsonRpcResponse() in Startup.cs for typed response serialization
- Add [JsonIgnore] to Span properties on Hash256, Bloom, Signature to
  prevent SYSLIB1225 source generator errors

* Optimize JwtAuthentication

* Optimize ByteArrayConverter

* Test fix

* Spelling

* Optimize LongConverter

* Spell

* Optimize Hash256Converter

* Optimize UInt256Converter

* Fix tests

* Spelling

* Feedback

* Optimize

* Optimize

* Spell

* Also Avx512

* Formatting

* Spell

* Drop the weird pattern matching

* Use concurrentqueue instead

* Stream blobs directly

  Before (3 copies of hex data):
  1. ByteArrayConverter → hex-encode into rented ArrayPool<byte> buffer (262KB)
  2. Utf8JsonWriter.WriteRawValue → memcpy into Utf8JsonWriter's internal buffer (262KB)
  3. Utf8JsonWriter flush → memcpy into PipeWriter/Kestrel send buffer (262KB)

  After (1 copy):
  1. OutputBytesToByteHex → hex-encode directly into writer.GetSpan() (Kestrel's send buffer)

  So copies 2 and 3 are eliminated. Copy 1 (the binary→hex transform) remains

* formatting

* Spell

* Tidy up

* tidy up

* Feeedback

* Feedback

* Reduce contention in trie root hashing

Replace lock+List in TrackingCappedArrayPool with ConcurrentQueue for
parallel paths and bare List for sequential paths. Skip parallel root
hashing for small tries (<=64 items) to avoid scheduling overhead.
Fix race condition where ReceiptTrie and TxTrie called UpdateRootHash
without propagating canBeParallel, causing concurrent List.Add on a
non-thread-safe collection.

* Feedback

* Run newPayload inline (#10479)

* Skip response compression for Engine API requests

* Optimize engine_getBlobsV2 with fused batch lookup and zero-copy proofs

Replace N+1 lock acquisitions with a single fused TryGetBlobsAndProofsV1
that atomically counts and extracts blobs under one lock. Use
ReadOnlyMemory<byte[]> to window into wrapper.Proofs arrays instead of
copying via Slice+spread, eliminating ~0.4MB of proof allocations per
request. Replace ArrayPoolList with parallel arrays, removing the pool
rent/return overhead.

* Split blob lookups into two phases to reduce lock hold time (#10173)

Add ITxStorage.TryGetMany for batched RocksDB MultiGet and override
TryGetBlobsAndProofsV1 in PersistentBlobTxDistinctSortedPool with a
two-phase approach: fast in-memory + cache lookups under lock, then a
single batched DB read outside the lock. This avoids holding the pool's
McsLock during potentially slow I/O for up to 128 blobs per request.

Co-Authored-By: Lukasz Rozmej <lukasz@nethermind.io>

* Remove dead GetBlobCounts method (#10159)

No longer called after getBlobsV2 switched to batched
TryGetBlobsAndProofsV1.

Co-Authored-By: Marcin Sobczak <77129288+marcindsobczak@users.noreply.github.com>

* Feedback

* Spelling

* Add some const to JwtAuthentication to understand the code better

* Consolidate duplicated JSON-RPC request processing pipelines in Startup

Extract shared ProcessJsonRpcRequestCoreAsync and PushErrorResponseAsync
instance methods from the engine API fast lane and standard handler,
eliminating ~100 lines of duplicated processing logic. Unify status code
constants, auth error handling, and add streamable response support to
the standard path.

* Make BlobsV2DirectResponse enumerator explicit; pool byte[64] keys in BlobTxStorage

- Convert GetEnumerator to explicit interface implementation since it is
  only used by tests via IEnumerable<T> cast
- Add ConcurrentQueue-based pool for exact-size byte[64] DB lookup keys
  in TryGetMany to avoid per-call allocations

---------

Co-authored-by: Lukasz Rozmej <lukasz@nethermind.io>
Co-authored-by: Marcin Sobczak <77129288+marcindsobczak@users.noreply.github.com>
Co-authored-by: lukasz.rozmej <lukasz.rozmej@gmail.com>

* Fix BackgroundTaskScheduler queue overflow during block processing (#10488)

* Initial plan

* Fix BackgroundTaskScheduler queue overflow by removing signal wait from scheduler threads

During block processing, ManualResetEventSlim blocked all scheduler threads
in BelowNormalPriorityTaskScheduler, preventing StartChannel from draining
expired tasks. New tasks (P2P transaction messages) continued arriving,
filling the queue beyond capacity (1024) and triggering task drops.

Fix: Remove the ManualResetEventSlim signal entirely. The existing
cancellation token mechanism in StartChannel already handles block
processing correctly — expired tasks get drained with cancelled tokens
(fast return), while non-expired tasks are re-queued with a 1ms throttle
until their deadline passes or block processing ends.

Co-authored-by: kamilchodola <43241881+kamilchodola@users.noreply.github.com>

* Replace blocking ManualResetEventSlim with async TaskCompletionSource signal; add high-capacity stress test

The original ManualResetEventSlim blocked scheduler threads in
ProcessBackgroundTasks(), preventing StartChannel from draining expired
tasks during block processing. Replace with TaskCompletionSource-based
async signal awaited in StartChannel's Throttle path.

Add comprehensive stress test that fills a 1024-capacity queue across
multiple block processing cycles, verifying:
- Tasks are dropped when queue exceeds capacity
- Expired tasks drain with cancelled tokens during block processing
- Queue recovers and accepts new tasks after draining
- Mixed short/long-lived tasks behave correctly across cycles
- Queue remains fully operational after repeated block processing

Co-authored-by: kamilchodola <43241881+kamilchodola@users.noreply.github.com>

* Double BackgroundTaskMaxNumber default from 1024 to 2048

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Add BenchmarkDotNet benchmark for BackgroundTaskScheduler throughput

Adds BackgroundTaskSchedulerBenchmarks with two scenarios:
- ScheduleAndDrainDuringBlockProcessing: simulates real-world scenario
  with periodic block-processing pauses (5 cycles, 50ms each)
- ScheduleAndDrainWithoutBlockProcessing: baseline without interruptions

Parameters: capacity (1024/2048), concurrency (2), block processing
duration (50ms), cycles (5).

Also fixes flaky over-capacity assertion in stress test that raced
with the async task draining.

Co-authored-by: kamilchodola <43241881+kamilchodola@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kamilchodola <43241881+kamilchodola@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Update Dockerfiles (#10493)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* fix: unsubscribe from BlocksProcessing in Dispose (#10499)

Signed-off-by: Olexandr88 <radole1203@gmail.com>

* Fix Kute Windows performance: disable proxy detection, fix file check (#10491)

* Fix Kute Windows performance: disable proxy detection, fix file check

- Disable WPAD proxy auto-detection in HttpClient by using
  SocketsHttpHandler with UseProxy=false. On Windows, the default
  HttpClient triggers a WPAD lookup (~2s timeout) on every fresh
  process, inflating measured NP times by ~2000ms.
- Fix FileMessageProvider to use pathInfo.Exists instead of
  HasFlag(FileAttributes.Normal). On Windows, files have Archive
  attribute, not Normal, causing all file reads to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Update comment to remove 'WPAD' reference

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* chore: Remove unused code across multiple modules (#10440)

* claude experiments

* reverted changes

* Remove unused code

* fix: restore _logger field in TdxsClient to prevent CS9113 build error

The logManager parameter is DI-injected and cannot be removed, so the
field must remain to consume it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove unused EVM exception classes

BadInstructionException, InvalidCodeException, and
TransactionCollisionException are never instantiated anywhere in the
codebase. The EVM uses EvmExceptionType enums and CallResult directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: remove unused code (Phase 1)

- Delete 5 empty (0-byte) files in TxPool and Consensus
- Remove 7 unused private methods:
  - TrieStore.IsStillNeeded()
  - PatriciaTree.ThrowInvalidDataException/ThrowMissingChildException/ThrowMissingPrefixException
  - EthereumRunner.Stop()
  - EthereumL1Bridge.LogReorg()
  - Ssz.DecodeDynamicOffset() (moved VarOffsetSize to BasicTypes.cs)
- Remove 7 unused private/static fields:
  - TrieNode._nodeDecoder
  - PatriciaTree._singleByteKeys
  - PersistentStorageProvider._loadFromTreeStorageFunc
  - SmallTrieVisitContext._branchChildIndex
  - TdxsClient._logger
  - InitializeBlockchain._logManager
  - SyncProgressResolver._logger
- Remove 6 dead NDM/LES timeout constants from Timeouts.cs
- Remove 11 unused/duplicate ErrorCodes constants
- Remove 3 unused L1 epoch constants from EthereumL1Bridge
- Clean up unused using directives (System.IO, System)

* fix: remove unused logManager parameter from TdxsClient

Removes unused ILogManager parameter that was causing CI build failure.
The parameter was not used anywhere in the class after previous cleanup.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* refactor: remove unused types (Phase 2)

Delete 15 unreferenced type files identified through codebase-wide
static analysis:

Synchronization (5):
- AllocationChangeEventArgs
- StaticStrategy, NullStrategy, ClientTypeStrategy
- StrategySelectionType enum

Core (5):
- CompositePublisher, SortedRealList, ConcurrentWriteBatcher
- CappedArrayMemoryManager, ISpanCache

Serialization/Network/RPC (5):
- LogPublisher, CountingTextWriter, CountingTextReader
- IDiscoveryMsgSerializersProvider, IJsonRpcResult

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove unused logManager parameter from SyncProgressResolver constructor (#10452)

* Initial plan

* refactor: remove unused logManager parameter from SyncProgressResolver

Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: smartprogrammer93 <smartprogrammer93@users.noreply.github.com>
Co-authored-by: smartprogrammer93 <smartprogrammer@windowslive.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>

* fix(network): use TrySetResult in MessageQueue.Handle to prevent race condition (#10486)

* fix(network): use TrySetResult in MessageQueue.Handle to prevent race condition

* add tests

* Fixes

---------

Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>

* fix: fix operator precedence bug in VoteDecoder.GetContentLength (#10383)

Update VoteDecoder.cs

Co-authored-by: ak88 <anders@nethermind.io>

* ci: add automatic PR labeling workflow (#10512)

* ci: add PR auto-labeler workflow

Automatically labels PRs based on:
- Template checkbox selections (bugfix, feature, breaking, etc.)
- Conventional commit title prefixes (fix:, feat:, perf:, etc.)
- Changed file paths (evm, network, optimism, taiko, xdc, etc.)
- EIP mentions in title
- Dockerfile changes, chain configs, test-only PRs, removal-only PRs

* docs: require PR template usage in AGENTS.md

Clarify that PRs must follow the template format and tick the
type-of-change checkboxes, which drive automatic labeling.

* ci: use pull_request_target for PR labeler to support fork PRs

* ci: add DbModule.cs path rule for database label

* ci: add trie and state+storage path rules for PR labeler

* ci: match slash separator in title prefix (e.g. Perf/xdc)

* ci: add sync, snap sync path rules for PR labeler

* Remove redundant null check and duplicate array in Program.cs (#10506)

Update Program.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Use copy-on-write snapshots in MetricsController (#10501)

* fix(monitoring): use copy-on-write snapshots in MetricsController to prevent concurrent modification

Replace List<Action> and Dictionary iteration with volatile array snapshots
to prevent InvalidOperationException when RegisterMetrics or
AddMetricsUpdateAction races with the timer-driven UpdateAllMetrics.

* fix(monitoring): use copy-on-write snapshots in MetricsController to prevent concurrent modification

Replace List<Action> and Dictionary iteration with volatile array snapshots
to prevent InvalidOperationException when RegisterMetrics or
AddMetricsUpdateAction races with the timer-driven UpdateAllMetrics.

* chore: remove redundant AddDatabase for BlobTransactions (#10510)

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* perf: reduce block processing overhead via journal bypass and commit elimination

- Eliminate pre-execution Commit in TransactionProcessor for non-tracing, non-restore paths
- Add read-cache separation for StateProvider (bypass journal for pure reads)
- Add read-cache separation for PersistentStorageProvider (bypass journal for SLOAD)
- Reduce block-level commits from 4 to 3 (beacon root/blockhash accumulate with tx changes)
- Preserve full tracing correctness with fallback paths for Before values and storage reads

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* SyncInfo decoder for XDC p2p (#10509)

syncinfo decoder

* Revert "Merge branch 'master' of https://github.com/NethermindEth/nethermind into perf/block-processing-pipeline-v1"

This reverts commit 1d7dede, reversing
changes made to 46ae4aa.

* ci: add JsonRpc path pattern to PR labeler (#10526)

ci: add JsonRpc path pattern to PR labeler for automatic rpc label

Adds src/Nethermind/Nethermind.JsonRpc to the pathToLabel array
so PRs modifying JsonRpc files get automatically labeled with 'rpc'.

Co-authored-by: smartprogrammer93 <smartprogrammer93@users.noreply.github.com>

* Log index (#8464)

* Adjust `OnReceiptsInserted` logging

* Naming

* Normalize block number formatting

# Conflicts:
#	src/Nethermind/Nethermind.Facade/Find/LogIndexService.cs

* Build fix

* Code cleanup

* Use ancient receipts barrier for backwards sync target & include target values in RPC

* Adjust logging and waiting times

* Fresh start fix

* Adjust min target block calculation

* Fix repeated completion logging

* Temporary more logging again

* Try recover receipts

* Optimize processing of no-tx blocks

* Fir out-of-range error

* Fix receipts deletion (#9231)

* separate receipt deletion from receipt tx deletion

* regression test

* tidy test

---------

Co-authored-by: Marc Harvey-Hill <10379486+Marchhill@users.noreply.github.com>

* `logIndex_blockNumbers` RPC

* Logging tweaks

* [WIP] Support for topic index

* Remove key size dependencies

* Try compress key in both DBs

* Separate merge operator per column family

* Fixes

* Remove possible collisions as causing invalid merge order

* More fixes

* Constant db key postfix size & fixes

* Screw this, use separate DB per topic index

* Get rid of generic iterator interface

* Fixes for seeking, but getting block numbers is now much slower

* Code cleanup

* Do not remove leading zeroes & revert seeking

* Fix filter matching

* Tests fixes

* Move filter tests to separate class & code formatting

* Support for concurrent forward/backward sync & tests

* Fixes for concurrent sync & more aggresive test

* Code cleanup

* Fix log index syncing blocking other tasks

* Refactor syncing for better concurrency

* Increase receipts cache size to 1024

* Log receipts loading time

* Adjust parallelism values

* Track backward/forward syncing stats separately

* Revert "Increase receipts cache size to 1024"

This reverts commit 18a13d5.

* Set DB version

* Option to delay compressor start

* Include index version and reset data if version is invalid

* Log index compaction RPC

* todo

* Add missing service registration

* Remove "waiting for block" trace logging

* Do start indexing before DB initialization

* Code cleanup

* Fix double DB initialization

* Fix aggressive memory usage

* Stop on error

* todos

* Formatting

* Configuration for log-index & support for disabling/resetting index via config

* Updates to logIndex_status, include status, last-update-data, and last-error

* Replace last-update with `DateTimeOffset`

* Typo fix

* Syncing service small refactoring, fixes, and basic tests

* Fix repeated completion logging

* Adjust default `SyncFetchBatchParallelism`

* TurboPFor updates to match package version

* Build fix

* Configurable compression algorithm, handle if unsupported

* Support for `IWriteBatch` clearing

* Remove `RequireCommitWriteBatch`

* Throw if stopped

* Simplify `GetDbSize`

* Prevent DB corruption in case of mid-sync error & tests

* Remove stopping on error for now

* Updated compression-algo-change tests

* Formatting

* Small logging fix

* ~Temporary log completion time

* Configurable logging details

* Fix for invalid ranges concatenation

* Revert "~Temporary log completion time"

This reverts commit f3f631f.

* Additional check to prevent using block 0 as pivot

* Flag to verify eth_getLogs responses from index

* Build fix

* Switch to nuget package for TurboPFor

* Parallelize `LogIndexStorageFilterTests`

* Formatting

* Try fix `LogIndexServiceTests`

* TurboPFor package update

* Fix immediate backward sync completion

* Tests for `LogFinder` index range calculation

* Min number of blocks to use index

* PR cleanup

* Better handle write attempt during stopping

* Temporary fix for missing Nuget dependency

* PR cleanup

* Revert attempt to use `OneTimeTearDown`

* Optimize compressor memory usage

* Fail log index on background job error

* Dependency fix

* Take in-progress into account when waiting for compression

* Use array pool for compression

* Adjust background exception handling

* Adjust exception handling

* Move registrations

* Take sync direction from aggregation

* Remove first-block-added notification

* Remove testing methods

* Remove unused code & PR cleanup

* Formatting

* PR cleanup

* Namespace update

* PR cleanup

* Builder code cleanup

* Config update

* Remove RPC response verification

* PR cleanup

* Tests fix

* Disable index by default

* Tests fix

* Fix compaction being disabled

* Increase compaction logging level

* Make compression optional

* Remove completed TODO

* Logging updates

* Return RPC response verification flag with proper checks

* Build fix

* PR cleanup

* Naming update to match existing signatures

* Partial test run fix

* Logging tweak

* PR cleanup

* PR cleanup

* Move Merge to separate interface

* PR feedback

* Storage stability improvements & enable `OneTimeTearDown` in integration tests

* Receipts events renaming

* PR feedback

* Formatting

* Code cleanup

* Code cleanup

* Try make storage disposing thread-safe

* Do not throw from merge operator

* Disable `OneTimeTearDown` again

* Fix missing DB config

* Fix disposing in case of error in ctor

* Use sorted view instead of iterator

* Do not publicly expose iterator

* Code cleanup

* Revert changes to DB config reading

* PR feedback

* PR feedback

* PR feedback

* Build fix

* Cherry-pick updates

* Commit all columns via single batch, store metadata in separate table

* Fix saving redundant data to range bound

* DB config fix

* Code formatting

* Tests fix

* [WIP] block number enumerator (nested)

* [WIP] Fixing enumerator

* [WIP] Fixing enumerator

* Fixes, code cleanup & use array pool for enumerator value

* Code cleanup

* Visitor tests cleanup

* Formatting

* Simplify filter/expression updates

* Code cleanup

* Build fix

* Tests fix

* Code cleanup

* Remove `AscListHelper` as not needed

* Inline `UnionEnumerator`, v1

* Revert "Inline `UnionEnumerator`, v1"

This reverts commit 5b72543.

* More merge operator tests

* Code cleanup

* Update TurboPFor package

* Simplify `LogFinder`

* Build fix attempt

* Make `LogIndexFilterVisitor` enumerators internal

* Remove unused parameter

* Code cleanup

* Formatting

* Spelling

* Try make cspell happy

* Try make cspell happy

* Try make cspell happy

* Try make cspell happy

* PR fixes

* Test build fix

* PR fixes

* Move log-index features to inherited `IndexedLogFinder`

* Simplify `filter_all_logs_iteratively` test

* Formatting

* Simplify `StartLogIndex` step

* Block numbers copying optimization (little-endian only)

* Test fix

* Detailed in-code docs

* Doc tweaks

* More doc tweaks

* PR cleanup

* Make `GetBlockReceipts` a bit more explicit

* Build fix

* Spelling

* minor refactors

* more minor refactors

* minor refactor of Compressor - add alternative lookup to avoid allocation as long as possible in TryEnqueue

* simplifications in LogIndexStorage

* simplify semaphores

* move to stackalloc in LogIndexStorage where possible

* simplify merge operators to inline array

* correctly dispose ArrayPoolList in Merge tests

* more simple refactors

* In LogIndexBuilder replace Dictionaries iwth Direction

* Simplify UnionEnumerator

* Removed linq from IndexedLogFinder

* Code cleanup

* Simplify DBs initialization

* Code cleanup

* PR feedback

* Code cleanup

* Remove `storage` parameter from `LogIndexEnumerator`

* Add complex LogIndex integration tests (#10425)

* Add complex LogIndex integration tests for reorgs, concurrency, and error propagation

- Add Concurrent_ReorgAndBackwardSync_Get_Test: validates concurrent reorg
  and backward sync using different semaphores without deadlocks or data corruption
- Add Set_ReorgOutOfOrder_Get_Test: documents that descending-order reorgs are
  unsupported (MergeOperator only applies first Reorg operand per key by write order)
- Add Set_BackgroundJobFailure_SubsequentOps_Test: verifies MergeOperator errors
  propagate via OnBackgroundError and permanently fail all subsequent operations
- Add BackgroundFailingLogIndexStorage test subclass that injects corrupt merge
  operands to trigger LogIndexStateException in MergeOperator
- Remove resolved TODO comments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* minor test refactors

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix

* Code cleanup

* More code cleanup

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Alex Bespalov <alexb5dh@gmail.com>

* Simplify Compactor concurrency with Channel<T> (#10424)

* Simplify Compactor concurrency with Channel<T>

Replace AutoResetEvent/ManualResetEvent synchronization with a
bounded Channel<TaskCompletionSource?>, reducing complexity and
removing the WaitOneAsync extension dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix error propagation in Compactor catch block

Use TrySetException(ex) for real exceptions so ForceAsync() callers
observe the actual error. Keep TrySetCanceled() only for
OperationCanceledException.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Address PR review comments

- Coalesce concurrent ForceAsync() calls into a single compaction via
  a shared TaskCompletionSource, preserving the old behavior.
- Use TrySetException instead of TrySetCanceled for non-cancellation
  errors so callers observe the actual exception.
- Add debug log for compaction loop cancellation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Make ForceAsync exclusive

* whitespace

* Add Compactor.Dispose

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Adjust ordering

* Add comments and prepare `Compactor` for tests

* Some `Compactor` tests

* Spelling

* Spelling dictionary update

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Alex Bespalov <alexb5dh@gmail.com>

* [WIP] use `PruningConfig.PruningBoundary` as default reorg depth

* Use `PruningConfig.PruningBoundary` as default reorg depth

* Take `PruningBoundary` before it's overwritten via `SnapServingMaxDepth`

* Revert test change

* Flaky test fix

---------

Co-authored-by: Marc <Marchhill@users.noreply.github.com>
Co-authored-by: Marc Harvey-Hill <10379486+Marchhill@users.noreply.github.com>
Co-authored-by: lukasz.rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Auto-update fast sync settings (#10535)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* Update OP Superchain chains (#10536)

Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>

* fix: fix malformed RLP encoding in L1OriginDecoder (#10525)

* Update L1OriginDecoder.cs

* Update L1OriginStoreTests.cs

* Update SurgeGasPriceOracle for Surge Shasta (#10290)

* SurgeGasPriceOracle updates for Shasta

* minor fixes

* more minor fixes

* Resolve comments

---------

Co-authored-by: Nurbakyt Madibek <jmadibekov@gmail.com>

* Estimate Gas fix (#10559)

* Estimate Gas fix

* format

* format

* test fix

* Update src/Nethermind/Nethermind.Blockchain.Test/TransactionProcessorTests.cs

* Update src/Nethermind/Nethermind.Evm.Test/Tracing/GasEstimationTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix shared method

---------

Co-authored-by: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* test(evm): add extcode cache regressions for in-block code changes

---------

Signed-off-by: Olexandr88 <radole1203@gmail.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: core-repository-dispatch-app[bot] <173070810+core-repository-dispatch-app[bot]@users.noreply.github.com>
Co-authored-by: rubo <rubo@users.noreply.github.com>
Co-authored-by: Carmen Irene Cabrera Rodríguez <49727740+cicr99@users.noreply.github.com>
Co-authored-by: Stavros Vlachakis <89769224+svlachakis@users.noreply.github.com>
Co-authored-by: Amirul Ashraf <asdacap@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Ben {chmark} Adams <thundercat@illyriad.co.uk>
Co-authored-by: Nurbakyt Madibek <jmadibekov@gmail.com>
Co-authored-by: ak88 <anders@nethermind.io>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
Co-authored-by: Marek Moraczyński <marekm2504@gmail.com>
Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>
Co-authored-by: VolodymyrBg <aqdrgg19@gmail.com>
Co-authored-by: splinter <futons_blare_7s@icloud.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Alexey Osipov <me@flcl.me>
Co-authored-by: phrwlk <phrwlk7@gmail.com>
Co-authored-by: Nova ✰⋆⁺ <novaheidt@gmail.com>
Co-authored-by: Lukasz Rozmej <lukasz@nethermind.io>
Co-authored-by: Marcin Sobczak <77129288+marcindsobczak@users.noreply.github.com>
Co-authored-by: Olexandr88 <radole1203@gmail.com>
Co-authored-by: smartprogrammer93 <smartprogrammer93@users.noreply.github.com>
Co-authored-by: smartprogrammer93 <smartprogrammer@windowslive.com>
Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>
Co-authored-by: andrewshab <152420261+andrewshab3@users.noreply.github.com>
Co-authored-by: 0xFloki <signal-rooms-7n@icloud.com>
Co-authored-by: Forostovec <ilonaforostovec22@gmail.com>
Co-authored-by: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com>
Co-authored-by: Alex <alexb5dh@gmail.com>
Co-authored-by: Marc <Marchhill@users.noreply.github.com>
Co-authored-by: Marc Harvey-Hill <10379486+Marchhill@users.noreply.github.com>
Co-authored-by: bobtajson <152420524+bobtajson@users.noreply.github.com>
Co-authored-by: Diptanshu Kakwani <dipkakwani@gmail.com>
kamilchodola added a commit that referenced this pull request Feb 27, 2026
* feat(abi): add support for fixed-size array element types (#10025)

* XDC Reward handler (#9881)

* calculator

* state reader

* masternode voting contract

* fix

* abi json

* working load test

* test

* test

* test getCandidates

* cleanup

* format

* remove var

* format

* review comments

* implement calculate rewards base flow and get signing txs

* implement rewards per signer and distribution calculations

* implement getCadidateOwner

* refactors and add comments to the code

* add block signer contract address to the configuration spec

* implement reward module tests

* implement hook for reward calculation in hotstuff pipeline

* refactor and format

* format

* fix xdc test

* wire IRewardClaculator in ConfigureContainer in XdcTestBlockchain

* address review comments and add unit test with precalculated xdc reward values

* add missing dependencies in Xdc module

* fix resolving contract addresses from spec

* fix error with WorldState after merge

* add comments for reward tests with link to original source

---------

Co-authored-by: ak88 <anders.holmbjerg@hotmail.com>
Co-authored-by: ak88 <anders@nethermind.io>

* Use baseblock for tree visitor (#10066)

* Surge: Fix Profitabilty Check Bypass (#10020)

* add potential fix

* nit: improve config description

* Skip SST file size checks when MaxOpenFiles is specified (#10002)

* Skip SST file size checks when MaxOpenFiles is specified

* Add config option, skip SST checks on MacOS if not configured otherwise

* Remove obvious comment

* Fix: Correct memory access validation in TrySaveByte for MSTORE8 operation (#9970)

* Update EvmPooledMemory.cs

* Update src/Nethermind/Nethermind.Evm/EvmPooledMemory.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Evm/EvmPooledMemory.cs

* Update src/Nethermind/Nethermind.Evm/EvmPooledMemory.cs

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update file header templates (#10077)

* Should update child if parent has empty keccak as well (#10073)

* Should update child if parent has empty keccak as well

* Combine conditions

* Improve FastHash quality (#10082)

* Improve hash quality

* formatting

* Update src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: replace HexConvert.ToUInt256 with UInt256.Parse (#10085)

Keep HexConvert.ToUInt64 as it handles both base 10 and 16 automatically.

* fix: ensure eth_getBlockByNumber enforces canonical block retrieval (#10024)

* fix: ensure eth_getBlockByNumber enforces canonical block retrieval

* fix tests

* address comment

* apply suggestion

* Auto-update fast sync settings (#10089)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* fix: correct assertion variables in Cleans_invalid_blocks_before_starting test (#10086)

Update BlockTreeTests.cs

* Drop eth66 and eth67 support, add eth69 as a default (#9938)

* Drop eth66 and eth67 support

* Fix tests

* test

* bump versions

* Fix E2ESyncTests failures when isPostMerge=false - remove eth/69 from default capabilities (#10103)

* Initial plan

* Remove eth/69 from default capabilities - added dynamically by MergePlugin

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Fix test expecting eth/69 as highest default protocol version

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* fix

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* fix(network): shutdown rlpx executor group (#10087)

* feat (gas policy): add `ConsumeCodeCopyGas` method (#10068)

* Add Address recovery from PublicKey to KeccakCache (#10003)

* Add Address recovery from PublicKey to KeccakCache

* Improve comments

* Feedback

* refactor: remove unused Destroy change type from storage provider (#10106)

* Update to UInt256 version 1.4.0 (#10107)

* Update to UInt256 version 1.4.0

* Fix some div zero

* chore: remove debug-only keccak keys from proof call storage test (#10104)

* fix: use parameter name in BloomStorage null check (#10096)

* fix: correct ExampleResponse for admin_importHistory method (#10097)

Update IEraAdminRpcModule.cs

* fix: remove redundant blockInfosDb assertions (#10099)

Update BlockTreeTests.cs

* perf: reuse SimpleConsoleLogger instance in SimpleConsoleLogManager (#10070)

Update SimpleConsoleLogManager.cs

* optimize eth_gasPrice using kth algorithm (#10100)

* optimize eth_gasPrice using kth algorithm

* fix: review nethermind

---------

Co-authored-by: weixie.cui <weixie.cui@okg.com>

* Don't queue prunes (#10112)

* Don't queue prunes

* Add delay

* Add Delay reasoning comment

* refactor: simplify Avx2 branches for UInt256 shuffles (#10111)

* refactor: simplify Avx2 branches for UInt256 shuffles

* Update EvmStack.cs

* fix(kute): prevent null label crash in Prometheus metrics reporter (#10109)

* Fix #10068 regression (#10116)

* Git/ignore claude config (#10118)

* Ignore claude config in git

* Ignore claude config in git

* perf: use cached BlockInfo variable instead of redundant array access in BlockTree (#10125)

Update BlockTree.cs

* Save space locally on builds (#10113)

* Add Directory.Build.targets with:

- Skip copying dependencies and native runtimes for library projects
- Filter native runtimes to current OS only during local builds
- Share native runtimes across projects during local builds with a shared location and junctions/symlinks

* NethermindCopyAllRuntimes -> CI

* Remove filtering native lib by os

* Move Directory.Build.targets to src/Nethermind

* Make mechanism opt-in with SlimBuild parameter

Add Directory.Build.targets to Solution Items

* SlimBuild can have any value to be enabled

* Refactor Directory.Build.targets (#10122)

---------

Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

* Align Nethermind with the latest taiko-geth changes (#10127)

* Surge TDX Attestation (#9954)

* initial changes for taiko tdx

* fixes and refactoring

* optimize attestation

* simplify attestation, return block header and add tests

* add two variants for attestation, remove quotes & instance id, add tests

* remove docs

* minor fix

* modify header attestation to return both hash and header rlp

* refactor

* fix tests and address comments

* nit: fix whitespace

* undo tdx module change

* modify signature to use blockhash+stateroot

* fix new header serialization

* address comments

---------

Co-authored-by: smartprogrammer93 <smartprogrammer@windowslive.com>

* Remove redundant `File.Delete` after `File.Move` (#10128)

* refactor: simplify conditional returns in FeeTooLowFilter (#10129)

* refactor: remove unused finalization manager field in Optimism plugin (#10130)

* Optimize discv5 (#10081)

* Update schema

* Fix schema

* No need in type cast

* Use improved discv5; refactor

* Update PierTwo.Lantern.Discv5.WireProtocol

* Less errors

* Pooled

* refactor: remove unused `_pushEnabled` from MonitoringService (#10135)

refactor: remove unused _pushEnabled from MonitoringService

* Add some guards to RetryCache (#10134)

* Add some guards to RetryCache

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Marcos Antonio Maceo <35319980+stdevMac@users.noreply.github.com>

* XDC save snapshot on gap block (#9774)

* start

* state reader

* state reader

* masternode voting contract

* fix

* blocktree saves snapshot on gap

* abi json

* working load test

* test

* test

* test getCandidates

* cleanup

* format

* update masternodes

* hooked up with deposit contract

* remove var

* format

* review comments

* format

* test rewrite

* test fix

* format

* test save snapshot on head block

* merge fix

* cleanup

* merge fix

* merge fix

* merge fix

* remove using

* remove class

* fix MasternodeVotingContract IOC

* perf: Remove redundant allocations in NettyDiscoveryHandlerTests (#10155)

Update NettyDiscoveryHandlerTests.cs

* fix: correct header range logging in PoW forward sync (#10140)

Update PowForwardHeaderProvider.cs

* fix: avoid GetReceiptData when hash lookup unsupported (#10023)

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* fix: correct slice index in Address.TryParseVariableLength (#9902)

* fix: correct slice index in Address.TryParseVariableLength

* test

* update test

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Update src/Nethermind/Nethermind.Core.Test/AddressTests.cs

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* perf(facade): optimize SimulateDictionaryHeaderStore.Get for cache hits (#9903)

* fix: add informative message to block processing timeout exception (#9912)

Update HiveRunner.cs

* fix: Remove invalid eth_getTransactionByHash call (#9784)

* Fix typos 2 (#10162)

* Few typos fixed

* Check in the pipeline

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove

* Some fixes

* Test

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: remove duplicate transaction processor adapter registration (#10170)

* perf: avoid extra init code allocations in CREATE/EOFCREATE (#10019)

* perf: avoid extra init code allocations in CREATE/EOFCREATE

* perf: avoid extra init code allocations in CREATE/EOFCREATE

* Replace empty array initializations with Array.Empty<T>() (#10172)

* Initial plan

* Replace empty array initializations with Array.Empty<T>()

Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>

* Replace new Address[0] with Array.Empty<Address>() in Xdc production code

Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>

* Fix disposing of a pooled array (#10168)

* fix(SendBlobs): add missing receiverOption to reclaim command (#10136)

* Auto-update fast sync settings (#10179)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* fix(sync): use INetworkConfig constructor for SyncPeerPool DI registration (#10158)

* fix(sync): use INetworkConfig constructor for SyncPeerPool DI registration

SyncPeerPool was ignoring the configured MaxActivePeers value and always
using a hardcoded default of 100 peers.

Root cause: SyncPeerPool has two constructors:
1. One taking INetworkConfig that reads ActivePeersMaxCount from config
2. One with default parameters (peersMaxCount = 100)

The DI registration `.AddSingleton<SyncPeerPool>()` allowed Autofac to
pick a constructor automatically. Autofac selected the constructor with
default parameters, completely bypassing INetworkConfig. This caused
SyncPeerPool.PeerMaxCount to always be 100 regardless of the configured
Network.MaxActivePeers value.

Fix: Use explicit factory registration that specifies INetworkConfig as
a dependency, ensuring the correct constructor is called with config values.

* refactor: use UseConstructorForDependencyInjection attribute and add test

* refactor(tools): eliminate redundant First() calls in HiveConsensusWorkflowGenerator (#10182)

Update Program.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* docs: fix dead link (#10181)

Update ForkchoiceUpdatedV1Result.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Remove redundant ToArray calls in eth_accounts (#10185)

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Override default CLI option alias (#10148)

Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

* Add AGENTS.md (#10177)

* Fix cannot prune storage root (#10203)

* Fix cannot prune storage root

* Fix whitespace formatting in TreeStoreTests.cs (#10204)

* Initial plan

* Fix whitespace formatting in TreeStoreTests.cs

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Support CLI alias overrides in docs (#10197)

* Fast-path ConcurrentDict AddOrUpdate (#10220)

* Fast-path ConcurrentDict AddOrUpdate

* Also debug

* Reuse same nibble keys for short paths (#10214)

* Reuse same nibble keys for short paths

* Address review comments: remove unused parameter, add XML docs, add unit tests for GetPathArray (#10215)

* Initial plan

* Address review comments: remove unused parameter, add XML docs, add unit tests

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* formatting

* Other places

* formatting

* More optimal

* Add tests for PrependNibble and ConcatNibbles methods (#10216)

* Initial plan

* Add comprehensive tests for PrependNibble and ConcatNibbles methods

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Fix misleading comments in ConcatNibbles tests

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Add validation checks to ConcatNibbles for invalid nibble values (#10217)

* Initial plan

* Add validation checks to ConcatNibbles for robustness

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Trie/HexPrefix.cs

Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

* Update Dockerfiles (#10222)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* Change async capturing closures to regular async methods (#10221)

* Change async capturing closures to regular async methods

* Formatting

* Spelling

* Reduce closure allocations in RetryCache (#10223)

* Reduce closure allocations in RetryCache

* Feedback

* perf: Avoid unnecessary base fee calculations (#10213)

* Update OP Superchain chains (#10178)

Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Remove redundant static metadata from `CachedPrecompile` wrapper (#10225)

Update CachedCodeInfoRepository.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* refactor: extract duplicate chain ID retrieval logic in SendBlobs CLI (#10150)

Update SetupCli.cs

* perf: avoid eager client id formatting in ZeroNettyP2PHandler (#10189)

* perf: avoid eager client id formatting in ZeroNettyP2PHandler

* Update src/Nethermind/Nethermind.Network/P2P/ProtocolHandlers/ZeroNettyP2PHandler.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* add GetClientId  and remove duplication

* Apply suggestions from code review

* Apply suggestion from @LukaszRozmej

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* fix: align storage tracing flag for ReportStorageChange (#10201)

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* fix(test-runner): Use maxPriorityFeePerGas for EIP-1559 state test parsing (#10205)

For EIP-1559+ transactions, GasPrice is aliased to MaxPriorityFeePerGas
in go-ethereum. When parsing state tests, use maxPriorityFeePerGas from
JSON when available, falling back to maxFeePerGas if not specified.

This aligns Nethermind's state test parsing behavior with go-ethereum.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alexey Osipov <me@flcl.me>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* fix: gRPC client reconnect to shutdown previous channel (#10156)

* fix: gRPC client reconnect to shutdown previous channel

* Update src/Nethermind/Nethermind.Grpc/Clients/GrpcClient.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Update src/Nethermind/Nethermind.Grpc/Clients/GrpcClient.cs

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* perf: eliminate redundant allocations in SendData byte normalization (#10154)

Update BlobSender.cs

* refactor: split ClHealthTrackerTests into separate test methods (#10171)

* Update ClHealthTrackerTests.cs

* Update ClHealthTrackerTests.cs

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Optimize `PathUtils` (#10219)

* Use `ConcurrentDictionary.GetOrAdd` in `Session` to avoid manual get-or-add logic (#10229)

Update Session.cs

* Allow some delays to be configurable (#10227)

* Allow some delays to be configurable

* Always async

* Formatting

* Update src/Nethermind/Nethermind.Merge.Plugin/IMergeConfig.cs

Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Db/IPruningConfig.cs

Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

---------

Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

* Schedule largest storage changes first (#10236)

* Schedule largest storage changes first

* Feedback

* fix: SyncDispatcher leak by disposing CountdownEvent (#10240)

* Move default implementations out of IReleaseSpec (#10237)

* Move default implementations out of IReleaseSpec

* fix some test

* Update src/Nethermind/Nethermind.Core/Specs/IReleaseSpecExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix more tests

* Cleanup ISpecProvider.GetSpec

* fix test

* less whitespace

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix `PathUtils` for JetBrains Rider (#10238)

* Apply a workaround for JetBrains Rider

* Don't use `System.Diagnostics`

* Fix formatting

* Optimize storage key handling (#10241)

* Optimize storage key handling

Replaces byte[] with ValueHash256 for storage key lookup and computation in StorageTree for improved type safety and performance. Updates related method signatures and usages to use ValueHash256. Adds [SkipLocalsInit] attribute to several performance-critical methods in trie and pruning code.

* Feedback

* fix: avoid mutating levels in header/body existence checks (#10157)

* fix: Add missing fields to Transaction.CopyTo and PoolPolicy.Return (#9890)

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Consider genesis in processing and finalization (#10235)

* Refactor/Allow metrics before block processing (#10076)

* Invert metric dependencies

* Use timer loop

* Rename metrics updater

* Comment

* Reduce change

* Reduce change

* Unit tests

* Some cleanup

* Fix dependencies

* Add missing file header

* Update src/Nethermind/Nethermind.Init/Modules/MonitoringModule.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Update src/Nethermind/Nethermind.Init/Steps/EthereumStepsManager.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Split the monitoring module out

* Use BlockEventArgs

* Whitespace

* Address PR review comments: fix comment and remove unused method (#10084)

* Initial plan

* Address PR review comments: update comment and remove StopAsync

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Move db monitoring outside

* Fix build

* [WIP] Refactor to allow metrics before block processing (#10186)

* Initial plan

* Fix filename format issue: remove trailing space from IMonitoringService.cs

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Does this fix format?

---------

Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Fix maybe combine logic fetch child with wrong path. (#10145)

* Fix maybe combine logicc missed a fetch node

* Fix typo in test class name: StrictRawScopedTrieStoce → StrictRawScopedTrieStore (#10146)

* Initial plan

* Fix typo in class name: StrictRawScopedTrieStoce -> StrictRawScopedTrieStore

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Feature/RocksDb Snapshot (#10080)

* Snapshot support

* Move logic to db reader

* Ensure get is used

* Add comment on verify checksum

* Format

* Address PR #10080 review comments: fix memory leaks, improve documentation, add safety checks (#10083)

* Initial plan

* Address review comments: fix docs, memory leaks, and add safety checks

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Remove unused _readOptions field from RocksdbSortedView

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Use discard pattern for unused readOptions parameter

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Remove unnecessary readOptions parameter from RocksdbSortedView

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Make nullable

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Bump default pruning cache by 512MB for larger mainnet blocks (#10247)

Bump default pruning cache by 512MB

* Fix: Change Taiko RPC Response to PascalCase (#10244)

change case

* perf(clique): eliminate redundant cache lookup in GetBlockSealer (#10252)

Update SnapshotManager.cs

* Skip GC when pruning (#10230)

* Skip GC when pruning

* fix

* feedback

* Auto-update fast sync settings (#10260)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* Update OP Superchain chains (#10261)

Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>

* Fix/shared blockcache not used (#10263)

* Cleaner optimize for hits

* Columns db snapshot

* Fix block cache

* Fix test

* Fix test

* Fix build

* Spell fix

* Refactor HyperClockCacheWrapper to use SafeHandle pattern (#10265)

* Initial plan

* Refactor HyperClockCacheWrapper to use SafeHandle pattern

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* ColumnsDb snapshot (#10262)

* ColumnsDb snapshot

* Apply PR feedback: use NotSupportedException and simplify lambda syntax (#10264)

* Initial plan

* Apply PR feedback: use NotSupportedException and simplify lambda syntax

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Refactor ReleaseSpec (#10251)

* Add taiko debug RPC for integration test support (#10211)

* Add taikoAuth_waitForTxPoolSync method

* Revert unnecessary changes

* Update src/Nethermind/Nethermind.TxPool/ITxPool.cs

* Update src/Nethermind/Nethermind.TxPool/TxPool.cs

* Update src/Nethermind/Nethermind.TxPool/HashCache.cs

* Resolve comments

* Simplify, remove needless logic, and rename

* Resolve comments

---------

Co-authored-by: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com>

* feat(tracing): enable external tracer registration and VM inheritance (#10228)

* Re-enable prewarmer tx adapter for state pre-warming (#10266)

Enable prewarmer tx adapter for state pre-warming

* Validate state test tx as part of a block (#10224)

* Add basic block validation to state tests

* Some cleanup

* Fix review

* Add ProgressLogger to trie verification and full pruning operations (#10273)

* docs: add implementation plan for ProgressLogger trie visitor integration

Addresses #8504 - More use of ProgressLogger

Detailed step-by-step plan with:
- VisitorProgressTracker class implementation
- Unit tests for thread-safety and accuracy
- Integration into CopyTreeVisitor and TrieStatsCollector

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(trie): add VisitorProgressTracker for path-based progress estimation

Addresses #8504 - More use of ProgressLogger

- Tracks visited path prefixes at 4 levels (16 to 65536 granularity)
- Thread-safe for concurrent traversal
- Estimates progress from keyspace position, not node count

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(trie): add unit tests for VisitorProgressTracker

Tests cover:
- Progress tracking at different levels
- Thread-safety with concurrent calls
- Monotonically increasing progress
- Edge cases (short paths, empty path)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(pruning): integrate VisitorProgressTracker into CopyTreeVisitor

Replaces manual every-1M-nodes logging with path-based progress estimation.
Progress now shows actual percentage through the keyspace.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Improve TrieStatsCollector progress display

- Always enable progress tracking in TrieStatsCollector
- Add custom formatter to show node count instead of block speed
- Track max reported progress to prevent backwards jumps
- Display format: "Trie Verification  12.34% [...] nodes: 1.2M"

Fixes progress display issues where:
- Progress would jump backwards (12% → 5%) due to granularity switching
- Showed confusing "Blk/s" units for trie operations
- Displayed "11 / 100 (11.00%)" format that looked odd

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* docs: remove implementation plan documents

Implementation is complete, no need for plan docs in the codebase.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Track both state and storage nodes in progress display

The node count now includes both state and storage nodes, providing
a more accurate representation of total work done. Progress estimation
still uses state trie paths only.

Changes:
- Add _totalWorkDone counter for display (state + storage nodes)
- Add isStorage parameter to OnNodeVisited()
- Always increment total work, only track state nodes for progress

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Optimize progress tracking with active level and startup delay

Improvements:
- Add 1 second startup delay before logging to prevent early high
  values from getting stuck in _maxReportedProgress
- Only track the deepest level with >5% coverage (active level)
- Stop incrementing counts for shallower levels once deeper level
  has significant coverage
- This ensures progress never shows less than 5% and provides
  more accurate granularity

Technical changes:
- Add _activeLevel field to track current deepest significant level
- Add _startTime field and skip logging for first second
- Only increment seen counts at active level or deeper
- Automatically promote to deeper level when >5% coverage reached

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Simplify progress tracking to only use level 3 with leaf estimation

Changed to a much simpler approach as requested:
- Only track progress at level 3 (4 nibbles = 65536 possible nodes)
- For nodes at depth 4: increment count by 1
- For LEAF nodes at shallower depths: estimate coverage
  - Depth 1: covers 16^3 = 4096 level-3 nodes
  - Depth 2: covers 16^2 = 256 level-3 nodes
  - Depth 3: covers 16^1 = 16 level-3 nodes
- Non-leaf nodes at shallow depths: don't count (will be covered by deeper nodes)
- Keep 1 second startup delay to prevent early high percentages

This assumes the top of the tree is dense and provides accurate
progress estimation based on actual trie structure.

Updated tests to mark nodes as leaves where appropriate.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix full pruning progress tracking

- Pass isStorage and isLeaf parameters in CopyTreeVisitor
- Storage nodes no longer contribute to state trie progress estimation
- Leaf nodes at shallow depths now correctly estimate coverage
- Increase startup delay to 5 seconds AND require at least 1% progress
- Prevents early high estimates from getting stuck in _maxReportedProgress

This fixes the issue where full pruning progress would immediately jump
to 100% and not show meaningful progress during the copy operation.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Simplify VisitorProgressTracker to single-level tracking

Since we only track level 3 (4 nibbles), remove unnecessary array
structure:

- Replace int[][] _seen with int[] _seen (65536 entries)
- Replace int[] _seenCounts with int _seenCount
- Replace int[] MaxAtLevel with const int MaxNodes
- Rename MaxLevel to Level3Depth for clarity

This reduces memory allocation from 70,304 ints (16+256+4096+65536)
to just 65,536 ints, and makes the code clearer.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Remove unnecessary _seen array from VisitorProgressTracker

Since OnNodeVisited is only called once per path, we don't need to
track which prefixes we've seen. Just increment _seenCount directly.

This eliminates the 65536-int array, reducing memory from 262KB to
just a few counters.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Remove _maxReportedProgress and allow progress to reverse

- Remove _maxReportedProgress field and backwards-prevention logic
- Report actual progress value even if it goes backwards
- Fix path.Length check: only count nodes at exactly Level3Depth
- Ignore nodes at depth > Level3Depth for progress calculation
- Simplify comment about startup delay

Progress should reflect reality, not be artificially constrained.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix lint

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* feat: enable taiko client CI integration tests (#10043)

* feat: enable taiko client ci integration tests

* fix: gh action structure to run l2_nmc locally

* feat: add path for ci-taiko file

* Update GitHub Actions checkout reference surge-taiko-mono

* fix: remove unused IStateReader from SnapServer (#10282)

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* StateProvider: remove redundant state-root update flag assignment in balance updates (#10268)

Update StateProvider.cs

* refactor: eliminate delegate allocations in DbOnTheRocks iterator methods (#10209)

Update DbOnTheRocks.cs

* Warmup threads should not update tx.SpentGas (#10267)

Warmup threads do not update tx.SpentGas

* Remove mark persisted recursively (#10283)

* Remove mark persisted

* Whitespace

* Test project tests to be split in chunks and run in parallel (#10243)

* Test in chunks

* Test

* Sequential

* Test

* Simplify

* Update OP Superchain chains (#10315)

Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>

* Auto-update fast sync settings (#10314)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* fix(chainspec): add Prague support to spaceneth dev chain (#10316)

* fix(chainspec): add maxCodeSize to spaceneth for EIP-3860

* fix(chainspec): add explicit chainID to spaceneth

* fix(chainspec): add Prague system contracts to spaceneth genesis

* Warn when dirty prune cache is too low (#10143)

* Initial plan

* Add warning when dirty prune cache is too low

When the dirty prune cache is too low, pruning cannot effectively reduce
the node cache, causing it to keep re-pruning with little progress.
This change adds a warning when the pruning cache size after pruning
is more than 80% of its size before pruning, suggesting to increase
the pruning cache limit.

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Extract magic number to named constant

Extract the 0.8 threshold to PruningEfficiencyWarningThreshold constant
for better code readability and maintainability.

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Mention --Pruning.DirtyCacheMb argument in warning message

Updated the warning message to include the specific command-line
argument (--Pruning.DirtyCacheMb) that users can use to increase
the pruning cache limit.

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Include recommended cache size in warning message

Added calculation and display of recommended dirty cache size
(current size + 30%) in the warning message to provide users
with a concrete value to set.

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Update warning threshold to 0.9 and use lowercase argument format

Changed PruningEfficiencyWarningThreshold from 0.8 to 0.9 (now warns
when retention ratio > 90% instead of > 80%). Updated argument format
in warning message from --Pruning.DirtyCacheMb to --pruning-dirtycachemb.

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Optimize warning check and add guard for sparse networks

- Move _logger.IsWarn check to outer if statement to skip calculations
  when logging is disabled
- Add minimum threshold (256MB) to prevent false positives on sparse
  networks with many empty blocks
- Addresses code review feedback from @LukaszRozmej

Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Remove 256MB threshold and add cspell ignore for CLI args

- Removed 256MB minimum threshold as function is only called when
  memory exceeds pruning threshold (per @asdacap feedback)
- Added cspell ignore rule for command-line arguments pattern
  (--something-something) to fix cspell warnings
- Addresses feedback from @LukaszRozmej, @asdacap, and @flcl42

Co-authored-by: flcl42 <630501+flcl42@users.noreply.github.com>

* Simplify cspell regex to match exactly two-word CLI flags

Changed pattern from /--[a-z]+(-[a-z]+)*/gi to /--[a-z]+-[a-z]+/gi
since all CLI flags are always exactly two words (e.g., --pruning-dirtycachemb).
Addresses feedback from @flcl42.

Co-authored-by: flcl42 <630501+flcl42@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
Co-authored-by: Amirul Ashraf <asdacap@gmail.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: flcl42 <630501+flcl42@users.noreply.github.com>

* refactor: remove redundant null checks in SnapProviderHelper.AddAccountRange (#10298)

Update SnapProviderHelper.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* fix(txpool): remove redundant hasBeenRemoved check in RemoveTransaction (#10319)

* fix(sync,trie): Handle timeout exceptions and empty trie sealing in PoW sync (#10307)

* fix(sync): Handle OperationCanceledException as timeout in PowForwardHeaderProvider

## Problem

PoW chain sync (ETC, etc.) stops completely after a single header request
timeout when running in DEBUG mode. The sync stalls with "SyncDispatcher
has finished work" even though blocks remain to sync.

## Root Cause

Commit cc56a0333f ("Reduce exceptions in ZeroProtocolHandlerBase") changed
timeout handling from throwing TimeoutException to calling TrySetCanceled():

```csharp
// Before: throw new TimeoutException(...);
// After:  request.CompletionSource.TrySetCanceled(cancellationToken);
```

This was a performance optimization to reduce exception overhead, but it
changed the contract: callers expecting TimeoutException now receive
OperationCanceledException (via TaskCanceledException).

PowForwardHeaderProvider only caught TimeoutException:

```csharp
catch (TimeoutException)
{
    syncPeerPool.ReportWeakPeer(bestPeer, AllocationContexts.ForwardHeader);
    return null;
}
```

The uncaught OperationCanceledException propagates to BlockDownloader which,
in DEBUG mode, re-throws it:

```csharp
#if DEBUG
    throw;      // DEBUG: propagates, kills sync
#else
    return null; // RELEASE: swallows error, sync continues
#endif
```

SyncDispatcher interprets OperationCanceledException as "sync was cancelled"
and calls Feed.Finish(), stopping sync permanently.

## The Fix

Add a catch for OperationCanceledException with a guard clause:

```csharp
catch (OperationCanceledException) when (!cancellation.IsCancellationRequested)
{
    syncPeerPool.ReportWeakPeer(bestPeer, AllocationContexts.ForwardHeader);
    return null;
}
```

The condition `when (!cancellation.IsCancellationRequested)` distinguishes:
- Protocol timeout: original token NOT cancelled → handle as weak peer
- Real sync cancellation: original token IS cancelled → propagate exception

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(trie): Mark BlockCommitSet as sealed even when root is null

BlockCommitSet.IsSealed returned `Root is not null`, which was false for
empty state tries where root is null. This caused a Debug.Assert failure
in TrieStore.VerifyNewCommitSet when running in Debug mode, as the
assertion checked that the previous BlockCommitSet was sealed before
starting a new block commit.

An empty state trie with Keccak.EmptyTreeHash is valid (e.g., genesis
blocks with no allocations). Changed IsSealed to use a separate _isSealed
flag that is set when Seal() is called, regardless of whether the root
is null.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Apply suggestions from code review

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* fix(Trie): Correct log level check in PrunePersistedNodes (#10310)

Update TrieStore.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* fix: correct off-by-one in ArrayPoolListCore.RemoveAt (#10306)

* fix: correct off-by-one in ArrayPoolListCore.RemoveAt

* add test

* Update src/Nethermind/Nethermind.Core/Collections/ArrayListCore.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Optimization/prewarmer per sender (#10330)

* Prewarm in groups per sender - simplifies nonce management, can rely on previous state - higher success count

* Simplification and cancellation

* refactor

* refactor: remove duplicate GetBlockNumPrefixedKey in BlockStore (#10337)

* Fix higher than expected pruning cache memory during forward sync. (#10336)

* Fix unbounded cache memory

* Update src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* OPify engine_getPayloadV4 (#10328)

* Check totalPacketSize (#10345)

* Validate header before 4844 (#10344)

Validate block header before 4844 txs

* Move discv5 nodes to a separate db (#10027)

* Move discv5 state to another one db

* Enable for hoodi and mainnet

* Fix bootnodes loading

* Use common nodes; remove enrs from old db

* Refactor a bit

* Fix tests

* Fix

* Fix more

* More fixes

* Fix build

* Update src/Nethermind/Nethermind.Init/Modules/DiscoveryModule.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Update src/Nethermind/Nethermind.Init/Modules/DiscoveryModule.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Update src/Nethermind/Nethermind.Init/Steps/SetupKeyStore.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Fix; add tests

* Fix test

* Add todo

* No more strings

* Fix tests

* Clean up

* Update src/Nethermind/Nethermind.Network.Discovery/IDiscoveryConfig.cs

Co-authored-by: Alex <alexb5dh@gmail.com>

* Simplify Enode->Enr

* Update src/Nethermind/Nethermind.Network.Discovery/IDiscoveryConfig.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Fix nothing

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Alex <alexb5dh@gmail.com>

* feat: add gas benchmark workflow (#10347)

* feat: add github actions to setup and remove dynamic github self-hosted runners

* chore: override sync supported chains workflow for testing new actions

* fix: update workflow ID in setup-runner action configuration

* fix: update wrong variable names for github actions

* fix: update workflow to capture correct triggering user

* fix: change env variable names to avoid collision with github workflow special env variables

* fix: add additional checks for runner removal action

* fix: update the github app used for authentication

* fix: add optional runner token input for setup and removal actions

* fix: update output reference for runner name in setup-runner action

* fix: add runner user creation and execution logic in setup-runner script

* fix: refactor runner setup script to enforce root execution and streamline user creation

* feat: add gas benchmark execution logic

* fix: add Git-LFS installation to runner setup script

* refactor: update setup and configure runner workflows to use ssh for improved security

* refactor: enhance security by masking registration token and streamlining SSH execution in runner configuration

* feat: add logging functionality to runner setup and configuration scripts for better traceability

* fix: set HOME environment variable in gas-benchmark workflow

* fix: increase setup wait time in gas-benchmark workflow

* refactor: add publish docker image action

* feat: add publish-docker job to sync-supported-chains workflow

* fix: move incorrect checkout steps

* chore: restore original sync supported chains workflow and add the run gas benchmarks workflow

* feat: allow gas benchmarks workflow to be triggered by pr labels

* XDC Subnet snapshot support (#10287)

* feat: SubnetSnapshot type and decoder

* refactor: use BaseSnapshotDecoder

* style: remove whitespace

* refactor: snapshot decoders to take factory

* feat: add prewarmer get operation timing metrics (#10289)

* feat: add prewarmer get operation timing metrics

Add PrewarmerGetTime histogram metric to track timing of prewarmer
cache operations (address/slot hits, misses, hints, and dispose).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Prewarmer metrics

* Progress

* Revert change in TrieStoreScopeProvider

* Measure write batch

* fix test

* Adjust resolution

* Address PR review feedback

- Save Labels array in field instead of creating new array each call
- Add DetailedMetricOnFlagAttribute for skipping flag properties in tests
- Use AssertionException instead of generic Exception in tests
- Create static PrewarmerGetTimeLabel instances to avoid allocations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Set flag during loop instead of lookup by name

- Remove DetailedMetricFlagName constant
- Set DetailedMetricsEnabled directly when attribute is detected
- Add test assertion to verify flag is set correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* fix: apply VerifyChecksum config to column families and snapshots (#10323)

* fix: apply VerifyChecksum config to column families and snapshots

* fix: apply VerifyChecksum config to column families and snapshots

* fix: apply VerifyChecksum config to column families and snapshots

* Update ColumnDb.cs

* Update DbOnTheRocks.cs

* fix(tests): add CancellationToken to SemaphoreSlim Wait calls in EngineModuleTests (#10318)

* Add .worktrees to .gitignore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(tests): add CancellationToken to SemaphoreSlim Wait calls in EngineModuleTests

Tests using SemaphoreSlim.WaitAsync() without cancellation tokens can hang
indefinitely if the expected event never occurs. This change adds proper
CancellationToken parameters to prevent test hangs:

- Maintain_correct_pointers_for_beacon_sync_in_archive_sync
- getPayloadV1_picks_transactions_from_pool_v1
- executePayloadV1_accepts_already_known_block
- executePayloadV1_on_top_of_terminal_block
- executePayloadV1_on_top_of_not_processed_invalid_terminal_block

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* Remove duplicate logic in SpanSource.IsNotNullOrEmpty (#10340)

* Update ConsoleExitHandler.cs

* Update ConsoleExitHandler.cs

* Update SpanSource.cs

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Make decoders static to reduce allocations in Vote and Timeout (#10234)

* Update Vote.cs

* Update Timeout.cs

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Fix race condition in ShutterBlockHandler (#10296)

* fix(shutter): add synchronization to CancelWaitForBlock to prevent race condition

* Add lock to Dispose

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Fix Dispose lock

* Fix test for async TCS completion

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Auto-update fast sync settings (#10365)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* Update OP Superchain chains (#10364)

Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>

* Parse incoming Jsons in chunks (#10207)

* Parse incoming Jsons in chunks

* changes

* better error handling

* move start time

* dispose jsondocument on exception

* fix microseconds

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix copilot review

* whitespace

* fix TrimStart

* Guard ReadAsync

* fix

* Fix test endpoint to match transport semantics for multiple JSON requests (#10356)

* Initial plan

* Change test endpoint from Http to Ws for multiple requests test

Co-authored-by: LukaszRozmej <12445221+LukaszRozmej@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: LukaszRozmej <12445221+LukaszRozmej@users.noreply.github.com>

* Update src/Nethermind/Nethermind.JsonRpc/JsonRpcProcessor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fixes

* more fixes

* Update src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcProcessorTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* make http endpoint AllowMultipleValues = false

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben {chmark} Adams <thundercat@illyriad.co.uk>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: LukaszRozmej <12445221+LukaszRozmej@users.noreply.github.com>

* Skip cache for identity precompile (#10366)

* Skip cache for identity precompile

Introduce a SupportsCaching flag on IPrecompile (default true) and mark IdentityPrecompile as non-caching. Update CachedCodeInfoRepository to only wrap precompiles in a CachedPrecompile when SupportsCaching is true (preserving behavior when cache is null). Add comprehensive tests: CachedCodeInfoRepositoryTests validate wrapping behavior, cache hits, multiple inputs, and interactions with Identity/SHA256 precompiles; SupportsCachingTests assert which precompiles enable caching by default. These changes prevent inefficient caching for Identity and ensure correct caching semantics.

* Update src/Nethermind/Nethermind.Blockchain/CachedCodeInfoRepository.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* formatting

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* perf: eliminate List allocations in PeerManager count operations  (#10362)

* Update IPeerManager.cs

* Update PeerManager.cs

* Update ParityRpcModule.cs

* Update EthStatsIntegration.cs

* Update ParityRpcModuleTests.cs

* fmt

* fmt

* Remove usings, replaced bots PR (#10372)

* Remove usings

* fix build

* Improve SendBlobs tool (#9872)

* Clean up blob sender

* Default forks = Osaka; seed for randomness

* WS

* Improve rpc

* Clean up the code a bit more

* More

* Move some Taiko RPC calls to auth namespace and clean up used code (#10352)

* refactor: move some Taiko RPC calls to auth namespace and clean up unused code

* Add lookback limit for batch ID block traversal in Taiko RPC module

* Skip preconfirmation blocks in TaikoEngineRpcModule batch traversal

* fix cspell

---------

Co-authored-by: Diptanshu Kakwani <dipkakwani@gmail.com>

* Sync Taiko Geth Changes into NMC (#10377)

* [Taiko Sync] Skip EIP-4396 check when ancestor missing, fix RPC response casing

Changes:
- TaikoHeaderValidator: Skip EIP-4396 verification when ancestor block is
  missing instead of returning validation error. Logs warning and continues.
  (taiko-geth commit 5d7599848)
- PreBuiltTxList: Change JSON property names from PascalCase to camelCase
  to match taiko-geth RPC response format.
  (taiko-geth commit f1856b667)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* remove names

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* Xdc : SpectialTx Handling (#9855)

* Adds Sign tx handling : draft

* Added createSignTx

* Add some spec changes

* fix the TIP check

* refactor transaction validation

* fix incorrect check

* inject txProcessor and txExecutor

* minor fixes and refactors

* more tests and more fixes

* add more tests

* clean up

* update test submodule

* checkout tests commit from master

* ws fixes

* refactor staticness away

* minor refactor

* seal TransactionProcessor

* remove un-needed preproc directive

* fix wrong check, and another approach for tx validation failure reporting

* ws fixes

* remove blacklisting from main code

* major refactors, moved removed building and validation txExecutor and moved tx ordering logic to TxComparer

* remove external changes

* move special addresses to chainspec and releasespec

* a better appraoch to handle spec in comparer

* fix build issues (wip)

* make sign and empty txs free in validation as well

* better approach to skip gas validation for free xdc txs

* minor refactor

* write more handling tests

* fix build issues

* fix failiing test

* whitespace fix

* Update src/Nethermind/Nethermind.Xdc/XdcTransactionProcessor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix forgotten tests

* Update src/Nethermind/Nethermind.Xdc/XdcTransactionProcessor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactors

* simply condition

* fix build issues

* fix failing test

* removed unused random tx

* rename method

* remove unecessary delays

* fix injection points

* hook releaseSpec to chainspec

* Add fields to json

* added more fields to the config

* removed redundant code

* added specific exception to txpool sumbition failure

* use mergeSignRange from spec in rewardCalc

* fix failing test

* apply fix

* Update XdcTransactionProcessor.cs

Co-authored-by: ak88 <anders@nethermind.io>

* remove unneed throw of exception

* optimization

* sign tx should be free

* overrides to TxPool filters and policies
fix blacklist check

* added more checks in releaseSpec
reworked some fields

* remove internal modifier from prop on releasespec

* remove internal modifer from chainspec

* fix randomize tx being free

* pay no fees for SpecialTxs

* fix failing rewards tests

* ws fixes

* fix failing tests

* releasespec changes

* reward tests refactor

* make randomizeTx free but not free

* refactor our virtually unused calls

* fix failing test

* add extra test

* add more tests

* fix ws

* refactors

* fix flaky test and remove consolewrite

* add eip1559 tests

* add words to spelling

* fix json

* Update src/Nethermind/Nethermind.Xdc/XdcTransactionProcessor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Xdc.Test/ModuleTests/RewardTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Xdc/XdcConstants.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Xdc/SignTransactionManager.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Xdc/SignTransactionManager.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Xdc/XdcTransactionProcessor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Nethermind/Nethermind.Xdc.Test/SpecialTransactionsTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* cleanup

* Update src/Nethermind/Nethermind.Xdc.Test/SpecialTransactionsTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* more and more cleanup

* fix failing test

* fix build issue

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ak88 <anders@nethermind.io>
Co-authored-by: ak88 <anders.holmbjerg@hotmail.com>

* XDC Subnet block header (#10305)

* feat: XdcSubnetBlockHeader type and decoder

* fix: make CalculateHash virtual

* Add LINQ guideline to agents (#10381)

* Add LINQ guideline to agents

Update AGENTS.md: Add a new guideline advising against recommending LINQ when a simple loop would suffice.

* Update AGENTS.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update AGENTS.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* spell

* Add GitHub Copilot instructions and LINQ guideline (#10382)

* Initial plan

* Add .github/copilot-instructions.md referencing AGENTS.md

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Add LINQ guideline to AGENTS.md (#10384)

* Initial plan

* Remove .github/copilot-instructions.md as AGENTS.md is sufficient

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Fix static node not marked as static when added via AddAsync (#10390)

When adding a static node via StaticNodesManager.AddAsync, the created
Node was not marked with IsStatic=true before being emitted via the
NodeAdded event. This caused downstream consumers (INodeSource) to
receive nodes without the static marker.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* Fix OverridableEnvFactory.BuildAndOverride on Exception (#10393)

* XDC Fix calculation of rewards per signer (#10355)

* fix calculation of proportional rewards and add test

* fix other tests accordingly and format

* (refactor) Make comparisons between transactions more readable (#10394)

* Make comparisons between transactions more readable

* Introduce BlobTxPriorityComparer

* rename refactor

* Fix outdated Microsoft.Extensions.Caching.Memory (#10401)

Fix outdated Microsoft.Extensions.Caching.Memory ref brought in by Lantern.Discv5

* Load plugins in tests properly; remove '\' from test name (#10400)

Load plugins  in tests properly; remove '\' from test name so it can be run in MSVS

* Add block timestamp (#10333)

* Add block timestamp to tx for rpc

* Clean up format

* Fix build

* Fix tests

* Refactor a bit

* Unify ctors

* Update src/Nethermind/Nethermind.Facade/Eth/RpcTransaction/AccessListTransactionForRpc.cs

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Review

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* taiko hoodi shasta activation (#10406)

* Harden rpc transaction validations (#10395)

* fix: validate BlobVersionedHashes length and version in eth_call

* remove todo

* Add test

* Add complex validations

* flip validateUserInput default flag

* fix

* Revert "flip validateUserInput default flag"

This reverts commit 08509f12c7cee36a5fa9c9d5db9e4a4dd354a913.

* refactor

* fix

* fix

* fixes

* fix for eth_simulate hive tests

* Update src/Nethermind/Nethermind.Facade/Eth/RpcTransaction/BlobTransactionForRpc.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor

* Add Gas to failing trace

* fix

---------

Co-authored-by: GarmashAlex <garmasholeksii@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Optimize KeccakCache (#10391)

* Optimize KeccakCache

* spelling

* Feedback

* Optimize Json hex parsing (#10389)

* Optimize hex parsing

* spell

* Update src/Nethermind/Nethermind.Serialization.Json/ByteArray32Converter.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add XdcBeaconSyncStrategy to provide target block height from sync config (#10411)

* implement XdcBeaconSyncStrategy using pivot as target block height

* remove unused imports and format

* Fixes 4 flaky test + refactors dbs (#10407)

* Fix XDC flaky reward test with correct signature for transaction

* Add Retry to LockFairnessTest

* fix GetMemoryOwner for managed dbs + refactors

* whitespace

* Decrease Retain_Some_PersistedNodes threshold to resolve flakiness

* fix review

* tiny refactor

* Parallelize Trie.Tests

* Parallelize Nethermind.Blockchain.Test

* Revert FilterManagerTests parall

* Update Dockerfiles (#10409)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* parallelize txpool test + fixes for parallel blockchain tests (#10418)

* Fix XDC flaky reward test with correct signature for transaction

* Add Retry to LockFairnessTest

* fix GetMemoryOwner for managed dbs + refactors

* whitespace

* Decrease Retain_Some_PersistedNodes threshold to resolve flakiness

* fix review

* tiny refactor

* Parallelize Trie.Tests

* Parallelize Nethermind.Blockchain.Test

* Revert FilterManagerTests parall

* parallelize some TxPool tests

* Try parallelize more tests

* make TxPool tests more parallelizable

* revert

* fix

* fix issues in Nethermind.Blockchain.Test

* more fixes

* more fixes

* FilterManagerTests nonparallelizable

* fix

* fix flaky test

* fix shutter test

* Add retry to Fuzz_accounts_with_storage

* retry flaky test

* add [NonParallelizable]

* XDC - Add custom state sync allocation strategy (#10399)

add custom state sync allocation strategy for xdc

* ProcessingStats Extensibility (#10420)

* processing stats extensibility

* improvement

* build fix

* fix

* fix: correct Bytes.BytesComparer length comparison ordering (#10353)

* fix: correct Bytes.BytesComparer length comparison ordering

The BytesComparer had inverted length comparison logic:
- null was considered greater than non-null (should be less)
- shorter arrays with same prefix were considered greater than longer
  arrays (should be less)

Fixed by inverting the return values for length-related comparisons:
- null < non-null
- [] < [x, ...] (empty < non-empty)
- [prefix] < [prefix, more] (shorter with same prefix < longer)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Switched to sequence compare to

* Address comment

* fix: handle null y in BytesComparer when x is non-null

Null arrays implicitly convert to empty ReadOnlySpan<byte> in
SequenceCompareTo, losing the null vs empty distinction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* Use CodeInfo type instead of ICodeInfo (#10423)

* Use CodeInfo type instead of ICodeInfo

Replace the ICodeInfo abstraction with a concrete CodeInfo type and adapt related APIs and implementations. CodeInfo was extended to carry precompile info, provide Code/CodeSpan, Version, IsPrecompile/IsEmpty semantics and background analysis. EofCodeInfo now derives from CodeInfo and provides EOF-specific data and versioning. PrecompileInfo was removed and precompiles are represented as CodeInfo (wrapping CachedPrecompile when needed).

API changes: ICodeInfoRepository, IOverridableCodeInfoRepository and IPrecompileProvider signatures and caches now use CodeInfo; CodeInfoFactory and CodeLruCache updated accordingly. Call sites across the VM, instruction implementations, tracers, transaction processing, repositories and tests were updated to use CodeInfo directly and to perform EOF checks using 'is EofCodeInfo' where appropriate. JumpDestinationAnalyzer.MachineCode was made accessible for CodeInfo.Code.

Overall this unifies EOF and precompile handling under a single CodeInfo model and simplifies caching and execution logic.

* Feedback

* Update CI workflows for Taiko/Surge integration tests (#10419)

* Add CI workflow for Surge integration tests and update workflow for Taiko

* Update CI workflow to reference the correct surge configuration file

* Update CI workflows to increase timeout for integration tests and adjust repository references

* Resolve comments

* Parallelizable does not work on all XDC tests (#10431)

remove broken Parallelizable

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Add JitAsm tool to be able to analyse the Jit output (#10432)

* Add JitAsm tool to be able to analyse the Jit output

* Spelling

* Address AGENTS.md LINQ guideline feedback on JitAsm PR (#10433)

* Initial plan

* Strengthen AGENTS.md LINQ guideline with explicit examples

Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Spell

* feedback

* Feedback

* Improve initialization

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>

* Update README with performance highlights of Nethermind (#10359)

* Update README with performance highlights of Nethermind

Revised description to emphasize performance metrics.

* Update README.md

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>

* Update README.md

Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

* Update README with image sources and badges

* Add 'srcset' to cspell.json dictionary

* Remove cspell directives from README

Removed cspell directives from README.md.

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>

* Auto-update fast sync settings (#10449)

Co-authored-by: rubo <rubo@users.noreply.github.com>

* Update OP Superchain chains (#10448)

Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>

* Fix flaky tests: timing and race condition (#10455)

- PeerManagerTests: Increase After timeout from 1000ms to 3000ms in
  Will_not_stop_trying_on_rlpx_connection_failure to prevent false
  failures on loaded CI runners
- SyncServerTests: Use Interlocked.Increment in
  Broadcast_NewBlock_on_arrival_to_sqrt_of_peers to fix race condition
  where concurrent SyncPeerMock background threads could lose count
  increments
- Rename _travisDelay fields to _delay, _delayLong, _delayLonger

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Metrics and BlockStatistics extension (#10429)

* Metrics and BlockStatistics…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants