Skip to content

Perform duplicate proposal and validation checks early #5378

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Tapanito
Copy link
Collaborator

@Tapanito Tapanito commented Apr 1, 2025

Nodes tend to receive more duplicate than unique untrusted messages. Thus, it is more efficient to drop duplicate messages before checking whether they are trusted or not.

This change moves duplicity checks for proposal and validation messages as early as possible.

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)

@Tapanito Tapanito marked this pull request as draft April 1, 2025 11:35
@Tapanito Tapanito marked this pull request as ready for review April 2, 2025 14:13
@Tapanito Tapanito changed the title draft: perform duplicity check for proposals and validations early Perform duplicate proposal and validation checks early Apr 2, 2025
Copy link

codecov bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Project coverage is 78.1%. Comparing base (f608e65) to head (8f2a04a).
Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
src/xrpld/overlay/detail/PeerImp.cpp 0.0% 21 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5378     +/-   ##
=========================================
- Coverage     78.1%   78.1%   -0.0%     
=========================================
  Files          795     795             
  Lines        68448   68451      +3     
  Branches      8276    8280      +4     
=========================================
+ Hits         53484   53485      +1     
- Misses       14964   14966      +2     
Files with missing lines Coverage Δ
src/xrpld/overlay/detail/PeerImp.cpp 3.8% <0.0%> (-<0.1%) ⬇️

... and 5 files with indirect coverage changes

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.

@bthomee bthomee requested review from ximinez and gregtatcam April 7, 2025 10:22
@bthomee bthomee added this to the 2.6.0 (Q3 2025) milestone May 27, 2025
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.

2 participants