Skip to content

Conversation

@jasuwienas
Copy link
Contributor

@jasuwienas jasuwienas commented Nov 10, 2025

Description

Fetching the recent account transactions is not really needed, unless we want to query for the balance from the past, but not before 15 minutes ago (balance from the last 15 minutes, expect for current balance).

Related issue(s)

Fixes #4553

Testing Guide

Two alternatives:

  1. npm run test
  2. start using json rpc and investigate logs.

Checklist

  • I've assigned an assignee to this PR and related issue(s) (if applicable)
  • I've assigned a label to this PR and related issue(s) (if applicable)
  • I've assigned a milestone to this PR and related issue(s) (if applicable)
  • I've updated documentation (code comments, README, etc. if applicable)
  • I've done sufficient testing (unit, integration, etc.)

Signed-off-by: Mariusz Jasuwienas <jasuwienas@gmail.com>
…milar methods (hiero-ledger#4598)

Signed-off-by: Mariusz Jasuwienas <mariusz@jasuwienas.pl>
…o-ledger#4598)

Signed-off-by: Mariusz Jasuwienas <mariusz@jasuwienas.pl>
…o-ledger#4598)

Signed-off-by: Mariusz Jasuwienas <mariusz@jasuwienas.pl>
@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 65.51724% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/relay/src/lib/clients/mirrorNodeClient.ts 66.66% 6 Missing ⚠️
...rvices/ethService/accountService/AccountService.ts 20.00% 4 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (8a7783c) and HEAD (244955c). Click for more details.

HEAD has 19 uploads less than BASE
Flag BASE (8a7783c) HEAD (244955c)
19 4
config-service 1 0
relay 1 0
server 1 0
ws-server 1 0
@@             Coverage Diff             @@
##             main    #4598       +/-   ##
===========================================
- Coverage   95.52%   68.67%   -26.86%     
===========================================
  Files         127      128        +1     
  Lines       20493    20651      +158     
  Branches     1760      563     -1197     
===========================================
- Hits        19576    14182     -5394     
- Misses        898     6458     +5560     
+ Partials       19       11        -8     
Flag Coverage Δ
config-service ?
relay ?
server ?
ws-server ?

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

Files with missing lines Coverage Δ
packages/relay/src/lib/types/mirrorNode.ts 100.00% <100.00%> (ø)
...rvices/ethService/accountService/AccountService.ts 45.97% <20.00%> (-50.56%) ⬇️
packages/relay/src/lib/clients/mirrorNodeClient.ts 70.66% <66.66%> (-23.62%) ⬇️

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

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! Great work! Left a question

updated: also same idea with this comment #4587 (comment), I think we should use an action-oriented phrasing for title so it matches the conventional and also other commits in the repo.

@jasuwienas jasuwienas changed the title feat: transactions data is not always needed when querying for balance feat: stop fetching transactions data when its not needed Nov 12, 2025
@jasuwienas
Copy link
Contributor Author

@quiet-node could you run the pipelines and merge it for me, please? 🙏 I still don’t have access, unfortunately…

@quiet-node quiet-node merged commit c004a57 into hiero-ledger:main Nov 14, 2025
57 of 62 checks passed
quiet-node pushed a commit that referenced this pull request Nov 18, 2025
Signed-off-by: Mariusz Jasuwienas <jasuwienas@gmail.com>
Signed-off-by: Mariusz Jasuwienas <mariusz@jasuwienas.pl>
quiet-node pushed a commit that referenced this pull request Nov 18, 2025
Signed-off-by: Mariusz Jasuwienas <jasuwienas@gmail.com>
Signed-off-by: Mariusz Jasuwienas <mariusz@jasuwienas.pl>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
quiet-node added a commit that referenced this pull request Nov 19, 2025
…ed (#4598)" (#4625)

Signed-off-by: Mariusz Jasuwienas <jasuwienas@gmail.com>
Signed-off-by: Mariusz Jasuwienas <mariusz@jasuwienas.pl>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Co-authored-by: jasuwienas <mariusz@jasuwienas.pl>
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.

Optimize eth_getBalance by excluding unnecessary transaction data

4 participants