-
Notifications
You must be signed in to change notification settings - Fork 22
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
Offers: send payment #90
Conversation
tests/integration_tests.rs
Outdated
lnd.connect_to_peer(pubkey, addr).await; | ||
lnd.connect_to_peer(pubkey_2, addr_2).await; | ||
let lnd_info = lnd.get_info().await; | ||
let lnd_pubkey = PublicKey::from_str(&lnd_info.identity_pubkey).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... before LDK 20 this integration test worked ok without channels set up. But now, it doesn't. IIUC LDK 20 requires a node to be in the network graph so it can find a way to forward a message, meaning channels need to be set up rather than just connections to peers. Planning to look into this further and ask the LDK team about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this with a small PR to rust-lightning to export a lower level version of "send_onion_message" in ldk-sample so we can set the path directly (like we did before) and get around the channels-required issue. lightningdevkit/rust-lightning#2868
6522401
to
2bcd34b
Compare
d67956e
to
2b72d7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to take a look at the semantics of LND's sendtoroute
API, pretty sure we'll be reporting a dispatched payment for an offer as successfully paid as is.
2bcd34b
to
f439ca3
Compare
2b72d7c
to
8d7d885
Compare
48bb807
to
c9c7d63
Compare
b41c013
to
b1d8e94
Compare
c9c7d63
to
c99be37
Compare
b1d8e94
to
8a8b2a4
Compare
c5a0640
to
5230aac
Compare
8a8b2a4
to
a479edc
Compare
5230aac
to
b221d0e
Compare
a479edc
to
b574ebf
Compare
b221d0e
to
6468dcf
Compare
b574ebf
to
fc061b7
Compare
6468dcf
to
c58fbe8
Compare
fc061b7
to
9821994
Compare
89423f4
to
c3a4f7d
Compare
9821994
to
2184d97
Compare
cbcb32a
to
661e889
Compare
ldk1.stop().await; | ||
ldk2.stop().await; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also look up the payment in LND and assert that it was successfully paid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the end of pay_offer we wait for trackpayment to return success so not sure we need to? But you know the lnd api better than me, would it be worth to use listpayments and double confirm that the payment succeeded?
c3a4f7d
to
be2714c
Compare
3c0d2ee
to
fe63c9e
Compare
be2714c
to
df53046
Compare
We use a custom version of tonic_lnd that has the blinded route support in the QueryRoute and SendToRoute commands, which won't officially be released in lnd until v18.
We update to ldk v20 for the latest blinded route updates, namely being able to create a blinded route that's more than one hop. On top of that we use a custom versoin with a small change, which we need in order to send an onion message along a specified path for LNDK's integration tests: lightningdevkit/rust-lightning#2868
fe63c9e
to
4b491cc
Compare
Finishes the BOLT 12 offer flow by sending the payment. Depends on #89