Skip to content

Find path will try other channels considering busyness level #569

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 20 commits into
base: develop
Choose a base branch
from

Conversation

chenyukang
Copy link
Collaborator

@chenyukang chenyukang commented Mar 11, 2025

Find path will track how many payments are pending on a channel, then try to pick other channel which is not busy.

@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.82%. Comparing base (fad9612) to head (8cf88c4).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #569      +/-   ##
===========================================
+ Coverage    51.75%   51.82%   +0.07%     
===========================================
  Files           52       52              
  Lines        34277    34305      +28     
===========================================
+ Hits         17739    17778      +39     
+ Misses       16538    16527      -11     
Flag Coverage Δ
unittests 51.82% <100.00%> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@chenyukang chenyukang changed the title [WIP] Find path will try other channels considering busyness level Find path will try other channels considering busyness level Apr 12, 2025
@chenyukang
Copy link
Collaborator Author

chenyukang commented Apr 12, 2025

I refactor testing code to add benchmark testing, from the result, we can get:

  1. the performance for multiple channel scenarios improved
  2. the performance does not change when channel number is 1
  3. performance will be improved much more when the number of channels increasing
image

@doitian
Copy link
Member

doitian commented Apr 15, 2025

Could you please explain the algorithm to find the route based on busyness level?

@chenyukang
Copy link
Collaborator Author

https://github.com/nervosnetwork/fiber/pull/569/files#diff-ac11142a8dee80631cd1352a43e26ba373f19dbd6009bcc71c66812b508ca47cR795-R811

Supposing there are multiple channels between two nodes, use these two functions to track the inflight payment number of a channel(an inflight payment means payment is sent out but haven't received a result).

if we have the inflight number for a channel, we can add a penalty when calculating the weight for a channel in path finding:
https://github.com/nervosnetwork/fiber/pull/569/files#diff-ac11142a8dee80631cd1352a43e26ba373f19dbd6009bcc71c66812b508ca47cR1354-R1370

@chenyukang chenyukang closed this Apr 26, 2025
@chenyukang chenyukang reopened this Apr 26, 2025
@chenyukang chenyukang force-pushed the tunning-find-path branch 2 times, most recently from 265e74b to efcaff8 Compare April 28, 2025 04:21
@chenyukang chenyukang force-pushed the tunning-find-path branch 3 times, most recently from ffeb301 to 43fbff2 Compare April 28, 2025 12:57
@chenyukang chenyukang marked this pull request as draft April 30, 2025 08:57
@chenyukang chenyukang force-pushed the tunning-find-path branch 2 times, most recently from b69af61 to 12c428e Compare April 30, 2025 13:31
@chenyukang chenyukang marked this pull request as ready for review April 30, 2025 16:47
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.

3 participants