-
Notifications
You must be signed in to change notification settings - Fork 266
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
Use NodeAddress
everywhere instead of InetAddress
#2202
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change, this will also make it much easier to implement lightning/bolts#911
Also, in cluster mode all outgoing connections (including tor) are now made on the front.
Can you remind me why we previously couldn't resolve tor addresses on the front?
eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/LightningMessageTypes.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/LightningMessageTypes.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Bastien Teinturier <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2202 +/- ##
==========================================
+ Coverage 83.86% 83.89% +0.02%
==========================================
Files 186 186
Lines 13940 13952 +12
Branches 580 590 +10
==========================================
+ Hits 11691 11705 +14
+ Misses 2249 2247 -2
|
There is no reason to use the version of guava targetting android anymore. Also `HostAndPort` was in beta in our current lib version. We now use guava's `InetAddresses.toUriString()` to format host string, instead of manually adding brackets. Reworked `NodeURI` tests: - less repetition with one single test and multiple `testCases` - focus on non-reg (no need to verify what we know we don't support)
There is no real reason, except that a prerequisite was to move the tor gateway on a separate machine, which happened later. |
eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/LightningMessageTypes.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This makes us control more strictly when and where name resolution happens, which is important in a security-hardened setup. The
InetAddress
jdk class indeed does a lot of things behind the scenes, but now we restrict it to tcp-related classes likeClient
andServer
.Also, in cluster mode all outgoing connections (including tor) are now made on the front.