Skip to content

routing: local balance check before path finding#3749

Merged
joostjager merged 7 commits intolightningnetwork:masterfrom
joostjager:extended-routing-failures
Dec 4, 2019
Merged

routing: local balance check before path finding#3749
joostjager merged 7 commits intolightningnetwork:masterfrom
joostjager:extended-routing-failures

Conversation

@joostjager
Copy link
Copy Markdown
Contributor

Fixes #1680

@joostjager joostjager force-pushed the extended-routing-failures branch 2 times, most recently from 962616c to 7939a9d Compare November 21, 2019 19:00
Copy link
Copy Markdown
Contributor

@cfromknecht cfromknecht left a comment

Choose a reason for hiding this comment

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

nice commit structure, only question i have is whether or not to also begin exposing the tlv failures as a specific rpc destination failure rather than no route found. it's not super in line with this pr, so may be best in a follow up

@joostjager joostjager force-pushed the extended-routing-failures branch 2 times, most recently from 05ffb0f to bbd7cd5 Compare November 26, 2019 09:35
@joostjager joostjager self-assigned this Nov 26, 2019
@joostjager joostjager added this to the 0.9.0 milestone Nov 26, 2019
@joostjager joostjager requested a review from guggero November 26, 2019 09:41
@joostjager joostjager force-pushed the extended-routing-failures branch from bbd7cd5 to a57595b Compare November 26, 2019 20:40
@joostjager
Copy link
Copy Markdown
Contributor Author

Todo: add test

@joostjager joostjager force-pushed the extended-routing-failures branch from a57595b to 7f7cc1e Compare November 27, 2019 08:14
Copy link
Copy Markdown
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Great work, the changes were very easy to follow.
This fix should really improve the UX of lnd, especially for beginners.
There are only two small things that should be fixed IMO, the rest is non-blocking.

@joostjager joostjager requested a review from guggero November 27, 2019 14:23
@joostjager joostjager force-pushed the extended-routing-failures branch from 7f7cc1e to 32900ec Compare November 27, 2019 14:23
Copy link
Copy Markdown
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

LGTM 💯

Copy link
Copy Markdown
Contributor

@cfromknecht cfromknecht left a comment

Choose a reason for hiding this comment

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

LGTM 👍

// or payment attempt isn't known to be within the current version of
// the channel graph.
ErrTargetNotInNetwork
ErrTargetNotInNetwork errorCode = iota
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

preexisting, but errorCode should be exported if ErrTargetNotInNetwork is also exported for godocs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could be made into a trivial follow up

@cfromknecht
Copy link
Copy Markdown
Contributor

two of the async benchmarks failed, perhaps an indicator that this introduces a performance regression?

@joostjager
Copy link
Copy Markdown
Contributor Author

two of the async benchmarks failed, perhaps an indicator that this introduces a performance regression?

Manually checked the timing of a queryroutes call on testnet, didn't see a difference with master. Restarted itests

@joostjager
Copy link
Copy Markdown
Contributor Author

Yes, does seem to be failing consistently. Will check it out.

A unified policy differs between local channels and other channels on
the network. There is more information available for local channels and
this is used in the unified policy.

Previously we used the pathfinding source pubkey to determine whether to
apply the local channel logic or not. If queryroutes is executed with a
source node that isn't the self node, this wouldn't work.
@joostjager joostjager force-pushed the extended-routing-failures branch from 32900ec to 9ae014e Compare December 4, 2019 08:45
@joostjager
Copy link
Copy Markdown
Contributor Author

Turned out to be a deadlock with getting the source node. Fixed now

@joostjager joostjager merged commit 883f9e5 into lightningnetwork:master Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

error messages payments Related to invoices/payments routing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect payment error message

3 participants