Live data from Hacker News

Iroh: A library to establish direct connection between peers

github.com

41–50 of 61 posts

Re: Iroh: A library to establish direct connection between peers

#41
post #24
post #22

Earlier quoted context omitted.

To expand on this: iroh is a rust library. A NodeId is just an Ed25519 public key, but of course it has a distinct type. If in the future we want a different public key standard, it would be a different rust type. Encoding keys is mostly left to the user. The only exception are tickets. Tickets are postcard serialized and have a version field, so we can keep tickets compatible if we ever want to use a different publi…

I've been following Iroh's development for quite some time now and I have to say that I've been really impressed with what you've built so far. At one point I'm going to use Iroh (or something heavily inspired by it) as the transport layer for a project I am working on. Can't wait. I do have one question though while I have your attention: what was the reason you decided to use the Ed25519 public key as the NodeId di…

We decided to keep things simple. In general we try to provide one good way to do something instead of having a lot of options.

E.g. we only provide Ed25519 for keys and in iroh-blobs only BLAKE3 for hashing, instead of having a multihash scheme. Having the public key directly available is sometimes useful, e.g. for verifying signatures. It also allowed us to directly use the mainline extension BEP_0044 to store data for public keys.

That being said, I am very confident that we will be able to provide a relatively smooth transition if we ever have to switch from Ed25519 to another public key format.

For connection encryption we use a TLS extension called raw public keys in TLS, and here of course the keys are prefixed, and we could easily upgrade to another key format and then at some point stop supporting Ed25519 keys.

raw public keys in TLS: https://datatracker.ietf.org/doc/html/rfc7250 storing arbitrary data in the DHT: https://www.bittorrent.org/beps/bep_0044.html

Re: Iroh: A library to establish direct connection between peers

#43

I attended a workshop for iroh a while ago and really enjoyed it, and from what I can tell on the Discord server the folks developing it are gearing for a 1.0 release soon-ish. There's also Dumb Pipe and SendMe which are demos (I believe) built on iroh to showcase some of its uses, and at the workshop we were shown a video of a startup using iroh for video game streaming (something similar to the old OnLive). From wh…

Was the workshop recorded?

Re: Iroh: A library to establish direct connection between peers

#44
post #30

I work on connet [1] and from what I've seen iroh seem pretty cool. A few random thoughts I had while watching the presentations/reading the docs: * the relays serve both for discovery and relay. In connet these are separate responsibilities, e.g. it has control server for discovery and a relay server for relaying connections. * it seems that the connections to the relays in iroh are TCP (at least what was said in on…

> * the relays serve both for discovery and relay. In connet these are separate responsibilities, e.g. it has control server for discovery and a relay server for relaying connections.

What are the relative advantages/disadvantages of these two strategies?

Re: Iroh: A library to establish direct connection between peers

#49

The promise of this is super interesting. How would people compare it to libp2p? Is libp2p a lower level toolkit that leaves the assembly to you?

Each time I looked at libp2p I didn't even knew where to begin. With Iroh it was trivial to get connections.

Also, AFAIK, Iroh makes some architectural choices (using relays to help establish connections), that make it less "pure p2p", but much more likely to actually work reliably.

Re: Iroh: A library to establish direct connection between peers

#50
post #45

Does this always have to be p2p or does it also allow for client server architecture

The two sides are peers when it comes to connection establishment, but once you have a connection they can and frequently will have different roles.

Many existing iroh protocols have clear client and server roles once the connection is established. E.g. gossip is a peer to peer protocol, blobs is a client server protocol in that one side provides data and the other requests it.

For a client you can use an ephemeral node id and not publish your info to discovery, since you will never be dialed yourself.

Post reply on HN