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

Add pre-flight probing capabilities #147

Merged
merged 3 commits into from Aug 9, 2023

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Aug 3, 2023

Fixes #19.

Users might want to send pre-flight probes to train our scorer before sending the actutal payment.

Here, we add the capability to send payment probes either given an invoice or given an amount and the payee node_id.

@tnull tnull force-pushed the 2023-08-pre-flight-probing branch from 996b623 to 87265a8 Compare August 3, 2023 12:59
@tnull tnull requested a review from jkczyz August 8, 2023 09:36
@tnull tnull force-pushed the 2023-08-pre-flight-probing branch from 87265a8 to 92e2003 Compare August 8, 2023 12:02
src/lib.rs Outdated
})?;

for path in route.paths {
if path.hops.len() < 2 && path.blinded_tail.is_none() {
Copy link

Choose a reason for hiding this comment

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

Should we count the number of hops in the blinded tail, too?

Copy link
Collaborator Author

@tnull tnull Aug 9, 2023

Choose a reason for hiding this comment

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

Mh, good point. Tbh., I copied that check from https://github.com/lightningdevkit/rust-lightning/blob/7e3de7044896dbc4d2838f87870c7c58f2c7c756/lightning/src/ln/outbound_payment.rs#L907 to avoid the APIMisuseError here. I guess this could be change there, too? (cc @valentinewallace, if you happen to touch that sometime)

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@tnull tnull force-pushed the 2023-08-pre-flight-probing branch from 92e2003 to ec422e0 Compare August 9, 2023 08:00
Copy link

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

LGTM. Feel free to squash.

We add the capability to send a payment probe given an invoice.
We add the capability to send a payment probe given an amount and a
payee node id.
@tnull tnull force-pushed the 2023-08-pre-flight-probing branch from ec422e0 to 07364b8 Compare August 9, 2023 17:41
@tnull
Copy link
Collaborator Author

tnull commented Aug 9, 2023

Squashed fixups without further changes.

@tnull tnull merged commit bcb01f6 into lightningdevkit:main Aug 9, 2023
3 checks passed
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.

Add probing capabilities
3 participants