Skip to content

v2.7.1#2186

Merged
cffls merged 14 commits into
masterfrom
v2.7.1-candidate
Apr 13, 2026
Merged

v2.7.1#2186
cffls merged 14 commits into
masterfrom
v2.7.1-candidate

Conversation

@cffls

@cffls cffls commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Merge v2.7.1-candidate to master.

dependabot Bot and others added 14 commits March 19, 2026 07:23
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.77.0 to 1.79.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.77.0...v1.79.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.79.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…2157)

* eth, eth/protocols/eth: fix goroutine leaks in witness request path

The parallel-stateless-import feature leaked goroutines in
RequestWitnessesWithVerification when peers disconnected or stopped
responding. Each stalled witness request leaked 2-4 goroutines that
pinned witness data and channels in memory indefinitely.

Three root causes:

1. doWitnessRequest spawned a goroutine that blocked forever on the
   per-request response channel (<-witResCh) with no timeout or
   cancellation. When a peer disconnected, the wit dispatcher exited
   without signaling pending sink channels, so the goroutine never
   returned. This cascaded: the WaitGroup never completed, witReqResCh
   never closed, and the adapter goroutine also leaked.

2. eth.Request.Close() returned early without closing the Cancel
   channel when peer was nil. The witness adapter returns a shim
   eth.Request (peer == nil) to the concurrent fetcher. When the
   fetcher called Close() on timeout or disconnect, Cancel was never
   closed, so the adapter goroutine's select on Cancel never fired.

3. The adapter spawned fire-and-forget goroutines (go func(){<-doneCh}())
   to drain the Done channel on synthetic eth.Response objects. Nothing
   ever wrote to these channels, so the goroutines leaked unconditionally.

Fixes:

- eth.Request.Close() now always closes Cancel even when peer is nil.
- doWitnessRequest selects on a cancel channel in both receive and
  forward paths, with proper WaitGroup/semaphore cleanup on exit.
- Replace doneCh drainer goroutines with buffered channels.
- Adapter defers closing underlying wit.Request objects on exit.

* Address PR comments

* Fix test

* Add test coverage

* Refactor and simplify
…olygon throughput (#2160)

Polygon mainnet processes 120M gas/block at 2s block times. At high
utilization (90-100% gas), blocks carry 430-520 KB of transaction data,
with full blocks reaching ~520 KB. The previous 100 KB limit required
5+ sequential p2p messages per peer per full block.

This affected both paths:
- Direct broadcast (full txs to sqrt(peers)): many sequential messages
- GetPooledTransactions responses: peers fetching txs after announcement
  could not receive a full block's worth in one response, increasing
  round trips for mempool convergence across the wider peer set

1 MB is chosen to:
- Fit any block at current gas limits in a single message
- Provide ~2x headroom over the current full-block maximum (~520 KB),
  absorbing a gas limit increase to ~200M without another bump
- Stay at 6.3% of the 16 MB p2p message size limit
- Remain well below the ~15 MB witness messages already exchanged on
  this network, keeping head-of-line blocking risk negligible

Note: 512 KB was considered but rejected — full blocks already reach
520 KB, leaving essentially no margin.
* perf: use fixed-size array stack to eliminate slice overhead in EVM

* core/vm: add switch-dispatch fast path for EVM interpreter

* fix: keccak 256 benchmark test

* chore: stack benchmark test

* core/vm: fix revert data loss, fork gate, and push allocs in switch dispatch

* chore: nits

* feat: snailtracer benchmark test

* chore: add EnableSwitchDispatch flag

* chore: add a log

* chore: fix tests

* chore: final nits

* fix: use blockchain's vm.Config instead of nil

* fix: tests and disable tracing for block producer

* fix: lint

* chore: comments

* chore: nits

* chore: tests

* fix: lint

* chore: increase test coverage and change the flag name

* chore: add gen_dispatch CLAUDE.md with SOP

* chore: address comments

* chore: add testing and validation section

* chore: comment fixes

* chore: nit
…-over (#2170)

* pebble optimizations

* pathdb: make state carry-over safe with copy-on-write

* Update triedb/pathdb/config.go

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

* Update triedb/pathdb/buffer.go

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Most of time, SRC is less than 100ms. For this reason, we should allow the worker to spend more time in transaction execution. This change will be crucial when we reduce the block time.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@claude

claude Bot commented Apr 13, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@codecov

codecov Bot commented Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.25018% with 449 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.90%. Comparing base (21a6320) to head (a17900c).
⚠️ Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
core/vm/gen_dispatch/main.go 0.00% 277 Missing ⚠️
eth/ethconfig/gen_config.go 0.00% 106 Missing ⚠️
eth/protocols/eth/dispatcher.go 0.00% 18 Missing ⚠️
ethdb/pebble/pebble.go 0.00% 10 Missing ⚠️
core/vm/interpreter_dispatch.go 98.75% 6 Missing and 3 partials ⚠️
eth/protocols/eth/broadcast.go 0.00% 6 Missing ⚠️
eth/downloader/bor_fetchers_concurrent.go 0.00% 5 Missing ⚠️
miner/worker.go 70.00% 3 Missing ⚠️
triedb/pathdb/states.go 94.33% 2 Missing and 1 partial ⚠️
eth/fetcher/block_fetcher.go 0.00% 2 Missing ⚠️
... and 8 more

❌ Your patch status has failed because the patch coverage (67.25%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2186      +/-   ##
==========================================
+ Coverage   51.37%   51.90%   +0.52%     
==========================================
  Files         882      884       +2     
  Lines      154357   155431    +1074     
==========================================
+ Hits        79301    80672    +1371     
+ Misses      69913    69551     -362     
- Partials     5143     5208      +65     
Files with missing lines Coverage Δ
core/blockstm/dag.go 66.20% <ø> (-4.83%) ⬇️
core/blockstm/executor.go 87.46% <100.00%> (+0.09%) ⬆️
core/vm/interpreter.go 67.45% <100.00%> (+12.51%) ⬆️
eth/backend.go 52.53% <100.00%> (+0.06%) ⬆️
eth/ethconfig/config.go 78.94% <ø> (ø)
eth/fetcher/tx_fetcher.go 88.05% <ø> (ø)
eth/peer.go 95.80% <100.00%> (+0.05%) ⬆️
internal/cli/server/config.go 63.84% <100.00%> (+0.05%) ⬆️
internal/cli/server/flags.go 100.00% <100.00%> (ø)
p2p/peer.go 71.47% <100.00%> (-0.45%) ⬇️
... and 24 more

... and 30 files with indirect coverage changes

Files with missing lines Coverage Δ
core/blockstm/dag.go 66.20% <ø> (-4.83%) ⬇️
core/blockstm/executor.go 87.46% <100.00%> (+0.09%) ⬆️
core/vm/interpreter.go 67.45% <100.00%> (+12.51%) ⬆️
eth/backend.go 52.53% <100.00%> (+0.06%) ⬆️
eth/ethconfig/config.go 78.94% <ø> (ø)
eth/fetcher/tx_fetcher.go 88.05% <ø> (ø)
eth/peer.go 95.80% <100.00%> (+0.05%) ⬆️
internal/cli/server/config.go 63.84% <100.00%> (+0.05%) ⬆️
internal/cli/server/flags.go 100.00% <100.00%> (ø)
p2p/peer.go 71.47% <100.00%> (-0.45%) ⬇️
... and 24 more

... and 30 files with indirect coverage changes

🚀 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.

@cffls cffls merged commit 4115ac5 into master Apr 13, 2026
20 of 25 checks passed
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.

7 participants