mit-dci / lit

Lightning Network node software
MIT License
551 stars 119 forks source link

Connect to known nodes via Noise_XK #307

Closed Varunram closed 5 years ago

Varunram commented 6 years ago

Since we know the pubkey of nodes we connected to previously, use Noise_XK to connect to them and connect to new nodes using Noise_XX

delbonis commented 6 years ago

Should we have some way for forcibly connect to a known node using XX?

Varunram commented 6 years ago

Hm, to break the trust web that the PK provides, nice idea, maybe I'll put that into its own PR so that it doesn't delay this PR getting in :) Might want to have that option in lit itself to ensure that we don't trust anyone by their PKs permanently.

adiabat commented 6 years ago

This is cool -- not sure why you'd want to force XX though if you already have the key? It seems like the only advantage of XX is that you learn the remote key at the end.

Varunram commented 6 years ago

Thinking back, I don't know either. If he has a new pubkey, he'd have a new listening address as well. But might be that you want to forcibly connect because you want to reverify his PK or something..

adiabat commented 6 years ago

XK mode does (re?)verify their pubkey. It just doesn't tell you it if you don't know it already.

Varunram commented 6 years ago

Don't merge / review yet, needs rework on top of master.

Varunram commented 5 years ago

Closing this in favour of #435