Skip to content

ar: publish which visors can actually be reached, per transport type - #5270

Merged
0pcom merged 1 commit into
skycoin:developfrom
0magnet:ar-reachability
Sep 30, 2026
Merged

0pcom merged 1 commit into
skycoin:developfrom
0magnet:ar-reachability

Conversation

@0pcom

@0pcom 0pcom commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

A binding at the AR says a visor listens for a type, not that anyone can get through. Autoconnect now picks peers from a per-type reach record the AR publishes (new feed, dmsg port 76):

  • stcpr / squicr / swtr — the AR dials each bound address back (TCP connect; one unknown-version QUIC packet, which a listener answers with a version negotiation), so nothing waits for a peer to succeed first.
  • sudph — whether the visor holds its UDP control connection at the AR (without it the AR cannot make both sides punch), plus the NAT class the visor measured with STUN.
  • confirmations — each visor states when it last accepted an inbound transport of each type; these rank peers, they never gate them.

Known failures are skipped, confirmed peers are dialed first, untested ones get three dials per phase per cycle. Replaces the AR HTTP sudph list and the TPD stats/webrtc-visors leaf.

A binding says a visor listens for a type, not that anyone gets through.
The AR now keeps a reach record per peer and publishes it as a small feed
(dmsg port 76, reach/<h>):

- stcpr/squicr/swtr: the AR probes each bound address itself (TCP
  connect; one unknown-version QUIC packet, answered by a version
  negotiation), so no peer has to succeed first.
- sudph: whether the visor holds its UDP control connection at the AR,
  which the simultaneous open needs.
- the visor's own "reach" leaf in its AR-bind feed: STUN NAT class,
  types it serves, when it last accepted an inbound transport of each.

Autoconnect picks peers from it: known failures are skipped, confirmed
peers go first, untested ones get three dials per phase per cycle.
sudph and webrtc pairs are filtered by NAT class. Replaces the HTTP
sudph list and the TPD stats/webrtc-visors leaf.
@0pcom
0pcom merged commit 97546ed into skycoin:develop Sep 30, 2026
15 of 17 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.

1 participant