Skip to content

Backmerge v2.7.3 to develop#2214

Merged
manav2401 merged 2 commits intodevelopfrom
master
May 8, 2026
Merged

Backmerge v2.7.3 to develop#2214
manav2401 merged 2 commits intodevelopfrom
master

Conversation

@manav2401
Copy link
Copy Markdown
Member

No description provided.

manav2401 and others added 2 commits April 29, 2026 23:35
* eth: improve private tx purging and error reporting

* eth/relay: fix lint

* eth/relay: update comment

* eth/relay: fix error grouping in rejection tracker

* eth/relay: observability improvements

* eth/relay: improve sweep function to not hold lock

* eth/relay: fix tests

* eth/relay: remove hard TTL for pruning private txs

* params: bump version to v2.7.3-beta
* params: bump version to v2.7.3

* fix: typo

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

* fix: typo

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

* rpc: unfo read timeout error log

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 8, 2026 05:36
Copy link
Copy Markdown

@claude claude Bot left a comment

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.

@manav2401 manav2401 added the do not squash and merge This PR will be NOT be squashed and merged label May 8, 2026
Copy link
Copy Markdown
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

Backmerges v2.7.3 into develop, updating the Bor patch version and enhancing the tx-relay/private-tx pipeline with improved metrics/logging, aggregated BP rejection reporting, and private-tx store cleanup tied to txpool presence.

Changes:

  • Bump version patch from 2.7.2 to 2.7.3.
  • Add BP rejection aggregation + periodic summary logging; expand/rename relay metrics and add latency fields to logs.
  • Add private-tx store sweeping (TTL + txpool-aware eviction) and wire txpool presence checks from eth/backend.go.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
params/version.go Patch version bump to 2.7.3.
internal/ethapi/api.go Refines private-tx purge logic on submission errors.
eth/relay/service.go Renames relay metrics and enriches warning logs with elapsed time.
eth/relay/relay.go Adds wiring to pass a txpool presence checker into the private-tx store; expands submit-private-tx rationale comment.
eth/relay/rejection_tracker.go New in-memory rejection aggregation utilities (normalize/format/flush).
eth/relay/private_tx_store.go Adds sweeping eviction (TTL + txpool-aware) and replaces store size metric with a gauge.
eth/relay/private_tx_store_test.go Adds tests for sweeping and txpool-checker wiring.
eth/relay/multiclient.go Adds per-RPC metrics, records rejections, starts/stops a reporter goroutine, and closes idempotently.
eth/relay/multiclient_test.go Adds coverage for rejection tracker behavior and wiring into submit paths.
eth/backend.go Wires eth.txPool.Has into relay private-tx store for cleanup decisions.

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

Comment thread eth/relay/private_tx_store.go
Comment thread eth/relay/multiclient.go
Comment thread eth/relay/rejection_tracker.go
Comment thread eth/relay/private_tx_store_test.go
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@claude
Copy link
Copy Markdown

claude Bot commented May 8, 2026

Code review

Found 2 issues. Checked for bugs and CLAUDE.md compliance.

Issue 1: Data race on s.txPoolChecker in sweepOnce()
File: eth/relay/private_tx_store.go:193

sweepOnce() reads s.txPoolChecker on line 193 without holding any lock (s.mu.RUnlock was called on line 182). SetTxPoolChecker() writes this field under s.mu.Lock(). Since NewPrivateTxStore() starts the sweep goroutine immediately and SetTxPoolChecker is called later from eth/backend.go, these can execute concurrently. This is a data race under the Go memory model. Fix: capture s.txPoolChecker under the existing RLock in the snapshot phase into a local checker variable and use that on line 193 instead.

Issue 2: Behavioral regression in SendRawTransactionPrivate
File: internal/ethapi/api.go:2364

The return on line 2364 executes for ALL non-nil errors including ErrAlreadyKnown. Previously the condition was: if err != nil && !errors.Is(err, txpool.ErrAlreadyKnown), so ErrAlreadyKnown fell through to SubmitPrivateTx (BP forwarding). Now it returns early, so resubmitted private transactions silently skip block producer delivery. Fix: restore the original condition so ErrAlreadyKnown falls through to BP forwarding.

@manav2401 manav2401 merged commit 05ff6f4 into develop May 8, 2026
47 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not squash and merge This PR will be NOT be squashed and merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants