Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Gossipsub extension for Epidemic Meshes (v1.2.0) #413
base: master
Are you sure you want to change the base?
Gossipsub extension for Epidemic Meshes (v1.2.0) #413
Changes from 1 commit
587aacd
b19bcb8
847c56b
c03418c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Maybe we could be more aggressive, and send IHAVE (or a similar message) instantly?
This way, the worst delay induced by episub would be 1 RTT, instead of 700ms + 1 RTT (in the case of eth2)
It would also be easier to judge if a chocked peer is faster than unchocked ones
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.
Thinking about it, we would even let the "topic score" handle chocking / unchoking:
n
peers or peers with less thann
points)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.
I would rather not conflate scoring with this; scoring is a defense mechanism, while this is a bandwidth optimization mechanism.
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.
Also, I've tried to leave the scoring out, because its optional. I'd like 1.2 to work for those users who have opted out of scoring.
In regards to instantly sending the IHAVE, I'm not sure about the best approach.
I guess if we do it in the heartbeat we can group messages into a single IHAVE, rather than sending an IHAVE per message, but the downside is we can't identify peers that are sending messages faster than the mesh but within this timeframe.
Happy to go with either path here. Maybe we try simulate both and see how it goes?
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.
The basic overhead is quite easy to compute:
Here is a RPC message with an IHAVE:
1a0e0a0c0a04626262621204deadbeef
"deadbeef" is the message id, "26262626" is the topic
So we have 8 bytes of useful data, 8 bytes of headers & co
Even if we add the muxer headers etc, it's still <32 bytes overhead per message, which depending on the use case, might be a lot, or nothing :)
For instance, for eth2 block topic, that's nothing (at most 32 bytes every 12 seconds)
For an attestation topic, chocked peers will send:
(not counting topic & headers in the batched ihave, as they are enough attestation in one heartbeat that it doesn't matter)
So we loose 18% reduction on attestations, an about 0% on blocks
(sorry, I'm being eth2 centric here, but I think it highlights two very different use cases)
And of course, if we receive an IHAVE with an unknown block, we will request it, which will cost more bandwidth. That's seems harder to quantify, and even simulate, since it depends heavily on networking jitter, mesh topology, etc
Remains to see if these 18% are worth it :) I would say yes as it limit the latency cost quite drastically
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.
yeah, this needs some more thought.
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.
Yeah