Skip to content

feat(p2p): support IPv6 #1144

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

Merged
merged 1 commit into from
Nov 21, 2024
Merged

feat(p2p): support IPv6 #1144

merged 1 commit into from
Nov 21, 2024

Conversation

luislhl
Copy link
Collaborator

@luislhl luislhl commented Oct 4, 2024

Motivation

We want to support IPv6 connections between fullnodes and support exposing their API through IPv6

Acceptance Criteria

  • We should be able to listen the API, the Stratum and the P2P port in IPv6 interfaces. This will be activated by a new CLI argument deemed initially as experimental: --x-enable-ipv6
  • We will also have a --x-disable-ipv4, to make nodes stop connecting to IPv4 endpoints. For now this will be used mostly for tests though, to force a fullnode to behave as IPv6-only.
  • The peers should relay IPv6 endpoints only to other peers that also have the IPv6 capability. Relaying them to old fullnodes would cause errors when they try to parse IPv6.
  • For simplicity, this PR only implements support for IPv6 addresses in endpoints, not domains that contain AAAA records

TODO

  • After merging, we should think about how to have permanent nodes that are dualstack and ipv6-only so we always test this is working

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@luislhl luislhl self-assigned this Oct 4, 2024
Copy link

github-actions bot commented Oct 4, 2024

🐰 Bencher Report

Branchfeat/ipv6-support-2
Testbedubuntu-22.04

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Lower Boundary
(Limit %)
sync-v2 (up to 20000 blocks)Latency
nanoseconds (ns)
📈 plot
🚨 alert (🔔)
🚷 threshold
87,441,074,608.48
(-13.65%)
91,133,317,445.79
(104.22%)
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Lower Boundary
nanoseconds (ns)
(Limit %)
Upper Boundary
nanoseconds (ns)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚨 view alert (🔔)
🚷 view threshold
87,441,074,608.48
(-13.65%)
91,133,317,445.79
(104.22%)
111,385,165,767.07
(78.50%)
🐰 View full continuous benchmarking report in Bencher

@luislhl luislhl force-pushed the feat/ipv6-support-2 branch from 8c37263 to cce1195 Compare October 4, 2024 15:12
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 85.50725% with 10 lines in your changes missing coverage. Please review.

Project coverage is 84.90%. Comparing base (d91513e) to head (dcb9a98).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
hathor/p2p/manager.py 50.00% 7 Missing and 1 partial ⚠️
hathor/p2p/peer.py 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1144      +/-   ##
==========================================
- Coverage   84.93%   84.90%   -0.04%     
==========================================
  Files         323      323              
  Lines       24985    25044      +59     
  Branches     3834     3846      +12     
==========================================
+ Hits        21222    21263      +41     
- Misses       3028     3042      +14     
- Partials      735      739       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@luislhl luislhl force-pushed the feat/ipv6-support-2 branch from 5aec274 to 744d84c Compare October 4, 2024 20:46
@luislhl luislhl changed the base branch from master to chore/improve-websocket-factory-start October 4, 2024 20:47
@luislhl luislhl force-pushed the chore/improve-websocket-factory-start branch from f83ceb0 to b6e9207 Compare October 4, 2024 20:50
@luislhl luislhl force-pushed the feat/ipv6-support-2 branch from 744d84c to 6769c47 Compare October 4, 2024 20:52
@luislhl luislhl force-pushed the chore/improve-websocket-factory-start branch from b6e9207 to 132943f Compare October 4, 2024 20:56
@luislhl luislhl force-pushed the feat/ipv6-support-2 branch 2 times, most recently from 7a772c0 to 1e28b80 Compare October 7, 2024 17:18
@luislhl luislhl force-pushed the chore/improve-websocket-factory-start branch from 132943f to 59af74d Compare October 7, 2024 19:34
@luislhl luislhl force-pushed the feat/ipv6-support-2 branch from 7923006 to a17535d Compare October 7, 2024 21:48
@luislhl luislhl force-pushed the chore/improve-websocket-factory-start branch from 59af74d to 1dc63f2 Compare October 7, 2024 22:33
jansegre
jansegre previously approved these changes Oct 7, 2024
@luislhl luislhl force-pushed the chore/improve-websocket-factory-start branch from 1dc63f2 to 09e7c50 Compare October 8, 2024 15:37
Base automatically changed from chore/improve-websocket-factory-start to master October 8, 2024 16:03
@luislhl luislhl dismissed jansegre’s stale review October 8, 2024 16:03

The base branch was changed.

@luislhl luislhl force-pushed the feat/ipv6-support-2 branch 3 times, most recently from e04acef to 8ac5ac6 Compare October 8, 2024 21:43
jansegre
jansegre previously approved these changes Oct 8, 2024
@luislhl luislhl force-pushed the feat/ipv6-support-2 branch 2 times, most recently from 47ca3b8 to 2dcb6c9 Compare October 9, 2024 20:32
jansegre
jansegre previously approved these changes Oct 11, 2024
@luislhl luislhl force-pushed the feat/ipv6-support-2 branch from 2dcb6c9 to 4a70d1e Compare October 17, 2024 15:55
@luislhl luislhl force-pushed the feat/ipv6-support-2 branch 2 times, most recently from 1326268 to fb5596e Compare November 14, 2024 19:22
@luislhl luislhl force-pushed the feat/ipv6-support-2 branch 3 times, most recently from aba084c to 7e8e2b9 Compare November 18, 2024 18:08
@luislhl luislhl force-pushed the feat/ipv6-support-2 branch from 7e8e2b9 to dcb9a98 Compare November 21, 2024 16:10
@luislhl luislhl merged commit 4da0fb9 into master Nov 21, 2024
9 of 10 checks passed
@luislhl luislhl deleted the feat/ipv6-support-2 branch November 21, 2024 19:21
@jansegre jansegre mentioned this pull request Nov 26, 2024
2 tasks
@jansegre jansegre mentioned this pull request Dec 11, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants