DCUtR (Direct Connection Upgrade through Relay) for non-reachable NAT-ed peers
Maintainers usually reply within 2 days
@misaakidis is already working on this.
Since Sep 12, 2026.
Assessment
This issue has not been assessed yet.
Description
Summary
Currently, the Swarm overlay places disproportionate structural load on inbound-reachable (publicly connectable) nodes to maintain topology health and indirectly connect NATed peers.
Introducing libp2p DCUtR (Direct Connection Upgrade through Relay) would allow two initially non-reachable Bee nodes to upgrade from relayed to direct connections when possible, reducing long-term reliance on public nodes and improving stability, performance, and fairness of the network.
Motivation
Swarm functions with outbound-only nodes, but this leads to:
- reduced connectivity entropy, lower peer diversity,
- traffic concentration on reachable nodes, causing higher impact from churn.
- pull syncing practically requires at least one reachable anchor node in a neighborhood; DCUtR can release this requirement by enabling unreachable peers at the same depth to connect directly.
DCUtR does not eliminate the need for reachable nodes, but reduces the network's structural burden by shortening relay lifetimes and creating more direct peer edges.
For users:
- More effective peer connectivity → more routing paths → higher chance of finding a fast, available responder
- Less jitter and improved latency → More predictable UX under load (e.g. less fluctuation in stream consumption.)
For node operators:
- Better discoverability despite NAT → more opportunities to serve bandwidth
- Improved pull-sync robustness → lower hardware and bandwidth requirements
- More stable peer sets even without a public IP
- Relayers economically compensated via SWAP for negotiation traffic
For the network:
- More evenly distributed connectivity graph
- Reduced dependency on a small subset of public nodes → improved resilience to churn and localized failures
- Better long-term scalability of topology maintenance
Implementation
Use existing peer connections as temporary relays for DCUtR signaling. Attempt direct connection upgrade after direct connection failure.
-
SWAP accounting
- Relay-forwarded DCUtR signaling traffic must be accounted
- Relayers should be compensated for bandwidth used during negotiation
-
Fallback behavior
- Attempt DCUtR after direct connection failure.
- Use existing inbound-reachable peer connections as temporary relays for DCUtR signaling. If the target node is not connected to any of the reachable peers then log this out.
-
Topology changes
- Re-evaluate restrictions that discourage storage or forwarding on non-reachable nodes, e.g.: in kademlia or push syncing
-
Testing requirements
- test environment under partial DCUtR success with no reachable node in one neighborhood
- topology stability tests (with measuring tail latency under high concurrency)
- pull-syncing, retrieval and upload correctness
- relay accounting correctness
Drawbacks
-
Not a universal solution
- DCUtR does not work reliably with:
- symmetric NATs
- multi-layer NAT / CGNAT
- relayer located behind the same NAT as one peer
- DCUtR does not work reliably with:
-
Added complexity
- Increased complexity in p2p, accounting, and topology subsystems
- Harder to reason about emergent connectivity behavior
-
No benefit for browser clients
- Browsers cannot open raw TCP/QUIC sockets
- DCUtR does not improve browser connectivity
-
Reachable nodes still necessary
- Bootstrapping
- Browser access
- Even DCUtR requires that for initiating connections
- However, it reduces pressure on them and require less from them.
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 390
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 21
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ethersphere/bee
-
Chequebook deployment uses a fixed 175,000 gas limit; it needs about 630,000 under Glamsterdam (live on Sepolia since 2026-10-06)Possibly taken @sbackend123 claimed this 12 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ethersphere/bee#5650 · 1 assignee ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
ethersphere/bee#5666 ·
Maintainers usually reply within 2 days
-
Add a transaction inbox for outbound chain transactionsPossibly taken @sbackend123 claimed this 6 days ago. Openseen
Difficulty 5/5 Over a week Newbie friendliness 35/100
ethersphere/bee#5660 · 1 assignee ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
ethersphere/bee#5659 ·
Maintainers usually reply within 2 days
-
accepted seen
Difficulty 4/5 3-5 days Newbie friendliness 40/100
ethersphere/bee#5648 · 1 comment ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
devlikeapro/waha#2322 ·
Maintainers usually reply within 2 days