Skip to content

v2.7.3 release#2212

Merged
manav2401 merged 4 commits intomasterfrom
v2.7.3-candidate
May 7, 2026
Merged

v2.7.3 release#2212
manav2401 merged 4 commits intomasterfrom
v2.7.3-candidate

Conversation

@manav2401
Copy link
Copy Markdown
Member

@manav2401 manav2401 commented May 7, 2026

Description

Few small tweaks (mostly aimed at relay nodes tested via bor-tester release).

  • Additional logging in relay / multiclient
  • Hard TTL for purging transactions older than 10 mins from private tx store (making them public).

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Nodes audience

In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply
  • Created a task in Jira and informed the team for implementation in Erigon client (if applicable)
  • Includes RPC methods changes, and the Notion documentation has been updated

Cross repository changes

  • This PR requires changes to heimdall
    • In case link the PR here:
  • This PR requires changes to matic-cli
    • In case link the PR here:

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on amoy
  • I have created new e2e tests into express-cli

Manual tests

Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

Copilot AI review requested due to automatic review settings May 7, 2026 10:49
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
Copy link
Copy Markdown
Member Author

@claude review. Check for regressions.

@claude
Copy link
Copy Markdown

claude Bot commented May 7, 2026

Claude finished @manav2401's task in 2m 57s —— View job


Code Review: v2.7.3 Release

  • Read all changed files and understand the diff
  • Review relay multiclient changes
  • Review private tx store TTL changes
  • Review private tx store tests
  • Review relay service changes
  • Review ethapi changes
  • Review RPC server read timeout logging
  • Review version bump
  • Check for regressions
  • Post final review

Summary

Overall this is a clean release with mostly additive logging changes and one meaningful behavioral change (hard TTL for private tx store). The code is well-structured and the new test covers the TTL feature properly. I have one item to flag as a potential regression.


Potential Regression: SendRawTransactionPrivate early return on ErrAlreadyKnown

File: internal/ethapi/api.go:2358-2365

The restructured error handling introduces an early return hash, err for all errors, including ErrAlreadyKnown. This changes behavior:

Scenario Old behavior New behavior
SubmitTransaction returns non-ErrAlreadyKnown error Purge from private store, then still try SubmitPrivateTx to BPs Purge and return immediately (no BP submission)
SubmitTransaction returns ErrAlreadyKnown Don't purge, then still try SubmitPrivateTx to BPs Don't purge, return immediately (no BP submission)
SubmitTransaction succeeds Submit to BPs Submit to BPs (unchanged)

Case 1 (non-ErrAlreadyKnown error) looks like a bug fix — the old code would purge the tx from the private store and then still try to forward to BPs, which is inconsistent.

Case 2 (ErrAlreadyKnown) is the one worth double-checking: if a private tx arrives from a relay retry path and the local pool already has it, the old code would still ensure BPs receive it. The new code skips BP submission entirely. This is fine if the prior SendRawTransactionPrivate call already handled BP forwarding successfully, but could miss the BP notification if the tx entered the pool through a different path (e.g., regular eth_sendRawTransaction or P2P propagation).

Question for author: Is the ErrAlreadyKnown early-return intentional? If the tx was added to the local pool through a non-private path, this would skip the BP submission.


Findings

1. Private Tx Store Hard TTL — Looks Good

eth/relay/private_tx_store.go:189-191 — Clean implementation. The TTL check runs before the txpool-based eviction, so expired txs are removed regardless of pool state. The three-phase sweep pattern (snapshot → filter → delete with re-check) is preserved correctly. Test (TestPrivateTxStoreSweepTTL) covers the new path well.

One note: when TTL fires, the tx is no longer marked private and can be gossiped publicly. This matches the PR description ("making them public") — just confirming that's the intended consequence.

2. Multiclient Timing Logs — Looks Good

eth/relay/multiclient.gocallStart/elapsed are captured per-goroutine, so there's no shared-state concern. The timing accurately wraps the RPC call + context timeout. No behavioral changes.

3. Service Elapsed Logging — Looks Good

eth/relay/service.go:175,293 — Adding elapsed to existing log.Warn calls. The time.Since(start) is computed at log-time rather than captured immediately, so it includes a tiny bit of overhead from the error checks, but this is negligible and acceptable for Warn-level diagnostic logging.

4. RPC Read Timeout Logging — Looks Good, Minor Notes

rpc/server.go:195-229 — The diagnostic logging is thorough and will help identify upstream stalls vs. Bor delays.

  • codec.peerInfo() returns {Transport: "ipc", RemoteAddr: ...} for HTTP server codecs (because httpServerConn is wrapped in jsonCodec), while PeerInfoFromContext(ctx) returns the HTTP-enriched view with User-Agent/Host/Origin. Logging both is redundant for Transport but useful for cross-referencing RemoteAddr.
  • fmt.Sprintf("%T", err) is fine since this is server-side logging, not returned to callers.
  • This is Warn-level logging on every read error. On nodes with frequent upstream timeouts, this could be noisy. Consider whether Debug level would be more appropriate for steady-state, but for initial diagnosis Warn is fine.

5. Version Bump — Looks Good

params/version.goVersionMeta changed from "beta" to "". Standard release promotion.

6. Test Coverage — Good

The new TestPrivateTxStoreSweepTTL test properly validates:

  • Entries older than TTL are removed
  • Fresh entries are preserved
  • The txsExpired metric is incremented correctly
  • No txpool checker is needed for TTL-based eviction (correct — TTL fires regardless)

Verdict

Approve with one question: please confirm the ErrAlreadyKnown early-return in SendRawTransactionPrivate is intentional (see regression analysis above). The rest of the changes are clean observability improvements and a well-tested feature addition.

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

This PR prepares the v2.7.3 release by adding more diagnostic logging around RPC read failures and relay submissions, and by introducing a hard TTL to evict old private transactions from the relay’s private-tx store (allowing them to become public after expiry). It also updates the build version metadata for the release.

Changes:

  • Add richer RPC “read timeout / read error” logging before handler dispatch to help identify upstream stalls vs local delays.
  • Add elapsed-time logging for relay submissions (preconf/private tx) and introduce a hard TTL (10 minutes) for private-tx store eviction (with tests).
  • Update version metadata for the v2.7.3 release.

Reviewed changes

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

Show a summary per file
File Description
rpc/server.go Adds timing + enriched peer metadata to logs for HTTP read failures.
params/version.go Updates release metadata (VersionMeta).
internal/ethapi/api.go Refactors private-tx purge logic on submission error.
eth/relay/service.go Adds elapsed-time logging for relay submission failures.
eth/relay/private_tx_store.go Adds hard TTL eviction to private tx store sweep logic.
eth/relay/private_tx_store_test.go Adds unit test coverage for TTL-based eviction.
eth/relay/multiclient.go Adds elapsed-time debug logging per block-producer RPC call failure.

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

Comment thread params/version.go
Comment thread eth/relay/service.go Outdated
Comment thread eth/relay/private_tx_store.go Outdated
Comment thread eth/relay/private_tx_store.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 7, 2026 10:53
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comment thread rpc/server.go Outdated
Comment thread params/version.go
Comment thread eth/relay/private_tx_store.go
@claude
Copy link
Copy Markdown

claude Bot commented May 7, 2026

Code review

Found 1 issue. Checked for bugs and CLAUDE.md compliance.

Comment thread internal/ethapi/api.go
Comment thread eth/relay/private_tx_store.go Outdated
@manav2401
Copy link
Copy Markdown
Member Author

@claude the return if the error is "already known" is intentional. It should not send the tx further for re-submission.

@claude
Copy link
Copy Markdown

claude Bot commented May 7, 2026

Claude finished @manav2401's task in 16s —— View job


Acknowledged: ErrAlreadyKnown early return is intentional

Thanks for the clarification. The early return for ErrAlreadyKnown in SendRawTransactionPrivate is confirmed as intentional — already-known private txs should not be re-submitted to block producers.

This resolves the question raised in the previous review. The rest of the v2.7.3 changes (diagnostic logging, hard TTL for private tx store) looked clean.

@claude
Copy link
Copy Markdown

claude Bot commented May 7, 2026

test123

@claude
Copy link
Copy Markdown

claude Bot commented May 7, 2026

Bug: Behavioral regression in SendRawTransactionPrivate (internal/ethapi/api.go:2358-2365)

The refactoring of the error-handling block changes control flow for ErrAlreadyKnown errors.

Old code (link):
The condition was if err != nil && !errors.Is(err, txpool.ErrAlreadyKnown) with return hash, err inside the if block. When err was ErrAlreadyKnown, the condition was false, so execution fell through to SubmitPrivateTx — the transaction was still forwarded to block producers.

New code (link):
return hash, err is now inside the outer if err != nil block, so all errors (including ErrAlreadyKnown) cause an early return. Private transactions that are already known in the local txpool will never be relayed to block producers, which defeats the purpose of private transaction relay.

Suggested fix: Move return hash, err inside the inner if !errors.Is(err, txpool.ErrAlreadyKnown) block so that ErrAlreadyKnown falls through to SubmitPrivateTx, matching the old behavior.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.22%. Comparing base (5b9a762) to head (0252b6a).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2212   +/-   ##
=======================================
  Coverage   52.21%   52.22%           
=======================================
  Files         885      885           
  Lines      155613   155623   +10     
=======================================
+ Hits        81257    81273   +16     
+ Misses      69122    69115    -7     
- Partials     5234     5235    +1     
Files with missing lines Coverage Δ
eth/relay/multiclient.go 90.27% <100.00%> (+0.20%) ⬆️
eth/relay/private_tx_store.go 83.57% <100.00%> (+0.35%) ⬆️
eth/relay/service.go 95.62% <100.00%> (ø)
internal/ethapi/api.go 41.34% <100.00%> (+0.03%) ⬆️
params/version.go 23.68% <ø> (-15.79%) ⬇️

... and 18 files with indirect coverage changes

Files with missing lines Coverage Δ
eth/relay/multiclient.go 90.27% <100.00%> (+0.20%) ⬆️
eth/relay/private_tx_store.go 83.57% <100.00%> (+0.35%) ⬆️
eth/relay/service.go 95.62% <100.00%> (ø)
internal/ethapi/api.go 41.34% <100.00%> (+0.03%) ⬆️
params/version.go 23.68% <ø> (-15.79%) ⬇️

... and 18 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.

@manav2401 manav2401 merged commit 8329cb4 into master May 7, 2026
22 of 23 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.

5 participants