Expand description
A discovery service which publishes and resolves node information using a pkarr relay.
Public-Key Addressable Resource Records, pkarr, is a system which allows publishing
DNS Resource Records owned by a particular SecretKey
under a name derived from its
corresponding PublicKey
, also known as the NodeId
. Additionally this pkarr
Resource Record is signed using the same SecretKey
, ensuring authenticity of the
record.
Pkarr normally stores these records on the Mainline DHT, but also provides two bridges that do not require clients to directly interact with the DHT:
-
Resolvers are servers which expose the pkarr Resource Record under a domain name, e.g.
o3dks..6uyy.dns.iroh.link
. This allows looking up the pkarr Resource Records using normal DNS clients. These resolvers would normally perform lookups on the Mainline DHT augmented with a local cache to improve performance. -
Relays are servers which allow both publishing and looking up of the pkarr Resource Records using HTTP PUT and GET requests. They will usually perform the publishing to the Mainline DHT on behalf on the client as well as cache lookups performed on the DHT to improve performance.
For node discovery in iroh-net the pkarr Resource Records contain the AddrInfo
information, providing nodes which retrieve the pkarr Resource Record with enough detail
to contact the iroh-net node.
There are several node discovery services built on top of pkarr, which can be composed to the application’s needs:
-
PkarrPublisher
, which publishes to a pkarr relay server using HTTP. -
PkarrResolver
, which resolves from a pkarr relay server using HTTP. -
DnsDiscovery
, which resolves from a DNS server. -
DhtDiscovery
, which resolves and publishes from both pkarr relay servers and well as the Mainline DHT.
Modules§
- dht
Deprecated discovery-pkarr-dht
- Pkarr based node discovery for iroh-net, supporting both relay servers and the DHT.
Structs§
- Pkarr
Publisher Deprecated - Publisher of node discovery information to a pkarr relay.
- Pkarr
Relay Client Deprecated - A pkarr client to publish
pkarr::SignedPacket
s to a pkarr relay. - Pkarr
Resolver Deprecated - Resolver of node discovery information from a pkarr relay.
Constants§
- DEFAULT_
PKARR_ TTL Deprecated - Default TTL for the records in the pkarr signed packet.
- DEFAULT_
REPUBLISH_ INTERVAL Deprecated - Interval in which to republish the node info even if unchanged: 5 minutes.
- N0_
DNS_ PKARR_ RELAY_ PROD Deprecated - The production pkarr relay run by number 0.
- N0_
DNS_ PKARR_ RELAY_ STAGING Deprecated - The testing pkarr relay run by number 0.