rippled icon indicating copy to clipboard operation
rippled copied to clipboard

Charge higher fees for and reject heavy TMGetObjectByHashLimit queries

Open pratikmankawde opened this issue 1 month ago • 2 comments

Context of Change

Complete details of the context of the change and the change itself is shared in the ticket associated with this.

I am not duplicating the details here to avoid redundancy and confusion. I will add details of the test and impact in the ticket itself.

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Refactor (non-breaking change that only restructures code)
  • [ ] Performance (increase or change in throughput and/or latency)
  • [ ] Tests (you added tests for code that already exists, or your new feature included in this PR)
  • [ ] Documentation update
  • [ ] Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • [ ] Release

pratikmankawde avatar Dec 04 '25 17:12 pratikmankawde

Sharing this feedback from Slack:

I am looking at the code in PeerImp, and I misremembered a lot of the flow. getNodeFat is only used for a TMGetLedger request. TMGetObjectByHash is a completely different workflow.

However, I think TMGetLedger has at least part of the solution for this problem.

if (ledgerData.nodes_size() >=
    Tuning::hardMaxReplyNodes)
    break;

ximinez avatar Dec 08 '25 18:12 ximinez

Codecov Report

:x: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 79.1%. Comparing base (41c1be2) to head (58b6258).

Files with missing lines Patch % Lines
src/xrpld/overlay/detail/PeerImp.cpp 0.0% 4 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6110     +/-   ##
=========================================
- Coverage     79.1%   79.1%   -0.0%     
=========================================
  Files          836     836             
  Lines        71245   71247      +2     
  Branches      8321    8324      +3     
=========================================
- Hits         56353   56351      -2     
- Misses       14892   14896      +4     
Files with missing lines Coverage Δ
src/xrpld/overlay/detail/PeerImp.cpp 3.8% <0.0%> (-<0.1%) :arrow_down:

... and 2 files with indirect coverage changes

Impacted file tree graph

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Dec 09 '25 11:12 codecov[bot]