XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.52k stars 1.47k forks source link

Augment pathfind to return better codes #3471

Closed carlhua closed 8 months ago

carlhua commented 4 years ago

We need granularity into the reason for a "no paths" response to a pathfind request.

There are 2 major factors why "no paths" would be returned.

1) Low hot wallet balance 2) No Market Maker liquidity.

rippled should return 1) low hot wallet balance, 2) no market maker liquidity or 3) both when "no paths" is returned.

This would provide more insights to as why no paths was found.

Exported from RIPD-1056

scottschurr commented 11 months ago

TL;DR Summary

If we think making Payment transactions with non-default paths should be easier for users then we should...

Then, based on that tutorial, identify ways that path finding should be improved.

Whether we create that task or not, this issue should be closed. The suggestion in this issue does not provide users actionable information.

Details

Hmmmm. It's absolutely true that having path_find come back empty with no reason is frustrating. But I don't think the information requested by this issue really helps things very much. The information requested is not actionable, as far as I can see. If doesn't me tell how I need to change my path_find request so I get a useful collection of paths back.

Path finding is only useful for Payment transactions. A few years back Payment transactions were less than 5% of the ledger traffic. That's changed. Looking at transactions from October and November of 2023 we see the following breakdown:

Transaction Type Count Percent
OfferCreate 36,910,146 64%
Payment 11,244,073 19%
OfferCancel 4,661,132 8%
NFTokenMint 2,658,965 5%
TrustSet 1,720,946 3%
all others 776,635 1%

However out of all the payments in those two months, only 0.0006% included the Paths field.

I think we could draw some conclusions from these statistics.

  1. Payment transactions are a very important part of the ledger and are being used.
  2. Our default payment paths are really good and meet the needs of almost all XRP Ledger users.
  3. Non-default paths are hard to use. If path finding were easier more people might use non-default paths in Payments.

If we think it's desirable that people use non-default paths more often, then we need to make them easier to use. That probably would mean, in large part, improving the user experience with path finding.

But the way to improve the user experience is not by haphazardly adding new error return codes to our path finding RPC commands. If we think this is an important problem we should:

  1. Create a task for the doc folks to describe how best to use path finding and what to do if path finding is not working well.
  2. Then, based on that information, decide on ways to enhance path finding to make that documentation easier.

Whether or not we create that doc task, this issue should be closed. The information being requested is not actionable.