Skip to content
GitHub no longer supports this web browser. Learn more about the browsers we support.
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

gossip: initial impl of gossip package #272

Merged
merged 1 commit into from Feb 4, 2020
Merged

gossip: initial impl of gossip package #272

merged 1 commit into from Feb 4, 2020

Conversation

@iwasaki-kenta
Copy link
Member

iwasaki-kenta commented Feb 3, 2020

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.

kademlia: adjust comments
mod: add dependency for VictoriaMetrics/fastcache for gossiping
@iwasaki-kenta iwasaki-kenta self-assigned this Feb 3, 2020
@codecov

This comment has been minimized.

Copy link

codecov bot commented Feb 3, 2020

Codecov Report

Merging #272 into master will increase coverage by 0.35%.
The diff coverage is 83.6%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
kademlia/protocol.go 60% <ø> (ø) ⬆️
gossip/msg.go 100% <100%> (ø)
gossip/events.go 100% <100%> (ø)
gossip/protocol.go 81.48% <81.48%> (ø)
client.go 64.45% <0%> (-1.57%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 668f664...575d6d0. Read the comment docs.

@iwasaki-kenta iwasaki-kenta merged commit dcd80aa into master Feb 4, 2020
3 checks passed
3 checks passed
Test
Details
codecov/patch 83.6% of diff hit (target 69.87%)
Details
codecov/project 70.22% (+0.35%) compared to 668f664
Details
@iwasaki-kenta iwasaki-kenta deleted the gossip branch Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.