Skip to content
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

Renepay uses getroutes #7633

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

Lagrang3
Copy link
Collaborator

@Lagrang3 Lagrang3 commented Sep 2, 2024

Renepay uses getroutes

Description

In renepay we call getroutes RPC instead of computing routes internally.

Changes Made

  • Refactor: eventually routes computation will be done with plugin askrene and renepay will use its API to obtain routes.

Additional Notes

Built on top of #7693

@Lagrang3 Lagrang3 force-pushed the renepay-asks-rene branch 4 times, most recently from 944d20d to fa243fe Compare September 19, 2024 08:29
@Lagrang3 Lagrang3 force-pushed the renepay-asks-rene branch 2 times, most recently from 307f924 to 2ac8830 Compare September 23, 2024 08:11
To be able to write a route_exclusion to a json stream.

Changelog-None.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Disabled nodes and channels are now saved into a tal_arr of type
strut route_exclution.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Changelog-EXPERIMENTAL: askrene: add askrene-disable-channel RPC

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Use a bitmap to mark disabled channels instead of tweaking values in
localmods.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Changelog-EXPERIMENTAL: Renepay uses getroutes rpc to obtain payment routes.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Remove getmychannels payment modifier, the task to evaluate local
channels is performed by askrene.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
For every route hint (bolt11) create local channel with
askrene-create-channel RPC.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Remove unused update of the uncertainty network.
The uncertainty network is now handled by askrene.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Uses askrene-inform-channel to disable channels that meet renepay filter
criteria.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Prefer the provided API to work with amount_msat and fp16.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Preceding the introduction of askrene we needed to make a gossmap
refresh at every payment cycle to ensure to pick up the udpates in the
gossip store due to "addgossip" RPCs are called from the messages of
failed onions. With askrene this is no longer necessary.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Resolve multiple RPC calls before moving to the next payment state.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
We do not move to the next payment step until all sendpay RPCs are
finished. We flag routes that fail the sendpay call.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
For every route we send we make a call to askrene-reserve.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
The new uncertainty network will be handled by askrene.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Disable channels and nodes using askrene API.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Use the dedicated API for disabling channels instead of workarounds.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
- remove unused local_gossmods
- fix failed RPC call to askrene-age when RENEPAY_LAYER does not yet
  exist
- fix plugin hanging if there are no routehints in the invoice

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@Lagrang3 Lagrang3 added this to the v24.11 milestone Sep 26, 2024
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
- use a single datatype for RPC calls in routetracker and
routefail,
- call askrene-unreserve for every route after sendpay notification,
- call askrene-inform-channel for failed routes.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@Lagrang3 Lagrang3 removed this from the v24.11 milestone Oct 29, 2024
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.

1 participant