-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
💥 experimental: Iroh for webxdc statusUpdates #5041
Conversation
@link2xt can you care about the cargo deny fail? I reverted the addition of |
@Septias Ignore cargo-deny for now, it complains about duplicate dependencies and we may have these dependencies by the time this is merged. E.g. |
Now it makes sense to rebase as probably all migrations for the next release are merged, dependencies mostly updated etc. There is a security issue in the PR currently: we cannot use Message-ID as a gossip topic because Message-ID is not encrypted, which means the server which knows peer ID (from another chat, from mDNS or other source - it is not a private info) can join the gossip and read webxdc updates that are otherwise OpenPGP-encrypted. |
what about using the hash of the message-id? |
@link2xt anything you are missing from the iroh side to move this forward? |
I'm pushing this forward. |
Message-ID is public, so hash of Message-ID is public as well. |
@Septias no specific need, just would love to see this land and want to make sure you are unblocked |
No, I think DERP URLs was the only missing thing, then we can set up our own DERP server and point to it from provider DB or IMAP METADATA on chatmail. Otherwise what is missing is actually fixing this PR wrt. security and persistence of peer data without using a separate file. |
On Thu, Jan 18, 2024 at 07:20 -0800, Friedel Ziegelmayer wrote:
@Septias no specific need, just would love to see this land and want to make sure you are unblocked
if we include newer versions of Iroh crates with DC,
we also will still have Iroh 0.4 for multi-device setup.
To minimize added app size it would help have a Iroh 0.4 release that
updates as many dependencies as feasible to minimize redundant deps.
The general goal is how to get stability on the wire across DC/Iroh versions.
For the multi-device transition to new Iroh we will likely ship two Iroh versions
so that one can setup a new version from and old version of DC,
and/or get good guidance in case of mismatches.
When we drop Iroh 0.4 we'd hope that we can then use newer Iroh versions
for a while without having to consider shipping 2+ versions in DC :)
|
webxdcs can now have multiple gossip channels and decide where to send the message to.
I can take a look at reviving the update PR for device transfer, we can disable the relay parts, and so it would work the same as before. that way we can avoid the double iroh dep ideally |
1abb12e
to
2af9ff1
Compare
@adzialocha I guess it's important that we keep our secret key so that we can rejoin gossips after dc-restart? Also, see this |
Yeah, right, if we want to reconnect again we have to make sure that the peer ids do not change |
Notes
WebXDC Ephemeral Channels APIThe WebXDC API for developers will have two new methods The downside of ephemeral messages is that they are not automatically persisted in contrary to regular, mail-based WebXDC messages. WebXDC application developers need to explicitly handle persistence if desired (for example by sending regular, persisting WebXDC messages via SMTP), but ideally only use ephemeral channels for non-critical data, like cursor positions. IrohDeltaChat wants to use Iroh as an ephemeral channel provider, which attempts establishing direct p2p connections between peers (QUIC), using PlumTree as a gossiping protocol on top for efficient peer sampling. Iroh falls back to relay nodes when a direct connection can not be established. Even a relayed connection is faster than sending single WebXDC messages via mail. ImplementationEphemeral channels should lazily be established, to avoid bootstrapping p2p connectivity when it is not required for every running WebXDC app. By asking application developers to explicitly subscribe to or send ephemeral messages we can trigger Iroh to do the work for us. In any case we need a way to agree upon a gossip topic id among all (future) participants, this topic id should never be guessable or readable for anyone outside the chat.
Caveats / Open Questions
|
superseded by #5346 |
TODO:
Ensure that users stop receiving xdc updates when they are removed from the chat.(probably too difficult as the gossip topic aka Message-ID is the only secret and rotating it is hard, we should just state that anyone who received the message can still participate)