Protocol IDs
This page lists every libp2p protocol and GossipSub topic a go-ricochet 1.4.1 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/moderation/1.0.0 |
MOA | Bans, post removal, the connection log; moderators only | 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 |
| MOA | ban, unban, getBan, listBans, removePost, connections |
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 |
moa |
/ricochet/moderation/1.0.0 (metrics only; it has no rate limit) |
mta |
None: the internal routing backstop, charged per message (rate limits only) |
Moderation protocol
Section titled “Moderation protocol”Only peers in security.moderators may open it; anyone else gets 403
unauthorized: moderation requires a moderator before the request is read. See
Moderation & the connection log.
| Request field | Operations | Meaning |
|---|---|---|
operation |
all | The operation |
peerId |
ban, unban, getBan, connections, removePost |
The peer; for removePost, the post’s author |
reason |
ban |
Why, for the record; cut to 500 characters |
postId |
removePost |
The post’s id: no /, %, _ or \, at most 128 characters |
since |
connections |
Only connections made at or after this RFC 3339 time |
limit |
connections |
At most this many; default 500, at most 2000 |
| Response field | Operations | Meaning |
|---|---|---|
success, errorMessage, status |
all | Outcome; status is the status code |
ban |
ban, getBan |
peerId, reason, bannedBy, bannedAt; absent when not banned |
bans |
listBans |
Every ban |
wasBanned |
unban |
Whether there was a ban to lift |
connectionsClosed, listingRemoved |
ban |
Whether the peer’s connections closed and its directory listing went |
removal |
removePost |
entries, feeds, threadRemoved, media |
connections |
connections |
peerId, ip, remoteAddr, transport, direction, connectedAt, disconnectedAt; newest first |
retentionDays |
connections |
The log’s retention in days; 0 when it is off |
Banned peers
Section titled “Banned peers”A banned peer’s streams are reset on every protocol except the Ricochet protocols above, /ipfs/id/1.0.0,
/ipfs/id/push/1.0.0 and /ipfs/ping/1.0.0. On the Ricochet protocols every request gets 403
unauthorized: banned: a moderator banned this peer; only its trust-safety folder can be read, except an MAA
retrieve or markDelivered on its own folder trust-safety, and deleteMessages.
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 | UDX, TCP and WebSocket connections |
/noise |
go-libp2p | Security handshake; proves both peer IDs | UDX, TCP and WebSocket connections |
/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 runs the transports listed in server.transports; the default is UDX alone.
Name in server.transports |
Multiaddr form | Security and streams |
|---|---|---|
udx (default) |
/ip4/<address>/udp/<port>/udx (multiaddr protocol code 0x0300) |
/noise, /yamux/1.0.0 |
tcp |
/ip4/<address>/tcp/<port> |
/noise, /yamux/1.0.0 |
quic-v1 |
/ip4/<address>/udp/<port>/quic-v1 |
QUIC’s TLS 1.3 and streams |
websocket |
/ip4/<address>/tcp/<port>/ws, .../tls/ws or .../wss |
/noise, /yamux/1.0.0 |
webtransport |
/ip4/<address>/udp/<port>/quic-v1/webtransport/certhash/<hash>... |
QUIC’s TLS 1.3 and streams |
webrtc-direct and QUIC draft-29 (/quic) are refused. See Transport and UDX: Go, Dart, JS.