Use NodeAddress everywhere instead of InetAddress#2202
Merged
Conversation
t-bast
reviewed
Mar 25, 2022
Member
t-bast
left a comment
There was a problem hiding this comment.
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
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)
Member
Author
There is no real reason, except that a prerequisite was to move the tor gateway on a separate machine, which happened later. |
pm47
commented
Mar 25, 2022
eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/LightningMessageTypes.scala
Show resolved
Hide resolved
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes us control more strictly when and where name resolution happens, which is important in a security-hardened setup. The
InetAddressjdk class indeed does a lot of things behind the scenes, but now we restrict it to tcp-related classes likeClientandServer.Also, in cluster mode all outgoing connections (including tor) are now made on the front.