Skip to content

routing: globalize mc#3298

Merged
Roasbeef merged 5 commits into
lightningnetwork:masterfrom
joostjager:globalize-mc
Jul 17, 2019
Merged

routing: globalize mc#3298
Roasbeef merged 5 commits into
lightningnetwork:masterfrom
joostjager:globalize-mc

Conversation

@joostjager
Copy link
Copy Markdown
Contributor

@joostjager joostjager commented Jul 11, 2019

This PR moves the last payment-specific mission control state into the global mission control instances.

Builds off of #3188

The PR is a base for #3221 and #3164

Comment thread lnwire/onion_error_test.go Outdated
Comment thread routing/payment_session_source.go Outdated
Comment thread routing/router.go Outdated
Comment thread routing/missioncontrol.go Outdated
@joostjager
Copy link
Copy Markdown
Contributor Author

Tacked on one more commit that cleans up the payment session, making the scope of this PR a bit more complete.

@joostjager
Copy link
Copy Markdown
Contributor Author

@Roasbeef you originally reviewed these commits in #3164. Replies to those comments are in that pr.

@joostjager joostjager requested a review from cfromknecht July 12, 2019 18:51
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.

@joostjager LGTM apart from nits on interface exporting ✅

@cfromknecht cfromknecht added this to the 0.7.1 milestone Jul 12, 2019
If nodes return a channel policy related failure, they may get a second
chance. Our graph may not be up to date. Previously this logic was
contained in the payment session.

This commit moves that into global mission control and thereby removes
the last mission control state that was kept on the payment level.

Because mission control is not aware of the relation between payment
attempts and payments, the second chance logic is no longer based
tracking second chances given per payment.

Instead a time based approach is used. If a node reports a policy
failure that prevents forwarding to its peer, it will get a second
chance. But it will get it only if the previous second chance was
long enough ago.

Also those second chances are no longer dependent on whether an
associated channel update is valid. It will get the second chance
regardless, to prevent creating a dependency between mission control and
the graph. This would interfer with (future) replay of history, because
the graph may not be the same anymore at that point.
As there is no more state kept in the payment session, failure reporting
can go straight to mission control.
Copy link
Copy Markdown
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🚁

@Roasbeef Roasbeef merged commit 92e14af into lightningnetwork:master Jul 17, 2019
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