-
Notifications
You must be signed in to change notification settings - Fork 0
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
Produce GEFX graph for each run #135
base: main
Are you sure you want to change the base?
Conversation
I would lean towards including this code as it is fairly lightweight and easy to remove later if we want to. I haven't yet reviewed the code in detail (TODO) I do have several questions at this point:
|
Here's one from this run:
We might be able to do something like that! I think edges can also have weights, which we could set to the number of virtual channels. I think this would allow the graph to auto arrange based on the busy parts of the network.
Instead of trying to post an svg to grafana we could use this gephi JS library. It's a javascript library that provides a viewer for GEXF graph files. It displays the graph and also allows it to be interacted with. Here's an example. I think it provides a complete website to deploy to render your specific graph so it would be easy to spin up renders of different runs. |
c.gr.ObjectiveStatusUpdated(ObjectiveStatusInfo{ | ||
Id: id, | ||
Time: time.Now(), | ||
Participants: []common.Address{}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use empty participants list here?
Fixes #104
This outputs a xml file containing a GEFX graph representing the state channel network.
GEFX is just a xml format for describing a graph by specifying nodes and edges. It also contains temporal information (ie an edge exists between two nodes for some amount of time) which lets us "animate" our state channel network over time.
In the graph this PR generates we describe clients as nodes and channels as edges. We record information about when a channel is started and stopped and include that information in the graph.
The file can be loaded into a tool like gephi to display and animate the graph. It lets you colour nodes and edges based on their attributes (ie: an edge being a "virtual" or "ledger" channel).
Unfortunately the GEPHI tool doesn't handle multiple edges nicely (it just draws them over each other, so only the top most edge is visible). This makes the diagram and animations a lot less impressive 😢
It's relatively easy to produce the graph and it doesn't hurt to include it in the artifacts we output. However it does add a bit more code to the repo, so I'm on the fence if we want this merged in.
I'll leave it up to the reviewer to decide 🙂