AutoNAT junk candidates
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 56/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- networking
Hướng nghiên cứu
Start in src/libp2p/discovery.rs and find where Identify candidates enter DiscoveryBehaviour::poll. Use libp2p's swarm address-translation helper to map each observed address to the observed IP with the node's listen port for the same transport, then add a unit test covering that translation. Done means the candidate set stays bounded, the translation test passes, and the 25-server reproduction reaches Public status.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[!CAUTION]
Issue AI-generated while investigating connectivity/reachability issues with crawlers.
Summary
Forest nodes behind a NAT that rewrites outgoing ports (Kubernetes, many Docker setups, CGNAT) never confirm their external address, even when their listen port is forwarded and reachable. They stay AutoNAT Private, don't advertise a public address, and are therefore absent from Lotus routing tables and from network measurements (see #7527).
Cause:
- Identify reports one observed address per connection. Behind such a NAT each outgoing connection is observed with a different port, so every observation is a distinct, undialable candidate. A home node collected 12 of them within seconds of startup.
libp2p-autonat(v1, 0.15) only ever adds candidates and never removes them (behaviour.rs:290). Every probe sends all candidates first, followed by our listen addresses (as_client.rs:190-195).- The go-libp2p AutoNAT server that Lotus runs dials the observed address plus at most 15 of the requested addresses, substituting the observed IP (
p2p/host/autonat/svc.go:150-193,maxPeerAddresses = 16). Once 15 or more junk candidates have accumulated,observed IP + listen port, the only address that would work, is never tried.
Reproduced locally with a calibnet node that was reachable throughout, connected through a port-rewriting proxy to go-libp2p's AutoNAT server code (only change: loopback dial-backs allowed, so the test could run locally):
| AutoNAT servers (junk candidates) | Probes | Status |
|---|---|---|
| 5 | 4/4 succeeded | Public, listen address confirmed |
| 25 | 3/3 failed | Private |
Proposed fix: identify's candidates pass through DiscoveryBehaviour::poll before they reach AutoNAT. Replace each one with observed IP + our listen port for the same transport (libp2p::swarm::_address_translation). The candidate set then stays small and contains the address that actually works for port-forwarded setups (k8s hostPort, Docker -p, cloud 1:1 NAT).
Completion Criteria
- Translate external address candidates to
observed IP + listen portinsrc/libp2p/discovery.rs - Unit test for the translation
- Verify with the 25-server reproduction: the node reaches
Public - Report the unbounded candidate set upstream (rust-libp2p
autonatv1)
Additional Links & Resources
- #7527
libp2p-autonat0.15src/v1/behaviour.rs:290,src/v1/behaviour/as_client.rs:190-195- go-libp2p v0.50.0
p2p/host/autonat/svc.go:125-193
- Ngôn ngữ chính
- Rust
- Star
- 700
- Fork
- 201
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 65
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ChainSafe/forest
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[automated] `cargo deny check advisories` failure @ 20/11/26 00:01Có thể đã có người làm @akaladarshi đã nhận hôm nay. Đang mởBug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
FIP-0119 implementation in `builtin-actors`Có thể đã có người làm @LesnyRumcajs đã nhận 2 ngày trước. Đang mởType: Task
ChainSafe/forest#7886 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ChainSafe/forest
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
benchmark-review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[App Request] ZaptideĐang mởapp-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
flatpark/flatpark#1423 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:image documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày