Conversation
* 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>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.2to2.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.
|
Code reviewFound 2 issues. Checked for bugs and CLAUDE.md compliance. Issue 1: Data race on s.txPoolChecker in sweepOnce() 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 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. |



No description provided.