iroh_net::discovery

Module pkarr

Source
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
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§

dhtDeprecateddiscovery-pkarr-dht
Pkarr based node discovery for iroh-net, supporting both relay servers and the DHT.

Structs§

PkarrPublisherDeprecated
Publisher of node discovery information to a pkarr relay.
PkarrRelayClientDeprecated
A pkarr client to publish pkarr::SignedPackets to a pkarr relay.
PkarrResolverDeprecated
Resolver of node discovery information from a pkarr relay.

Constants§

DEFAULT_PKARR_TTLDeprecated
Default TTL for the records in the pkarr signed packet.
DEFAULT_REPUBLISH_INTERVALDeprecated
Interval in which to republish the node info even if unchanged: 5 minutes.
N0_DNS_PKARR_RELAY_PRODDeprecated
The production pkarr relay run by number 0.
N0_DNS_PKARR_RELAY_STAGINGDeprecated
The testing pkarr relay run by number 0.