rippled
rippled copied to clipboard
Optimize when to acquire ledgers from the network.
Particulary avoid acquiring ledgers likely to be produced locally very soon.
High Level Overview of Change
Peer ledger acquisition is expensive. This reduces peer ledger aquisition.
Context of Change
Existing code attempts to acquire ledgers if a validation for a new ledger is received, even if it comes moments before we have created the same ledger through normal consensus processing. A peer only needs to be slightly behind the first validator for this to be triggered. This essentially causes all nodes to have expensive background ledgerData acquisition jobs to be running. The fix is to not try to acquire ledgers that are very likely to be created locally through normal processing.
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)
- [ ] Tests (You added tests for code that already exists, or your new feature included in this PR)
- [ ] Documentation Updates
- [X] Performance
- [ ] Release
@mtrippled to confirm that this should be put on hold for now
Codecov Report
Attention: Patch coverage is 52.38095% with 10 lines in your changes are missing coverage. Please review.
Project coverage is 76.96%. Comparing base (
bcbf6c1) to head (a52b05c).
| Files | Patch % | Lines |
|---|---|---|
| src/ripple/app/ledger/impl/InboundLedgers.cpp | 61.53% | 0 Missing and 5 partials :warning: |
| src/ripple/app/misc/NetworkOPs.cpp | 37.50% | 4 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #4764 +/- ##
===========================================
- Coverage 76.97% 76.96% -0.01%
===========================================
Files 1129 1129
Lines 131916 131932 +16
Branches 39614 39662 +48
===========================================
+ Hits 101537 101542 +5
- Misses 24435 24456 +21
+ Partials 5944 5934 -10
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.