-
Notifications
You must be signed in to change notification settings - Fork 132
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
feat(iroh): Gossip client #2258
base: main
Are you sure you want to change the base?
Conversation
I think it is safe to just ignore any messages that are not for us. See b88398e Obviously you can mess with things by subscribing to a namespace that is currently being synced, but doing so accidentally is highly unlikely. And you can also mess with other stuff by using the low level blobs api, so 🤷 . |
It seems that due to the fact that the rpc protocol is public, we can not ever do an additional rpc request without breaking compat.
|
we need to mark the rpc enums as non exhaustive, that should solve this |
longterm I wish the rpc types where all private anyway |
@Frando can we change this? seems unfortunate to subscribe to everything by default |
I think we can, yes. What is our primitive of choice these days to merge a changing list of streams? with futures and thus its merge combinators phased out in iroh - maybe https://docs.rs/futures-concurrency/latest/futures_concurrency/stream/trait.Merge.html ? |
I did not yet give the new gossip dispatcher module a real review, but my first thought is: What about we move the |
#2265 changes the sync engine usage of gossip to not use subscribe_all (based on this branch). |
Description
This makes gossip available in iroh. Using iroh-gossip directly, while not horrible, is a bit verbose.
Breaking Changes
Not sure. It exports a few more things, and adds things. But in theory it should not modify existing things.
Notes & open questions
It seems that the sync engine thinks that it "owns" gossip, so it uses subscribe_all and then will deserialize everything, even messages that are not for it. How can we avoid that? Using an entirely different ALPN for normal gossip?
I think that relying on guaranteed delivery for gossip is not a good idea in any case. so maybe just sending a Lagged but then continuing is best? Forcing the client to resubscribe could be a bit annoying.
Change checklist