Skip to content

Add maxFeeMsat parameter to sendtoroute RPC call#2626

Merged
t-bast merged 3 commits into
ACINQ:masterfrom
rorp:sendtoroute_max_fee
Jun 7, 2023
Merged

Add maxFeeMsat parameter to sendtoroute RPC call#2626
t-bast merged 3 commits into
ACINQ:masterfrom
rorp:sendtoroute_max_fee

Conversation

@rorp
Copy link
Copy Markdown
Contributor

@rorp rorp commented Apr 4, 2023

The rationale for this PR is to avoid this situation:

  1. A user finds a route using findroute* with maxFeeMsat to exclude the most expensive routes.
  2. A new channel update arrives, that makes one of the channels in the route more expensive.
  3. The user sends a payment using sendtoroute and ends up paying much more in fees than they expected.

This PR allows to set maxFeeMsat for sendtoroute RPC call. If the routing fees exceed the max fee the router returns a local error.

Copy link
Copy Markdown
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review! Can you update the release notes accordingly?

Comment thread eclair-core/src/main/scala/fr/acinq/eclair/router/RouteCalculation.scala Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 27, 2023

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.86%. Comparing base (e7b4631) to head (2f58b27).
⚠️ Report is 306 commits behind head on master.

Files with missing lines Patch % Lines
...cala/fr/acinq/eclair/router/RouteCalculation.scala 88.88% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2626      +/-   ##
==========================================
- Coverage   85.88%   85.86%   -0.03%     
==========================================
  Files         214      214              
  Lines       17591    17598       +7     
  Branches      728      715      -13     
==========================================
+ Hits        15108    15110       +2     
- Misses       2483     2488       +5     
Files with missing lines Coverage Δ
...r/acinq/eclair/payment/send/PaymentLifecycle.scala 86.91% <100.00%> (ø)
...src/main/scala/fr/acinq/eclair/router/Router.scala 94.71% <ø> (ø)
...cala/fr/acinq/eclair/router/RouteCalculation.scala 95.42% <88.88%> (-0.41%) ⬇️

... and 3 files with indirect coverage changes

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

@t-bast t-bast merged commit b084d73 into ACINQ:master Jun 7, 2023
t-bast added a commit that referenced this pull request Jun 16, 2023
This release introduces a few API changes:

- `audit` now accepts `--count` and `--skip` parameters to limit the
  number of retrieved items (#2474, #2487)
- `sendtoroute` removes the `--trampolineNodes` argument and
  implicitly uses a single trampoline hop (#2480)
- `sendtoroute` now accept `--maxFeeMsat` to specify an upper bound
  of fees (#2626)
- `payinvoice` always returns the payment result when used with
  `--blocking`, even when using MPP (#2525)
- `node` returns high-level information about a remote node (#2568)
- `channel-created` is a new websocket event that is published when
  a channel's funding transaction has been broadcast (#2567)
- `channel-opened` websocket event was updated to contain the final
  `channel_id` and be published when a channel is ready to process
  payments (#2567)
- `getsentinfo` can now be used with `--offer` to list payments sent
  to a specific offer
- `listreceivedpayments` lists payments received by your node (#2607)
- `closedchannels` lists closed channels. It accepts `--count` and
  `--skip` parameters to limit the number of retrieved items as well
  (#2642)
- `cpfpbumpfees` can be used to unblock chains of unconfirmed
  transactions by creating a child transaction that pays a high fee
  (#1783)
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