openmina / mina-frontend

mina-frontend is an Angular web application that is showing node's progress, logs and statistics.
Other
1 stars 0 forks source link

[UX/UI] As a Developer, I want to understand network topology, so I can debug Kademlia, Gossipsub #82

Open lukasimrich opened 5 months ago

lukasimrich commented 5 months ago

Overview

This task closely relates to Libp2p, and its implementation Goal

Front End / UI

Tasks

Initial Steps

Later

lukasimrich commented 5 months ago

Week 2

Discovery & Research

DONE

UI Concept

Image

Image

Image

Image

Image

lukasimrich commented 5 months ago

Week 3

UI

Image

Image

Image

lukasimrich commented 4 months ago

Week 5

Focus on Expander Graphs

Image

Main Thesis: Expander graphs are desired, we want to check how close our network topology to an expander graphs is.

Expander graphs have small sets of vertices that are incredibly well connected to the rest of the graph. They are characterized by having a large spectral gap, which means they don’t have obvious “weak points” where they can be easily split. Expander graphs are fascinating because, despite their sparse appearance (not many edges), they boast strong connectivity properties

So we need a way to identify expander graphs, the very key metric is spectral gap. The reason why is cheegers inequality: The Cheeger inequality bridges the gap between this concept and the spectral properties of the graph, specifically relating the Cheeger constant to the second smallest eigenvalue (λ2) of the graph’s Laplacian matrix. It essentially tells us that you can infer how hard it is to “cut” the graph by looking at λ2. If λ2 is small, the graph has a significant bottleneck, making it easier to cut it into two big pieces with a small boundary. This is astonishing because it links a purely combinatorial property (the difficulty of making a cut) to a spectral property (an eigenvalue).

Now lets go to UI part, based on the above, we should have: Degree distribution expander graphs have sparse appearance (not many edges), vertices have relatively small degree expander graphs typically have a relatively uniform degree distribution, meaning most nodes have a similar number of edges Spectral gap - the second smallest eigenvalue (λ2) of the graph’s Laplacian matrix For irregular graphs, the expansion properties are closely related to the second-smallest eigenvalue of the normalized Laplacian matrix, λ2 Cheegers constant - quantifies the “bottleneck” of the graph - hard it is to separate the graph into disjoint components without cutting a significant number of edges Cheeger constant in interlinked with λ2, due to Cheeger inequality, so it is somehow repeating metric but still might be useful to have it and might be able to provide extra details Ramanujan graphs - special class of expander graphs that are considered optimal with respect to their expansion properties. they are regular, not sure how closely we can be with our topology to regular I guess, we can have them as a pinnacle of what is possible to achieve There is a ramanujan property check to see whether a graph is ramanujan, first the graph needs to be regular

Now UI shows hierarchically: How close we are to be an exapnder graph -> This is the strongly connected message in top left corner with key values backing it up Spectral cut - this should draw graph in such way, that if there are clear bottlenecks, human eye should be able to spot them - having bottlenecks mean, being less expander graph Right Panel showing Degree Distribition, the second smallest eigenvalue and other eigenvalues, cheegers contanst

lukasimrich commented 4 months ago

Week 7

Focus on KAD DHT

Image Image Image

lukasimrich commented 4 months ago

Week 8

Peer Distances Table Image Peer Distances Graph Image Inforgraphic Image