Skip to content
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

[BOUNTY] Community Improvement Bounties - libp2p - gossipsub visualizations: fork and adapt meshsim #26

Open
raulk opened this issue Aug 22, 2019 · 13 comments

Comments

@raulk
Copy link

raulk commented Aug 22, 2019

gossipsub visualizations: fork and adapt meshsim

Life would be fantastic if we could visualize the behaviour of gossip meshes. Fork the fantastic matrix-org/meshsim visualizer, developed by our friends at Matrix.org, make it run and visualise gossipsub nodes, and run home with 2000 EUR extra in your pocket 🤑

This is what meshsim is capable of doing now. Your goal is to replace the backend with gossipsub nodes!

image
(copied from matrix-org/meshsim)

How to qualify

Get familiarised with matrix-org/meshsim. It's very well written and structured, so that should be straightforward. You will need to fork it and modify it as described next.

The goal is to reuse the same frontend and network QoS configuration logic as meshsim, but adapting the backend to launch libp2p daemons instead of matrix servers.

Since meshsim relies on docker containers, you will first need to create a Dockerfile for https://github.com/libp2p/go-libp2p-daemon/. This should be pretty straightforward.

With every click on the canvas, a container of this image should be launched and connected to the network using the same topology heuristic that's in effect now.

In order to make the message flow viz work, you'll probably need to fork https://github.com/libp2p/go-libp2p-pubsub to add log statements, that can then be picked up by the visualizer to feed the animations.

In theory we could instrument any gossipsub implementation (there are JS and Rust ones), but go is our top priority since it serves as the reference implementation.

Dragging and dropping on the canvas and everything else should work as it currently does.

Following the spirit of the current repo, you should create scripts to make it easy to send messages of different sizes and content to the mesh.

Resources

Check out:

Feel free to use @raulk as a walking encyclopedia for all things libp2p.

Judging Criteria

  1. It actually works, and you can demo it.
  2. Completeness, correctness, cleanliness and maintainability of code.
  3. Pull requests upstream with new features or improvements you may add along the way \o/ Contribute back to the original authors!

Prizes

  1. 750 EUR via Protocol Labs.
  2. 750 EUR via the Ethereum Foundation.
  3. 500 EUR via Community Improvement Bounties fund.
@ara4n
Copy link

ara4n commented Aug 22, 2019

I can answer questions (modulo time constraints) on how meshsim works :)

@protolambda
Copy link

That's fun, I have been thinking of implementing something like this long term. But planned to focus on chain activity (forks, slashigns, deposits) visualization in network-graph form first (have a WIP implementation). Anyway, definitely down to talk at ethberlin, and maybe help out whoever likes to pick this up. Maybe @ChainSafe @GregTheGreek and/or @whiteblock @zscole

@djrtwo
Copy link

djrtwo commented Aug 22, 2019

The Ethereum Foundation is chipping in 750 EUR for this bounty!

@raulk
Copy link
Author

raulk commented Aug 22, 2019

@protolambda have you checked out the Filecoin network visualizer? Demo: https://youtu.be/clzivvkpKpc We (PL) might be able to help.

@protolambda
Copy link

@raulk No, but thanks for sharing. I like the one shown in this issue better however, as a higher node count and a complicated network topography don't fit the filecoin visualization approach so well.

And then there are also the contents of the graph to consider: one could just render the gossibsub things, or annotate it with message types, committtees, etc. (if we use it for Eth 2)

@valer-cara
Copy link

I'd like to take a shot at this 👋

@raulk
Copy link
Author

raulk commented Aug 23, 2019 via email

@bowd
Copy link

bowd commented Aug 25, 2019

we did it!

https://devpost.com/software/libp2p-gossip-pubsub-visualisation

@ara4n
Copy link

ara4n commented Aug 25, 2019

wow, congrats! i should apologise that the original meshsim code was written in a bit of a rush and is certainly not our best work (i deeply regret the webapp being a tangle of procedural JS rather than React) - but based on the devpost writeup it sounds like you made massive improvements. We’d love to get the code merged (and use this for our own libp2p experiments!)

@bowd
Copy link

bowd commented Aug 25, 2019

@ara4n Yeah I didn't open a PR yet because we didn't have time to update the documentation but we're gonna do that in the following days, other than that it should be more-or-less margeable, we can talk through some particulars when the PR is open. You can check the code at https://github.com/valer-cara/meshsim/ for now.

If this is actually useful I have a ton of improvement ideas.

@raulk
Copy link
Author

raulk commented Aug 25, 2019

@bowd thanks for the submission. This is fantastic. Would be great if you updated the README.md with concrete instructions to run gossipsub nodes from scratch, including building the docker images. Ping me if you're still around so we can go through a demo together.

@bowd
Copy link

bowd commented Aug 25, 2019

@raulk we're still around, at a table close to the inner courtyard (with the icecream van), do you wanna meet here?

@raulk
Copy link
Author

raulk commented Aug 25, 2019

@bowd already syncing with @valer-cara over Telegram.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants