Skip to content

Bal devnet 2 merge#10297

Merged
benaadams merged 256 commits intobal-devnet-2from
bal-devnet-2-merge
Jan 21, 2026
Merged

Bal devnet 2 merge#10297
benaadams merged 256 commits intobal-devnet-2from
bal-devnet-2-merge

Conversation

@benaadams
Copy link
Member

Changes

  • Merge master to BAL devnet 2

Types of changes

What types of changes does your code introduce?

  • Refactoring

aso20455 and others added 30 commits November 26, 2025 23:51
* chore: remove dead IsSyncing field and its assignment

* Apply suggestion from @LukaszRozmej

* Simplify result creation in SyncingSubscription

Refactor SyncingSubscription logic for clarity and efficiency.

* Fix resource leak by using 'using' statement

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Move engaging NoGC out of hot path

* AI was right

* Better naming
* Reduce storage tracking allocations

* formatting

* Formatting

* Switch to new

* Less changes

* Remove thread static

* Use extension

* Fast empty path

* Use faster checks for StackPool

* Also reset skip flag

* Feedback

* Fix

* AI feedback

* formatting
* Devirtualize filter{store | manager}

* Feedback

* Lets not get fancy

* More specific

* Feedback
* Remove defensive copies from SecP256k1

* Remove type entirely

* Remove unneeded .ToArray()

* Max optimize
* address inner revert for eth_gasEstimate

* add new error type
fix mismatches in error messages
* fix: avoid allocation in PutSpan by throwing immediately

* Update RpcDb.cs
* Update ColumnsDb.cs

* Update ColumnsDb.cs
* Resolve Transitive dependency warnings

* Update Directory.Packages.props

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

---------

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

* Try fix

* Try fix

* Remove flag from non rpc calls

* Fix json rpc tests

* Fix more tests

* Fix system tx processor

* Fix blockchain tests

* More fixes

* Update src/Nethermind/Nethermind.Taiko/TaikoTransactionProcessor.cs

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

* Fix restore

* Fix small issues

* Update src/Nethermind/Nethermind.Evm/TransactionProcessing/TransactionProcessor.cs

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

* known failing tests

---------

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

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

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

---------

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

* chore: remove unused ShouldSerialize hooks and fix nullable properties

* remove private readonly bool _isAuRaBlock

* fix build

---------

Co-authored-by: Marcos Antonio Maceo <35319980+stdevMac@users.noreply.github.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: rubo <rubo@users.noreply.github.com>
Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>
jmadibekov and others added 8 commits January 19, 2026 16:53
* 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>
Enable prewarmer tx adapter for state pre-warming
* Add basic block validation to state tests

* Some cleanup

* Fix review
…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

* fix: gh action structure to run l2_nmc locally

* feat: add path for ci-taiko file

* Update GitHub Actions checkout reference surge-taiko-mono
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR merges master into the BAL devnet 2 branch, incorporating a large number of refactoring changes across the codebase.

Changes:

  • Refactored database configuration and RocksDB settings with new block cache support
  • Removed SpanSecP256k1 wrapper in favor of direct SecP256k1 usage
  • Improved spelling and grammar in comments throughout the codebase
  • Updated ISpecProvider API by renaming GetSpecInternal to GetSpec
  • Enhanced error handling and validation in transaction processing
  • Optimized performance in core utilities like hashing and vector operations

Reviewed changes

Copilot reviewed 242 out of 918 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Nethermind.Db.Rocks/Config/* Added BlockCache configuration and new DB options
Nethermind.Crypto/* Removed SpanSecP256k1 wrapper, updated constant definitions
Nethermind.Core/Specs/* Refactored spec provider API and moved extension methods
Nethermind.Core/Extensions/* Optimized FastHash implementation and improved utility methods
Nethermind.Blockchain/* Updated blockhash caching and tracing implementations
Nethermind.Consensus/* Refactored background task scheduler and block processing
Test files Fixed spelling errors and updated test expectations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@benaadams benaadams merged commit 37e891c into bal-devnet-2 Jan 21, 2026
65 checks passed
@benaadams benaadams deleted the bal-devnet-2-merge branch January 21, 2026 21:15
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (bal-devnet-2@e479770). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff               @@
##             bal-devnet-2   #10297   +/-   ##
===============================================
  Coverage                ?        0           
===============================================
  Files                   ?        0           
  Lines                   ?        0           
  Branches                ?        0           
===============================================
  Hits                    ?        0           
  Misses                  ?        0           
  Partials                ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.