Skip to content

[Merged by Bors] - Improve Lighthouse Connectivity Via ENR TCP Update#4057

Closed
AgeManning wants to merge 7 commits intosigp:unstablefrom
AgeManning:update-tcp-address
Closed

[Merged by Bors] - Improve Lighthouse Connectivity Via ENR TCP Update#4057
AgeManning wants to merge 7 commits intosigp:unstablefrom
AgeManning:update-tcp-address

Conversation

@AgeManning
Copy link
Copy Markdown
Member

Currently Lighthouse will remain uncontactable if users port forward a port that is not the same as the one they are listening on.

For example, if Lighthouse runs with port 9000 TCP/UDP locally but a router is configured to pass 9010 externally to the lighthouse node on 9000, other nodes on the network will not be able to reach the lighthouse node.

This occurs because Lighthouse does not update its ENR TCP port on external socket discovery. The intention was always that users should use --enr-tcp-port to customise this, but this is non-intuitive.

The difficulty arises because we have no discovery mechanism to find our external TCP port. If we discovery a new external UDP port, we must guess what our external TCP port might be. This PR assumes the external TCP port is the same as the external UDP port (which may not be the case) and thus updates the TCP port along with the UDP port if the --enr-tcp-port flag is not set.

Along with this PR, will be added documentation to the Lighthouse book so users can correctly understand and configure their ENR to maximize Lighthouse's connectivity.

This relies on sigp/discv5#166 and we should wait for a new release in discv5 before adding this PR.

@AgeManning AgeManning added waiting-on-author The reviewer has suggested changes and awaits thier implementation. v4.0.0 Mainnet Capella release expected late March 2023 labels Mar 7, 2023
@AgeManning AgeManning added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Mar 14, 2023
@divagant-martian divagant-martian added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Mar 18, 2023
@divagant-martian
Copy link
Copy Markdown
Contributor

you also want to update discv5 age

@AgeManning AgeManning added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Mar 20, 2023
Copy link
Copy Markdown
Contributor

@divagant-martian divagant-martian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AgeManning
Copy link
Copy Markdown
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Mar 21, 2023
Currently Lighthouse will remain uncontactable if users port forward a port that is not the same as the one they are listening on. 

For example, if Lighthouse runs with port 9000 TCP/UDP locally but a router is configured to pass 9010 externally to the lighthouse node on 9000, other nodes on the network will not be able to reach the lighthouse node. 

This occurs because Lighthouse does not update its ENR TCP port on external socket discovery. The intention was always that users should use `--enr-tcp-port` to customise this, but this is non-intuitive. 

The difficulty arises because we have no discovery mechanism to find our external TCP port. If we discovery a new external UDP port, we must guess what our external TCP port might be. This PR assumes the external TCP port is the same as the external UDP port (which may not be the case) and thus updates the TCP port along with the UDP port if the `--enr-tcp-port` flag is not set. 

Along with this PR, will be added documentation to the Lighthouse book so users can correctly understand and configure their ENR to maximize Lighthouse's connectivity. 

This relies on sigp/discv5#166 and we should wait for a new release in discv5 before adding this PR.
@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Mar 21, 2023
@bors bors bot changed the title Improve Lighthouse Connectivity Via ENR TCP Update [Merged by Bors] - Improve Lighthouse Connectivity Via ENR TCP Update Mar 21, 2023
@bors bors bot closed this Mar 21, 2023
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
Currently Lighthouse will remain uncontactable if users port forward a port that is not the same as the one they are listening on. 

For example, if Lighthouse runs with port 9000 TCP/UDP locally but a router is configured to pass 9010 externally to the lighthouse node on 9000, other nodes on the network will not be able to reach the lighthouse node. 

This occurs because Lighthouse does not update its ENR TCP port on external socket discovery. The intention was always that users should use `--enr-tcp-port` to customise this, but this is non-intuitive. 

The difficulty arises because we have no discovery mechanism to find our external TCP port. If we discovery a new external UDP port, we must guess what our external TCP port might be. This PR assumes the external TCP port is the same as the external UDP port (which may not be the case) and thus updates the TCP port along with the UDP port if the `--enr-tcp-port` flag is not set. 

Along with this PR, will be added documentation to the Lighthouse book so users can correctly understand and configure their ENR to maximize Lighthouse's connectivity. 

This relies on sigp/discv5#166 and we should wait for a new release in discv5 before adding this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge This PR is ready to merge. v4.0.0 Mainnet Capella release expected late March 2023

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants