Make Rene Pay Again - #7125
Merged
Merged
Conversation
Lagrang3
marked this pull request as draft
March 4, 2024 06:07
Contributor
|
Suggested release name: Make Rene Pay Again |
Collaborator
Author
Good name for the next release. |
Closed
Lagrang3
force-pushed
the
renepay-refactor
branch
from
March 28, 2024 12:48
5af4384 to
1dee6de
Compare
Collaborator
Author
|
I've made a rebase on top of PR #7159. |
Lagrang3
force-pushed
the
renepay-refactor
branch
from
April 8, 2024 15:29
d682bad to
41dcb69
Compare
Lagrang3
marked this pull request as ready for review
April 8, 2024 15:30
Lagrang3
force-pushed
the
renepay-refactor
branch
6 times, most recently
from
April 9, 2024 07:42
a2629e7 to
f198631
Compare
Lagrang3
force-pushed
the
renepay-refactor
branch
from
April 10, 2024 08:27
f198631 to
9baeb04
Compare
ALRDA5
approved these changes
Apr 10, 2024
Flow and chan_extra are two different concepts, we keep their definitions and APIs separate.
Refactor the payment structure to handle multiple pay requests for the same or different invoices.
The role of the structure pay_flow is not taken by a new structure called route.
The uncertainty structure is updated based on the result of a route, previously chan_extra and pay_flow were used instead.
The plugin global structure is now defined in payplugin.h
- move the plugin executable from pay.c to main.c, - adapt the plugin main program to handle concurrent pay calls,
Add a new implementation of the payment state machine. This is based in the `pay` plugin concept of payment modifiers, but here we take it to the next level. The payment goes through a virtual machine that includes calling functions and evaluating conditions.
Using enum renepay_errorcode simplifies the low level API of chan_extra and flow. We can extract information about the nature of a function call failure from its return value.
Resolve a selfpayment right from the result of `sendpay` instead of waiting for the notification.
- Update the uncertainty network with the gossmap+local_gossmods, - ignore channels that fail to give their capacity.
Expand the disabled set to include channels that are not present in the chan_extra_map/uncertainty network.
- use switch case over all possible WIRE_* errors, - remove the virtual machine for routefail, use a simple two step solution: 1. update the gossip and 2. handle error cases
Define a new object called disabledmap that carries information about the disabled channels and nodes.
Routes contain only routing information and the payment they're linked to can be obtained through the payment_hash. We remove the dependency of route building routines from the payment itself. In order to make plain payment information available we define a payment_info structure.
The route-builder checks the liquidity bounds of each route one at a time. Every route that satisfy the contraints is recorded in the uncertainty network and produces an HTLC burden on the channels it uses, so that the following routes cannot count on the same liquidity twice.
Listpeerchannels would update the local channel information setting the liquidity in the outgoing channel to known_min=known_max=capacity, when in fact it should be known_min=known_max=spendable.
Lagrang3
force-pushed
the
renepay-refactor
branch
3 times, most recently
from
May 7, 2024 06:50
334f382 to
7849329
Compare
This was referenced May 9, 2024
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR I would like to make some code refactoring.
Changes:
struct chan_extraandstruct flowinto two different modules,remove_completed_flow,remove_completed_flowset,commit_flow, andcommit_flowset,struct route, instead ofstruct pay_flow,