ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.85k stars 901 forks source link

Allow forcing an address for a peer #3085

Open rustyrussell opened 5 years ago

rustyrussell commented 5 years ago

Useful if you run more than one node behind a firewall.

Also, we might want to ensure hints get preserved (we save the last successful address, but it's not used AFAICT and anyway is useless if they connected in to us...)

https://bitcoin.stackexchange.com/questions/90518/networking-lightning-network/90575

Saibato commented 5 years ago

The whole point is a bit tricky, without exposing metrics that deanon Tor nodes, as ID is not changed. I prefer to spawn on the so called hidden side two or 3 nodes, with only one IP to be visible. The modded nodes I just use for testing and educational purpose have this stay semi local Tor functionality while still be fully part of the net, with only one line to change in source and if you like, I can share to a broader public. :heart_eyes: BTW> I also prefer the Mallers style and not to wait for the lizards ...

reablaz commented 5 years ago

I am the author of original question. Well, i agree that described case is pretty synthetic and if there are no real-life use-cases for that maybe it is not worth to implement such option.

Appreciate your attention guys!

Saibato commented 5 years ago

@reablaz in fact you triggered some thought and code process and good questions are equal important than good answers. Thanks!

Some fact that result from your questions, there is code in pipeline that enables optional a fixed V3 Tor onion for that channel derived from the shared secrets of the last payment. The idea is to be able to go on the fly to a quiet unannounced private Tor mode after first payment, since you both now know the derived onion address
Possible a super bad idea as i mix Tor secrets with lightning encryption, we will see if it works out. Maybe never, also bad ideas are sometimes fun to code, since it confronts you with deep buried shit that cry's don't look at me. You see your question has triggered ...

Also i think we will have soon some update policy while a channel is running to be reflected in db: what might be on node restart the only source of truth.