Table of Contents
Protocol packages
blobs, gossip, docs, tickets, postcard, irpc, and quicconn — what each Go package implements and how much of the Rust protocol it covers.
Beyond connectivity, go-iroh ports the iroh protocol stack. Each package below targets the wire format of the corresponding Rust crate; each one also states its own coverage in its package doc, and those statements are the honest scope — read them before assuming full parity.
All three main protocols are ALPN-routed, so they mount behind the same
iroh.Router as your own protocols.
| Package | ALPN | Rust counterpart |
|---|---|---|
blobs |
/iroh-bytes/4 |
iroh-blobs |
gossip |
/iroh-gossip/1 |
iroh-gossip |
docs |
/iroh-sync/1 |
iroh-docs |
blobs — content-addressed transfer
The package “defines Rust-compatible iroh blob tickets, blob identifiers, and
transfer helpers”. Content is named by a 32-byte BLAKE3 Hash; a blob ticket
combines a provider endpoint address with a hash and a format, encoded as the
blob kind prefix followed by RFC 4648 base32 without padding.
Scope, stated in the package doc: “The transfer helpers implement the raw
full-blob subset of the iroh-blobs provider protocol.” Serving is
ServeBlob / ServeBlobStreams over a Store; fetching is DownloadBlob,
DownloadBlobRange, GetBlobBytes, GetManyBlobBytes, plus
DownloadBlobParallel for range-parallel fetches into an io.WriterAt.
Verified decoding of BAO-encoded bytes is available directly through
DecodeBlob*, and Observe streams Bitfield updates for a hash.
gossip — pub/sub over a mesh
The Go package doc scopes itself narrowly: “The package implements the
unidirectional stream framing used by iroh-gossip. Higher-level topic
orchestration and discovery live in later layers.” In practice the shipped
surface is NewGossip(ep, opts...), Topic, Sender/Receiver, JoinOptions
and an Event stream with NeighborUp-style kinds — the membership and
broadcast machinery (HyParView, PlumTree) lives in internal/gossipproto.
gossip.Discovery is a peer-discovery service built on a gossip topic; it
implements the address-lookup interfaces, so it can be registered like any
other discovery service. DefaultDiscoveryTopic is derived from the string
iroh-gossip-discovery-v1.
Gossip has its own live Rust interop gate; see Testing and interop.
For the protocol’s design, read upstream’s iroh-gossip documentation.
docs — multi-writer documents
docs implements the iroh-docs data and sync protocols. Upstream describes the
protocol as “multi-dimensional key-value documents with an efficient
synchronization protocol”; note the vocabulary, which the Go package keeps:
namespaces (a replica’s identity and write capability), authors, entries,
and range-based set reconciliation.
The Go package doc states its coverage: “the stable value types used to share document capabilities out of band, an in-memory entry store, the iroh-docs sync protocol over an iroh Router, and live synchronization over iroh-gossip.” The notable absence relative to Rust is persistent storage — the shipped store is in-memory.
Key types: Author/AuthorID, NamespaceID/NamespaceSecret, Capability
(read or write), Entry, Record, and DocTicket for sharing a capability
plus bootstrap addresses out of band.
endpointticket, blobs tickets, and the ticket registry
endpointticket encodes an address as a string starting with endpoint
followed by lowercase base32 without padding. blobs and docs define their
own kinds (blob, doc) and register into an endpointticket.Registry, so a
program can decode any ticket kind it has registered.
postcard, irpc, quicconn, watch, metrics
postcard— the Rust-compatible postcard wire codec used by the protocol packages and shared with the experiment modules.irpc— postcard-framed request/response helpers over an iroh connection: a genericCall[Req, Resp]returning a response iterator, andHandler.quicconn— “implements no application protocol of its own” (its package doc); it provides a QUIC-like surface overiroh.Connso an HTTP/3 implementation can run over iroh without another QUIC stack. Theh3irohexperiment module is the worked example.watch— observable values, the Go analog of Rust’sn0_watcher; this is whatWatchAddrandHomeRelayStatusreturn.metrics— a small OpenMetrics registry for endpoint counters.
Next steps
- Ecosystem map — experiment modules that build on these.
- Testing and interop — which of these are checked against Rust, and how.
- API map — package-by-package entry points.