Be able to connect / open a channel before the node is fully sync. #10216
Replies: 13 comments
-
After discussion with @Roasbeef yesterday, I think it worth clarifying that the goal is to be able to connect with a (semi-trusted) peer / create a channel before the chain and graph are synced. This would already be very helpful. Another more advanced use case could be to also accept payment in this not-yet-synced state but this would be difficult to implement to not break security assumption (so it's out of the scope of this ticket) |
Beta Was this translation helpful? Give feedback.
-
Actually, looking more into it, it seems the thing that would be needed is to be able to start the PeerNotifier earlier. Looking some logs:
at this point, no peer connection is possible.
1.5 min later, now the lnd can connect to another peer. Is there a hard dependancy between start peer notifier earlier and be able to be on the last block? Or what would be the tradeoff if starting Peer Notifier before the chain has been sync? |
Beta Was this translation helpful? Give feedback.
-
Even then, the node syncing will need to detect the channel as confirmed before being able to use it, so it'll need to wait until it's synced. Are you suggesting that this is bypassed as well?
The |
Beta Was this translation helpful? Give feedback.
-
Being able to initiate the channel opening would be the step I'd like to have without being fully synced. by the time the channel confirm (ie: the block get mined), it's likely the node will be synced. |
Beta Was this translation helpful? Give feedback.
-
There's an open PR that seems to do want you want to do: #3727 |
Beta Was this translation helpful? Give feedback.
-
oh, awesome. it seems to be a small diff. @wpaulino could you confirm this is the case? I'll close this ticket then |
Beta Was this translation helpful? Give feedback.
-
Hypothetically I guess this could as well be bypassed with the turbochannels fork of lnd (= trust unconfirmed). |
Beta Was this translation helpful? Give feedback.
-
If the node isn't synced, how can the node initiate an opening w/o knowing what UTXOs it has? |
Beta Was this translation helpful? Give feedback.
-
my assumption is that the other node is opening the channel |
Beta Was this translation helpful? Give feedback.
-
Where is this fork? |
Beta Was this translation helpful? Give feedback.
-
Sorry, I don't remember. I'll get back to you. |
Beta Was this translation helpful? Give feedback.
-
gotcha, yeah accepting a channel opening seems more plausible than initiating. in theory it'd be possible to externally fund a channel using the new funding APIs, but they'd need to be made available before the node is finishes syncing. one thing we will need to be cautious of implementation-wise is to prevent these early connections to nodes that we already have active channels with, otherwise we might bring up channels too soon in their lifecycle w/o making the host of safety checks that are typically performed. but if the main goal is just to get that first channel this doesn't seem too burdensome. |
Beta Was this translation helpful? Give feedback.
-
Converting this to a discussion. Can be reverted to the issue or a new one opened up if any development is planned for this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, if a node tries to open a channel before the chain (and graph?) is synced, lnd returns an error.
There is one use case where it would be useful to be able to open a channel while the chain is still syncing. It is if another node is offering to open a channel and lock up liquidity right away, in a way where there would be no risk for the synching node to accept the creation of the channel.
The reason the other node would open a channel as a result of some form of trust involved, eg: the other node know for some reason that he'll be able to send/receive transaction from this new node (think of a banking app to his customers), and is ok to lock up liquidity with a smooth/faster onboarding possible.
This would help to reduce onboarding time for new users to go from 0 to first successful lightning inbound transactions, especially on mobile phones.
Beta Was this translation helpful? Give feedback.
All reactions