Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
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 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

This comment has been minimized.

Copy link

@ara4n ara4n commented Aug 22, 2019

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

@protolambda

This comment has been minimized.

Copy link

@protolambda protolambda commented Aug 22, 2019

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

This comment has been minimized.

Copy link

@djrtwo djrtwo commented Aug 22, 2019

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

@raulk

This comment has been minimized.

Copy link
Author

@raulk 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

This comment has been minimized.

Copy link

@protolambda protolambda commented Aug 23, 2019

@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

This comment has been minimized.

Copy link

@valer-cara valer-cara commented Aug 23, 2019

I'd like to take a shot at this 👋

@raulk

This comment has been minimized.

Copy link
Author

@raulk raulk commented Aug 23, 2019

@bowd

This comment has been minimized.

Copy link

@bowd bowd commented Aug 25, 2019

@ara4n

This comment has been minimized.

Copy link

@ara4n 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

This comment has been minimized.

Copy link

@bowd 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

This comment has been minimized.

Copy link
Author

@raulk 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

This comment has been minimized.

Copy link

@bowd 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

This comment has been minimized.

Copy link
Author

@raulk 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
Projects
None yet
6 participants
You can’t perform that action at this time.