COBBLE MESH / ENGINEERING NOTES

Bring the connection
back to the players.

Cobble Mesh is Cobble’s optional multiplayer layer: local identities, signed invitations, node discovery and game-stream bridges. Built on libp2p, with connection details handled by the launcher.

Architecture notes · 2026.10.25

Current game workflows use explicit relays. Direct connections, AutoNAT and DCUtR have underlying components and remain under integration and validation.

01

Discovery finds peers. Relays carry streams.

The directory and game traffic take separate paths. A node directory provides bootstrap information; the launcher authenticates a persistent connection to configured seeds. An empty directory does not prevent connections through known seeds.

Scroll sideways to explore ↔

Directory and game traffic topologyNode directorydiscovery / bootstrapnode directoryknown seedsPlayer A · launcherlocal identity + bridgePlayer B · launcherlocal identity + bridgeRelay nodeauthenticated libp2p streamsRelayed peer streamsFurther routing: verified direct paths / DCUtR
Solid: current game relay path. Brown dashed: discovery and bootstrap. Bottom dashed: direct routing under integration. The directory does not forward game data.
02

A name to recognize. A key to verify.

An identity is generated and stored locally. The display name can change; the full PeerId is tied to the key and is used for connections and signature verification. The short suffix helps distinguish names; it is not a globally unique username.

Scroll sideways to explore ↔

The key derives a PeerId, the PeerId derives a short suffix, and the private key signs the profileLocal Ed25519 keyprivate key stays localPeerIdfull identity identifiername # short suffixSHA-256(PeerId bytes)[:6]SignedProfilename · revision · issued_at · expires_atsigncobble-mesh/user-profile/v1
The short suffix uses six digest bytes, displayed as 12 hexadecimal characters. Signed profiles carry an expiry and are checked for signature and time validity.

A signature proves that a message came from a party controlling the key, not a real name, unique person or lasting reputation. Temporary identities can be recreated, so identity alone does not prevent Sybil accounts. Switching identity changes the active session key while allowing the original identity and contacts to be retained.

03

A local address into a friend’s world.

The host opens Minecraft to LAN and confirms the port to create an invitation. A friend accepts it, and the launcher exposes a local TCP endpoint. Minecraft connects to that local address; the bridge targets only the game port approved by the host.

Scroll sideways to explore ↔

After invitation validation, a relay connects the local game endpointsGuest gameMinecraftGuest launcherMesh bridgeHost launcherMesh bridgeLAN worldMinecraftValidate invite · PeerId / proof / expiryOpen authenticated game stream via relayConnect locallyApproved portMinecraft TCP byte stream
Data path: guest Minecraft → local bridge → Mesh relay stream → host bridge → approved LAN port.

Invitations are credentials

An invitation carries identity, purpose and expiry. The recipient verifies its proof before opening the corresponding game connection. Share invitations with trusted recipients.

Routes come from evidence

A service connection, relay reservation and established game stream are distinct stages. Inspector uses connection identifiers, active streams and byte counts instead of inferring a game route from one direct-connection event.

04

One host. A shared place to play.

Current groups center on one host and support the host plus two guests. Each guest receives a local bridge address into the host’s game. This is an application-level game group, with no virtual adapter or shared LAN subnet.

Scroll sideways to explore ↔

Two guests connect through relay streams to the host, who connects to the LAN worldFriend Alocal TCP bridgeFriend Blocal TCP bridgeseparate relay streamsHost · grouphost-owned sessionGame worldapproved LAN port
Current capacity: three people. Sessions have a lifecycle; ending the host group ends its connections. This is the game topology, not an all-to-all network between members.
05

Established transport. Deliberate interfaces.

Rust and Tokio run the background service; libp2p provides identity, connections and streams. TCP uses Noise authentication and Yamux multiplexing. Protocol names separate identification, game streams and group streams.

PurposeProtocol / domainScope
Identify/cobblemesh/identify/1Peer identity and connection information
Game stream/cobblemesh/game-stream/0.1.0Invitation-scoped game bridge
Group stream/cobblemesh/group-stream/0.1.0/{peer}Per-peer group bridge
Signature domaincobble-mesh/user-profile/v1Domain separation for profile signatures

MeshNetworkSnapshot

The native service emits snapshots through mesh-network-changed. Probe results and actual session evidence are recorded separately.

phase · generation · attempt · retry_at
services · checks · last_error
session_route · session_evidence
  peer_scope · selected_connection
  bytes_sent · bytes_received
  active_streams · completed_streams

Plugin integration follows host permission boundaries: game context, scoped actions and resource handles for real consumers. A general Mesh plugin API still needs to evolve with those consumers; the current native snapshot is not a published stable SDK.

06

Every “online” needs evidence.

Online mode starts background connections without blocking the home screen. The first round makes up to three attempts, with a ten-second budget each, two- and five-second retry gaps, and jitter. Later retries back off. Turning Mesh off cancels active connections and retries.

Scroll sideways to explore ↔

Enabling online mode connects, authenticates, reconnects after disconnects, and recovers after failuresOfflinemode offConnectingattempt 1 → 3OnlineauthenticatedReconnectingconnection lostConnection failedbackground backoffrecover in the background
Disabling the mode invalidates the connection generation, so late events cannot restore online state. Online means an authenticated service connection; the actual game route is tracked separately.
Explore the source. Help refine the protocol.libp2p specifications ↗