Skip to content

Conversation

@simzzz
Copy link
Contributor

@simzzz simzzz commented Nov 4, 2025

Description

This PR introduces a factory method for PendingTransactionStorage creation. The storage selection logic used to live in Relay. Relay shouldn't know about storage implementation details. By adding a factory method, this issue is resolved

Related issue(s)

Fixes #4502

Testing Guide

  1. Verify there is no storage selection logic in the Relay
  2. Verify tests still pass

Changes from original design (optional)

N/A

Additional work needed (optional)

N/A

Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
@simzzz simzzz added this to the 0.74.0 milestone Nov 4, 2025
@simzzz simzzz self-assigned this Nov 4, 2025
@simzzz simzzz added the enhancement New feature or request label Nov 4, 2025
@simzzz simzzz marked this pull request as ready for review November 4, 2025 14:36
@simzzz simzzz requested review from a team as code owners November 4, 2025 14:36
@simzzz simzzz requested a review from acuarica November 4, 2025 14:36
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Test Results

 20 files  ±0  269 suites  ±0   21m 32s ⏱️ -3s
778 tests ±0  774 ✅ +2  4 💤 ±0  0 ❌  - 2 
794 runs  ±0  790 ✅ +2  4 💤 ±0  0 ❌  - 2 

Results for commit dedb6bf. ± Comparison against base commit 8a7783c.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

LGTM. Should we also create tickets to leverage this same logic for CacheService and rateLimitterService and maybe other services so they can be consistent?

Copy link
Member

@natanasow natanasow left a comment

Choose a reason for hiding this comment

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

LGTM

@simzzz simzzz merged commit 65c1a72 into main Nov 10, 2025
66 of 67 checks passed
@simzzz simzzz deleted the 4502-create-factory-for-PendingTransactionStorage branch November 10, 2025 13:06
@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main    #4573      +/-   ##
==========================================
- Coverage   95.52%   95.49%   -0.03%     
==========================================
  Files         127      128       +1     
  Lines       20493    20516      +23     
  Branches     1760     1755       -5     
==========================================
+ Hits        19576    19592      +16     
- Misses        898      905       +7     
  Partials       19       19              
Flag Coverage Δ
config-service 98.81% <ø> (ø)
relay 90.96% <100.00%> (+0.01%) ⬆️
server 88.85% <ø> (ø)
ws-server 98.04% <ø> (+1.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/relay/src/lib/relay.ts 98.60% <100.00%> (-0.01%) ⬇️
...ionPoolService/PendingTransactionStorageFactory.ts 100.00% <100.00%> (ø)

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

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create factory for PendingTransactionStorage selection

4 participants