Protocol IDs
This page lists every libp2p protocol and GossipSub topic a go-ricochet 1.1.0 server uses. For the bytes on each stream, see Wire format & status codes.
Ricochet protocols
Section titled “Ricochet protocols”The server registers these stream handlers in internal/server/server.go. Each stream carries one request frame and one response frame, then the server closes it.
| Protocol ID | Agent | Purpose | Direction | Operation selector |
|---|---|---|---|---|
/sf-network/submit/1.0.0 |
MSA | Submit one message | client → server | None: the request is a bare message |
/sf-network/submit/batch/1.0.0 |
MSA batch | Submit up to 100 messages in one request | client → server | None: the request is {"messages": [...]} |
/sf-network/access/1.0.0 |
MAA | Retrieve messages, flags, expunge, delete | client → server | operationType |
/sf-network/admin/1.0.0 |
MMA | Mailbox lifecycle, ACLs, capacity | client → server | operationType |
/ricochet/store/doc/1.0.0 |
SDA | Documents and the peer directory | client → server | operation |
/ricochet/store/feed/1.0.0 |
SFA | Append-only feeds | client → server | operation |
/ricochet/store/collection/1.0.0 |
SCA | Keyed JSON collections with queries | client → server | operation |
/ricochet/mailbox-notify/1.0.0 |
Notify | Push notification for a private mailbox | server → client | None: one notification per stream |
The server dials /ricochet/mailbox-notify/1.0.0 on the client. A client receives notifications only if it registered a handler for that protocol and is reachable. With features.enable_presence_monitoring on, the server first checks that it is connected to the peer or can connect to it, and skips the notification when it cannot.
Operations per protocol
Section titled “Operations per protocol”| Protocol | Operations |
|---|---|
| MAA | retrieve (the default when operationType is absent), markDelivered, updateFlags, expunge, deleteMessages |
| MMA | createMailbox, deleteMailbox, grantAccess, revokeAccess, listACL, listMailboxes, updateConfig, queryCapacity, getMailboxInfo |
| SDA | GET, PUT, PATCH, HEAD, DELETE, LIST, HISTORY, DIRECTORY, BATCH_PUT, ACCESS |
| SFA | CREATE, GET, APPEND, DELETE, LIST, BATCH_GET, ACCESS |
| SCA | CREATE, GET, PUT, DELETE, LIST, QUERY, ACCESS |
DIRECTORY takes a directoryAction of join, leave, browse or get. ACCESS takes an accessAction of get, set, grant or revoke.
Names in metrics and rate limits
Section titled “Names in metrics and rate limits”The same protocol short names label the protocol dimension of the request metrics and key rate_limiting.protocols.
| Short name | Protocol ID |
|---|---|
msa |
/sf-network/submit/1.0.0 |
msa_batch |
/sf-network/submit/batch/1.0.0 |
maa |
/sf-network/access/1.0.0 |
mma |
/sf-network/admin/1.0.0 |
sda |
/ricochet/store/doc/1.0.0 |
sfa |
/ricochet/store/feed/1.0.0 |
sca |
/ricochet/store/collection/1.0.0 |
mta |
None: the internal routing backstop, charged per message (rate limits only) |
GossipSub topics
Section titled “GossipSub topics”| Topic | Purpose | Server’s role | When |
|---|---|---|---|
/ricochet/mailbox/<ownerPeerID>/<folderPath> |
New-message notification for a shared or public mailbox | Joins and publishes; leaves after 15 minutes without a notification | features.enable_push_delivery |
/sf-network/services/announce |
Server announcement: capabilities, storage, region, uptime score | Publishes every intervals.service_announcement_min; subscribes to other servers’ |
Always |
/sf-network/services/heartbeat |
Readiness verdict between announcements | Publishes every intervals.health_check_min; subscribes to other servers’ |
Always |
/sf-network/presence/<serverPeerID> |
Online/offline events and online-set heartbeats for peers connected to this server | Joins and publishes | features.enable_presence_broadcast |
Each entry of pubsub.relay_topics |
Topics the server forwards for others | Joins and relays without subscribing | When listed |
Announcements and heartbeats are accepted only from the server they name, checked against the GossipSub signature. See Service discovery and Relayed GossipSub topics.
libp2p protocols
Section titled “libp2p protocols”The host is go-libp2p v0.49.0 built by go-p2p-forge v0.2.1. These protocols come from the libraries, not from Ricochet code.
| Protocol ID | Library | Purpose | When |
|---|---|---|---|
/yamux/1.0.0 |
go-libp2p | Stream multiplexer, negotiated on each connection | Always |
/noise |
go-libp2p | Security handshake; proves both peer IDs | Always |
/ipfs/id/1.0.0, /ipfs/id/push/1.0.0 |
go-libp2p | Identify | Always |
/ipfs/ping/1.0.0 |
go-libp2p | Ping | Always |
/ipfs/kad/1.0.0 |
go-libp2p-kad-dht | Kademlia DHT, server mode | Always |
/meshsub/1.3.0, /meshsub/1.2.0, /meshsub/1.1.0, /meshsub/1.0.0, /floodsub/1.0.0 |
go-libp2p-pubsub v0.15.0 | GossipSub | Always |
/libp2p/circuit/relay/0.2.0/hop |
go-libp2p | Circuit Relay v2 service | features.enable_relay_service |
/libp2p/circuit/relay/0.2.0/stop |
go-libp2p | Circuit Relay v2 client side | features.enable_relay |
/libp2p/dcutr |
go-libp2p | Hole punching | features.enable_hole_punching |
/libp2p/autonat/2/dial-request, /libp2p/autonat/2/dial-back |
go-libp2p | AutoNAT v2 | features.enable_autonat |
Transport
Section titled “Transport”The server’s only transport is UDX. Its multiaddrs have the form /ip4/<address>/udp/<port>/udx (multiaddr protocol code 0x0300). See Transport and UDX: Go, Dart, JS.