8000 DRAFT: Optimize when to acquire ledgers from the network by ximinez · Pull Request #5352 · XRPLF/rippled · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DRAFT: Optimize when to acquire ledgers from the network #5352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: ximinez/fix-getledger
Choose a base branch
from

Conversation

ximinez
Copy link
Collaborator
@ximinez ximinez commented Mar 18, 2025

High Level Overview of Change

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • 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

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

Copy link
codecov bot commented Mar 18, 2025

Codecov Report

Attention: Patch coverage is 69.15888% with 33 lines in your changes missing coverage. Please review.

Please upload report for BASE (ximinez/fix-getledger@3a685d6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/xrpld/app/ledger/detail/InboundLedger.cpp 71.0% 9 Missing ⚠️
src/xrpld/app/ledger/detail/LedgerMaster.cpp 0.0% 9 Missing ⚠️
src/xrpld/app/misc/NetworkOPs.cpp 50.0% 7 Missing ⚠️
src/xrpld/app/ledger/detail/InboundLedgers.cpp 86.4% 3 Missing ⚠️
src/xrpld/app/ledger/detail/LedgerCleaner.cpp 0.0% 2 Missing ⚠️
src/xrpld/rpc/detail/RPCHelpers.cpp 33.3% 2 Missing ⚠️
src/xrpld/app/ledger/detail/TimeoutCounter.cpp 95.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##             ximinez/fix-getledger   #5352   +/-   ##
=======================================================
  Coverage                         ?   77.9%           
=======================================================
  Files                            ?     796           
  Lines                            ?   68974           
  Branches                         ?    8419           
=======================================================
  Hits                             ?   53755           
  Misses                           ?   15219           
  Partials                         ?       0           
Files with missing lines Coverage Δ
src/xrpld/app/consensus/RCLValidations.cpp 74.3% <100.0%> (ø)
src/xrpld/app/ledger/InboundLedger.h 69.2% <ø> (ø)
src/xrpld/app/ledger/InboundLedgers.h 100.0% <ø> (ø)
src/xrpld/app/ledger/detail/LedgerDeltaAcquire.cpp 96.4% <100.0%> (ø)
src/xrpld/app/ledger/detail/LedgerReplayTask.cpp 94.1% <100.0%> (ø)
src/xrpld/app/ledger/detail/SkipListAcquire.cpp 96.6% <100.0%> (ø)
src/xrpld/app/ledger/detail/TimeoutCounter.h 100.0% <ø> (ø)
src/xrpld/app/misc/NetworkOPs.h 100.0% <ø> (ø)
src/xrpld/shamap/detail/NodeFamily.cpp 35.9% <ø> (ø)
src/xrpld/app/ledger/detail/TimeoutCounter.cpp 89.3% <95.0%> (ø)
... and 6 more

Impacted file tree graph

🚀 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.

@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 0e4f4d2 to 06e0540 Compare March 19, 2025 00:46
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 06e0540 to 4b464d1 Compare March 20, 2025 01:05
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 4b464d1 to a6799ec Compare March 20, 2025 18:07
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from a6799ec to 0b8c2b3 Compare March 24, 2025 23:40
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 0b8c2b3 to f2b1a67 Compare March 25, 2025 16:12
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from f2b1a67 to c1215d0 Compare March 27, 2025 18:37
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from c1215d0 to 966204c Compare March 31, 2025 21:55
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 966204c to c49d81c Compare April 2, 2025 14:43
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from c49d81c to 07fa3a6 Compare April 4, 2025 17:23
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 07fa3a6 to 12ce5d1 Compare April 4, 2025 18:34
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 12ce5d1 to a20a4c8 Compare April 8, 2025 01:12
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from a20a4c8 to 9fdc610 Compare April 9, 2025 16:50
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 9fdc610 to 9f481fe Compare April 9, 2025 22:39
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 9f481fe to 503ed03 Compare April 10, 2025 15:41
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 503ed03 to 3a685d6 Compare April 10, 2025 21:39
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 3a685d6 to 99fb808 Compare April 11, 2025 22:28
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 99fb808 to 706a4c9 Compare April 24, 2025 14:44
@ximinez ximinez force-pushed the ximinez/fix-getledger branch 3 times, most recently from b92c9f9 to 15eeaff Compare April 28, 2025 18:39
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from 15eeaff to b402f06 Compare April 30, 2025 13:41
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from b402f06 to d7efe41 Compare May 1, 2025 18:30
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from d7efe41 to e75b993 Compare May 5, 2025 01:51
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from e75b993 to faac952 Compare May 14, 2025 14:51
@ximinez ximinez force-pushed the ximinez/fix-getledger branch from faac952 to 4d35847 Compare May 15, 2025 09:34
@ximinez ximinez force-pushed the ximinez/fix-getledger branch 2 times, most recently from 3b03627 to 80a17a2 Compare July 3, 2025 19:52
ximinez and others added 7 commits July 3, 2025 18:12
- Improve logging related to ledger acquisition and operating mode
  changes
- Class "CanProcess" to keep track of processing of distinct items
- Drop duplicate outgoing TMGetLedger messages per peer
  - Allow a retry after 30s in case of peer or network congestion.
  - Addresses RIPD-1870
  - (Changes levelization. That is not desirable, and will need to be fixed.)
- Drop duplicate incoming TMGetLedger messages per peer
  - Allow a retry after 15s in case of peer or network congestion.
  - The requestCookie is ignored when computing the hash, thus increasing
    the chances of detecting duplicate messages.
  - With duplicate messages, keep track of the different requestCookies
    (or lack of cookie). When work is finally done for a given request,
    send the response to all the peers that are waiting on the request,
    sending one message per peer, including all the cookies and
    a "directResponse" flag indicating the data is intended for the
    sender, too.
  - Addresses RIPD-1871
- Drop duplicate incoming TMLedgerData messages
  - Addresses RIPD-1869
Particularly avoid acquiring ledgers likely to be
produced locally very soon.

Derived from XRPLF#4764

Co-authored-by: Mark Travis <mtravis@ripple.com>
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.

1 participant
0