Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upgossip: initial impl of gossip package #272
Merged
+282
−2
Conversation
kademlia: adjust comments mod: add dependency for VictoriaMetrics/fastcache for gossiping
This comment has been minimized.
This comment has been minimized.
codecov
bot
commented
Feb 3, 2020
Codecov Report
@@ Coverage Diff @@
## master #272 +/- ##
==========================================
+ Coverage 69.87% 70.22% +0.35%
==========================================
Files 19 22 +3
Lines 1185 1246 +61
==========================================
+ Hits 828 875 +47
- Misses 261 269 +8
- Partials 96 102 +6
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
iwasaki-kenta commentedFeb 3, 2020
•
edited
This implements a naive gossiping protocol on top of Noise.
The communication complexity through unit tests roughly approximates to O(n^2) messages being sent out in total. A random exponential delay before emitting out the next round of gossip further reduces the number of rounds and messages sent.
Initial implementation used bloom filters for caching, which was then switched to dgraph-io/ristretto, which was then switched to VictoriaMetrics/fastcache with an in-memory cache size of 32mb.