Uh oh!
There was an error while loading. Please reload this page.
Support client_trusts_lsp=true on ldk-node - #687
Conversation
👋 Thanks for assigning @joostjager as a reviewer! |
4927b73 to
27dc7b4Comparetoneloc
commented
Oct 29, 2025
With LDK Node including this PR, I got a compilation error and had to add these imports It compiled after that, then I tried to do LSPS2 JIT onboarding, but it failed ("route not found" from the client side). Note sure if that's an issue with this PR or me. |
martinsaposnic
commented
Oct 29, 2025
I’m sorry. This should have been a draft. I just cherry picked the commits from the old PR. I will make CI pass in the next few days |
tnull
commented
Oct 30, 2025
Alright, @martinsaposnic please ping me for review as soon as this is ready! |
toneloc
commented
Nov 11, 2025
Any progress here? Thanks @martinsaposnic |
7835f72 to
97d9e53Comparemartinsaposnic
commented
Nov 13, 2025
@tnull this should be ready now. let me know if you have comments |
tnull
left a comment
There was a problem hiding this comment.
Actual code changes seem more or less trivial, but this PR needs some more cleanup.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| println!("Waiting for funding transaction to be broadcast... It will be there because LSP trusts the client, even though the client has not claimed it yet."); | ||
| let mut funding_tx_found = false; | ||
| for _ in 0..500 { | ||
| std::thread::sleep(std::time::Duration::from_millis(100)); |
There was a problem hiding this comment.
Ugh, let's avoid too many sleeps in tests please, as over time they will considerably slow down our CI for no reason. Please use wait_for_tx for stuff like this, which at least does some polling with back-off.
Uh oh!
There was an error while loading. Please reload this page.
97d9e53 to
767c564Comparetnull
commented
Nov 17, 2025
As discussed offline, I'm taking over here to ensure this lands in time for the upcoming 0.7-rc.1. Now added some fixups. |
joostjager
left a comment
There was a problem hiding this comment.
Just reviewed the fix up commits, as the preceding commits had already been reviewed.
Uh oh!
There was an error while loading. Please reload this page.
| Ok(false) | ||
| } | ||
| ) -> bool { | ||
| self.lsps2_service.as_ref().map_or(false, |lsps2_service| { |
There was a problem hiding this comment.
Same q about error logging.
There was a problem hiding this comment.
See above, I think continuing and just logging on the manual-broadcast step is preferable.
Uh oh!
There was an error while loading. Please reload this page.
| break; | ||
| } | ||
| for _ in 0..30 { | ||
| tokio::time::sleep(std::time::Duration::from_millis(100)).await; |
There was a problem hiding this comment.
In the happy flow, we are always waiting 3s I think. Is a loop necessary then? Maybe just delay 3s and check.
| Some(0) | ||
| ); | ||
| // No claim the JIT payment, which should release the funding transaction |
tnull
commented
Nov 17, 2025
Let me know if I can squash. |
tnull
commented
Nov 17, 2025
Now attached another commit that downgrades two explicit |
joostjager
commented
Nov 17, 2025
This does sound that we aren't able to fully distinguish between edge cases and actual misuse? I can see that this might be enough for now though. |
Implement changes introduced on lightningdevkit/rust-lightning#3838 as discussed, client_trusts_lsp is a flag set at startup.
Previously, we'd explicitly `panic` on an APIMisuseError. While this error type should still never happen, we avoid explicit panics in favor of `debug_assert`s here.
e2db7c7 to
039aad4CompareUh oh!
There was an error while loading. Please reload this page.
toneloc
commented
Nov 18, 2025
Awesome guys! Thanks. Could I test this from main? Any config / upgrade considerations to run? Or just the "client_trusts_lsp" flag to "true"? |
toneloc
commented
Nov 18, 2025
I'm curious as to how this onboarding flow should work. Would love some docs helping users understand the flow (happy path, unhappy path), and ready help in that regard. |
toneloc
commented
Nov 19, 2025
Oh, I think I get it. The test in this PR helped out. The server side just needs to add the The client needs to get the JIT invoice from a new function The client can plug in a custom hash to that function using the below code (I presume this is the safe/canonical way to do it): The client should keep track of that preimage (somehow) then upon the |
tnull
commented
Nov 19, 2025
No, this isn't correct. You simple have to set |
tnull
commented
Nov 19, 2025
Now opened #707 to expand on the docs a bit. |
toneloc
commented
Nov 19, 2025
Thank you. Will continue conversation at #707. |
implement changes introduced on lightningdevkit/rust-lightning#3838 for rust-lightning.
as discussed, client_trusts_lsp is a flag set at startup.