-
Notifications
You must be signed in to change notification settings - Fork 66
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
Feat/teos ldk client #269
base: master
Are you sure you want to change the base?
Feat/teos ldk client #269
Conversation
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Update toolchain version Change the path to link cln
Add rust toolchain to cln-plugin.yml
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Signed-off-by: dzdidi <[email protected]>
Have you seen lightningdevkit/rust-lightning#2552 and the PR that it depends on (that was merged)? That was previous work on the LDK end to make this easier (I assume you're using those APIs?) |
(pasting this comment again on the right PR) Hey, I'll take some time and go through this PR today, awesome work on it so far :) |
Yes, absolutely. I hope that the current LDK code is sufficient to get what you need from LDK for TEOS, though the above-linked PR would make it way easier and more robust (would love it if someone wants to pick that up!). Happy to chat more, though I need to remind myself the status of everything. |
I think we better have separate modules for different clients since the end binary would be "either" for LDK "or" for CLN (and never "mix of features"). |
Me and @tnull couple of weeks ago we chatted about it and here are his key points:
|
Signed-off-by: dzdidi <[email protected]>
I'm a little confused how you implemented this without ever calling |
Yes, without having reviewed this PR yet, overriding |
Do you I understand correctly that for integration instead of on_commitment_revocation you want client to implement https://docs.rs/lightning/latest/lightning/chain/chainmonitor/trait.Persist.html ? |
Yes, for safety you need to use |
I'm still compiling and reading through things, but I'm happy to work on this one: lightningdevkit/rust-lightning#2552. Since it seems like it would be good to utlise that work in this PR? @dzdidi let me know if that is okay? |
@TheBlueMatt I am not really familiar with LDK and that
why do that? the watchtower client can retry the unreachable watchtowers later on its own but it doesn't have to halt the LDK node for that.
I guess you mean "the watchtower client" here? |
@sangbida sure 🙏 |
I understand this as effectively disabling entire node until watchtower replies. If so - why would somebody want to allow third party determine reliability of their own service? Especially given the support of multiple towers and aforementioned retry. At the same time, it makes perfect sense to me have LDK to dictate which interface client should implement |
Depends on what the user wants. If the point of the watchtower is to protect a mobile client (or generally one that might be offline often) then the watchtower is pretty critical. If a counterparty just DDoS' the watchtower and advances the state a few times with the client then they can pretty reliably broadcast a stale state (if you assume the client is offline often enough that this is practical - if you dont assume that then you don't need a watchtower at all...) because the client won't come back online to finish the upload. Having the option to pause the node for watchtower responses (or, eg, pausing the node to wait for at least one of N watchtowers to respond) is a pretty important option imo. |
aha i see ur point. imo, i would still not compromise usability for non-guaranteed security. i think the async/non-halting fashion is still pretty robust. if u have a chunry client, each time they come back online (open the app), they are reinforcing any old revocations that were not uploaded. the thing is, even if u halt the node to submit each single revocation to the tower, this isn't a 100% guarantee that the tower will respond to your channel breaches, so imo i would rather not degrade the usability for that. --
we can also let this be a configuration param for the developers to choose on their own. something like |
Hey, |
@sangbida Things done for now
Most of the logic is a copy/paste of core-lightning client removal of what was standing out as unnecessary
SQLite storage is replaced with LDK's KV Store (in the most naive way)
All original unit tests are passing
I guess we can just comment on diff with things that needs to be done and start picking them one by one.
Also if you have a better process in mind please let me know, this was the first thing I've came up with