arXiv:2610.32583cs.NIOct 2026

Manuscript Offprint

arXiv:2610.32583

GLP Networking API Specification

Dan Bachar, Ehud Shapiro

Abstract

Multiagent deterministic GLP (madGLP) [7] runs Grassroots Logic Programs (GLP) [5] as agents that communicate solely by asynchronous message passing, and assumes fair delivery: every message sent is eventually delivered. Each agent runs on a person's smartphone and is named by the person's public key. A grassroots platform depends on no global resource other than the network [4, 6], so the agents must reach one another face to face over Bluetooth Low Energy, on a local network, and across the Internet from behind NAT, with rendezvous servers that anyone can run for connection establishment. What madGLP requires of such a network, and what the network requires of the platform above it, has not been specified.

Here, we specify the networking layer beneath madGLP. The guiding principle is that anything that can be done in GLP is done in GLP: the layer provides what GLP cannot reach by itself — the network stack, the platform's location service, the platform's attestation of the application it runs, and cryptographic primitives — and everything above that line is GLP code: the social graph, friendship, introduction, the distribution of addresses and the reconnection of peers whose address changed, and the rendezvous protocol.

We specify three transport underlay realizations, all following one interface. Over the PAN and LAN transport underlays, an agent advertises a rotating recognition token derived from its key and the current time slot, so that a peer who knows the key recognises it before any contact and nobody else can track it; whether an agent answers an unrecognised contact is a trust level GLP sets per underlay, raised on entering a place GLP declared and lowered on leaving it. Over the WAN underlay, a rendezvous server is a host with a static address running the headless layer and a GLP rendezvous agent, which observes addresses and coordinates hole punching, relays no payload, and belongs to no social graph. On every underlay, the peers establish a mutually authenticated Noise session from their Ed25519 keys, IK when the initiator already knows the responder's key and XX only for a first contact under Open trust, and then attest to each other, per session and bound to the session's handshake hash, that each runs the application published under its developer's key, verified against Apple's and Google's public roots with no third party contacted during a session; we state what each platform's attestation proves and what it does not, and the runtime reports to the program whether a peer is attested. One message protocol carries payloads on every underlay, over UDP datagrams and over GATT writes, with fair, unordered, atomic and authenticated delivery, which is what madGLP assumes.

1 Introduction

Multiagent deterministic GLP (madGLP) [7] is a distributed runtime for Grassroots Logic Programs (GLP) [5] in which autonomous agents communicate solely by message passing, each agent on a person's smartphone and named by the person's public key. This document specifies the networking layer beneath madGLP: the interface that enables madGLP agents to run on separate devices communicating peer-to-peer, and the layer functions behind the system predicates by which GLP programs reach it. madGLP and the runtime's side of the seam are specified in the implementation paper [7]; the seam predicates are in the language paper's catalogue [5]; the operating system above the runtime, the Grassroots Super-App with its social graph (in preparation), is what decides whom to befriend and what an attested or unattested peer may be used for.

Layering. The guiding principle is that anything that can be done in GLP is done in GLP: the networking layer provides only what GLP cannot reach by itself—the network stack (PAN, LAN and WAN), the platform's location service (geofencing), the platform's remote attestation of the application it runs, and cryptographic primitives (Ed25519 signing and verification, the Noise handshake). Everything above this line is GLP agent code. In particular, the social graph [6], friendship, introduction, the distribution of addresses, the reconnection of peers whose address changed, and the rendezvous protocol are implemented entirely in GLP and are not part of this specification; to the networking layer, all madGLP messages are opaque payloads. The interface between the two consists of the API defined here together with ten system predicates of the language [5], whose layer functions Section 5 specifies.

One overlay, three underlays. The API is underlay-agnostic at its core: madGLP issues the same calls regardless of how a message travels. Three underlays realize the core, the overlay being the one address space of public keys over them:

• PAN (Bluetooth Low Energy, Section 3.3): communication between devices in direct radio range, enabling offline, infrastructure-free operation. The PAN is the bootstrap underlay where agents first meet face-to-face.

• LAN (a local network, Section 3.2): communication between devices on the same local network, found by DNS-SD over multicast DNS and carried over IP, with no radio and no server.

• WAN (Internet Protocol, Section 4): communication between remote devices at arbitrary distances, using UDP datagrams, with rendezvous servers for signaling and NAT traversal.

Some control operations are inherently underlay-specific—observing the agent’s own public address is IP-only—and are specified with their underlay rather than in the agnostic core, and called on that underlay’s sub-object (Section 2.2). PAN and LAN discovery—finding agents within radio range or on the same local network—spans both underlays.

Outline. Section 2 specifies the underlay-agnostic API the madGLP runtime calls. Section 3 specifies proximity PAN/LAN-based discovery and communication: its principles, then its realizations. Section 4 specifies the WAN realization. Section 5 specifies the layer functions behind the ten system predicates through which GLP agent code reaches the layer. Section 6 specifies the rendezvous server as a separate process, by its networking requirements only. Section 7 summarizes the complete API and its correspondence to madGLP.