-
Notifications
You must be signed in to change notification settings - Fork 9
refactor!: Port to irpc, remove quic-rpc and cli impl #67
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
base: main
Are you sure you want to change the base?
Conversation
Simulation report
Last updated: 2025-06-02T11:55:54Z |
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-gossip/pr/67/docs/iroh_gossip/ Last updated: 2025-06-02T11:50:55Z |
e3d6a72
to
4a7decc
Compare
413f3a8
to
6f2656f
Compare
cfefa65
to
a80bf1b
Compare
a80bf1b
to
51218d1
Compare
/// ALPN protocol name | ||
pub const GOSSIP_ALPN: &[u8] = b"/iroh-gossip/0"; | ||
/// Default channel capacity for topic subscription channels (one per topic) | ||
const TOPIC_EVENTS_DEFAULT_CAP: usize = 2048; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to crate::net::handles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks cleaner. It's missing the breaking changes description required for users to know how to upgrade
While working on the breaking changes list, these two points popped up that might need some consideration:
|
Description
quic-rpc
based RPC implementationirpc
for communication with theGossip
actor, enabling an identical API between local and RPC useGossipApi
. AGossip
instance always derefs toGossipApi
, butGossipApi
can also be created by connecting over RPC. Via this construction, the local and remote APIs are guaranteed to be identical.Gossip
only has these additional functions, which don't make sense over RPC:handle_connection
,shutdown
,metrics
, andlisten
(to expose via RPC).Breaking Changes
GossipReceiver
does no longer implementSync
. This should not be an issue, because all methods need&mut self
anyways. If this does bother you, please open an issue so that we can discuss.GossipSender
is no longerClone
, andGossipSender::send
needs&mut self
. This is a result of moving toirpc
, see this issuecli
module has been removed without alternatives, feel free to copy-paste code into your own crate.rpc
module has been removed. UseGossip::listen
andGossipApi::connect
to use iroh-gossip over a RPC connection.net::Error
variants changed:RpcSend
andRpcRecv
were removedGossip::subscribe_with_stream
has been removed. If you needed this, you'd need to build this with a task loop instead.Gossip::subscribe
,Gossip::subscribe_with_opts
andGossip::subscribe_and_join
are now methods onGossipApi
.Gossip
derefs toGossipApi
so this should need no changes.GossipApi::subscribe
(previouslyGossip::subscribe
) is now asyncNotes & open questions
Change checklist