Skip to content

fix: restore mesh assertion to 2 P2P connections minimum#107

Merged
sanity merged 2 commits intomainfrom
fix-restore-mesh-assertion
Feb 16, 2026
Merged

fix: restore mesh assertion to 2 P2P connections minimum#107
sanity merged 2 commits intomainfrom
fix-restore-mesh-assertion

Conversation

@sanity
Copy link
Contributor

@sanity sanity commented Feb 16, 2026

Summary

Context

PR #105 lowered the mesh assertion bar because peers couldn't form enough P2P connections within the timeout. This masked the real problem: freenet-core's topology maintenance loop had a 60-second tick rate and BTreeSet deduplication that limited peers to ~1 connection attempt per minute.

freenet/freenet-core#3039 fixes the root cause by:

  1. Using a 5-second tick when below min_connections (instead of 60s)
  2. Spreading target locations across the ring (avoiding BTreeSet dedup)
  3. Draining all pending connections per iteration (up to MAX_CONCURRENT_CONNECTIONS)

With the freenet-core fix, peers reach 2+ P2P connections well within 90 seconds.

Test plan

  • CI six-peer Docker NAT regression test passes with restored assertion
  • freenet-core#3039 merged first (dependency) ✅

Closes #106

[AI-assisted - Claude]

sanity and others added 2 commits February 16, 2026 00:02
Reverts the weakening from PR #105 which lowered min_p2p_per_peer
from 2 to 1 and max_wait from 90s to 60s. The underlying issue
(slow topology formation) is fixed in freenet-core PR #3039 which
accelerates the topology maintenance loop for peers below
min_connections.

Closes #106

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…name

freenet-core renamed serve_gateway to serve_client_api upstream.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sanity sanity merged commit e4a0eed into main Feb 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: revert weakened mesh assertion and properly debug six-peer connection formation

1 participant