Code Monkey home page Code Monkey logo

Comments (7)

aspect avatar aspect commented on May 27, 2024

The color is depicted from the state of the incoming data... The proper way of handling this would be to have Kasparov supply initial block data in a desirable state.

If not feasible, we can set up a timer-based animation, where a block will start in the "initial" color (TBD) and then turn to red if for T period it hasn't been a part of any reorgs or SPC selection (as otherwise it already turned blue).

from dagviz.

ey51 avatar ey51 commented on May 27, 2024

Color only depends the presence of acceptingBlockHash, correct?
While blocks would be normally colored blue or red, you can wait 15 seconds with the coloring of blocks with no children. Within 15 seconds, tips with no children that would normally be colored red, might get children in the SPC that would change their acceptingBlockHash.
After 15 seconds, the color would show and they would either be colored blue if the above happened, or red if it didn't.

You can change the coloring rule to this:

  • For blocks with no children, show color (based on acceptingBlockHash) only after 15 seconds.

from dagviz.

aspect avatar aspect commented on May 27, 2024

Ok, understood. This will be done shortly.

However, for the record, I want to mention that I consider this to be somewhat of an incorrect approach. DAGViz should not make any assumptions about protocol or network behavior. If you, for example, change timing down the road, this might break things.

IMO the correct approach should be to get all of this information from MQTT, even if this requires additional MQTT messages.

It's the same reasoning as to why we wouldn't want to have linear access to the chain database... except in this case I think that linear access is ok, but the above is not very proper.

from dagviz.

ey51 avatar ey51 commented on May 27, 2024

Why do you think it's that bad?
It's merely delaying the presentation of color around the tip of the DAG, not changing it.

from dagviz.

ey51 avatar ey51 commented on May 27, 2024

15 seconds gives some time for the DAG around the tips to "settle". If there are reorgs around the tip during those 15 seconds, then you will less likely be seeing blues turn to reds and vice versa.

from dagviz.

ey51 avatar ey51 commented on May 27, 2024

The rule I wrote above:

for blocks with no children, show color (based on acceptingBlockHash) only after 15 seconds

should probably change to:

For blocks close to the tip (blocks with blue score close to the max blue score of the DAG): show color only after 15 seconds.
This is to enable the delay not just for the tips, but also to prevent color delay for any block that just gets drawn (when panning the DAG).

from dagviz.

ey51 avatar ey51 commented on May 27, 2024

superseded by #39

from dagviz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.