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

Visualizing parent chain, confirmations #3

Closed
ey51 opened this issue Feb 16, 2020 · 4 comments
Closed

Visualizing parent chain, confirmations #3

ey51 opened this issue Feb 16, 2020 · 4 comments

Comments

@ey51
Copy link

ey51 commented Feb 16, 2020

This issue is dependent on completion of kaspanet/kasparov#44 (comment)

Current State

Currently blue, red and parent chain blocks are not visualized.

Proposed change

  • Confirmations obtained in the block object in the responses of API calls are correct up to the time of the response. After that, they need to be re-calculated each time there is a new selected-tip block.

    • The calculation is:
      block.confirmations = dag.selected_tip.blue_score - block.accepting_block.blue_score + 1
    • The block's accepting block is part of the chain formed by the selected-tips, and its hash is a field inside the block the confirmations are being calculated for.
    • New selected-tips are received in the mqtt dag/selected-tip
    • We are adding an mqtt topic for diffs in the dag/selected-parent-chain. It will contain two arrays, blocks removed from the dag/selected-parent-chain and blocks added to the dag/selected-parent-chain. After we add that, you can use that topic instead of the dag/selected-tip topic.
  • Blocks with block.confirmations=0 --- they can have no color.

  • Blocks with block.confirmations>0 --- they can be colored greener the more confirmations they have.

    • the larger the confirmations the "greener" (4 levels . 1-5 confirmations (configurable): 25%; 6-20: 50%; 21-50: 75%; 51+:100%)
  • Selected Parent Chain Blocks are blue blocks with isParentChain=true --- they can have a thicker border to signify part of the selected parent chain.

@ey51 ey51 changed the title Visualizing parent chain, blues and reds Visualizing parent chain, blue and red blocks Feb 16, 2020
@ey51 ey51 added this to To do in BlockDAG Visualizer Feb 16, 2020
@ey51 ey51 changed the title Visualizing parent chain, blue and red blocks Visualizing parent chain, confirmations Feb 25, 2020
@ey51 ey51 moved this from To do to In progress in BlockDAG Visualizer Mar 1, 2020
@ey51
Copy link
Author

ey51 commented Mar 1, 2020

Selected Parent Chain - the bold links are better, the green color and dashed lines pattern are nice. Please also add the same bold line to the blocks' border.

@ey51
Copy link
Author

ey51 commented Mar 1, 2020

Confirmations - need to provide the dag/selected-parent-chain topic before you can calculate them for blocks.

@ey51
Copy link
Author

ey51 commented Mar 8, 2020

Update:

  • Visualizing the Selected Parent Chain (SPC) is completed.
  • Visualizing Block Confirmations:
    • The dag/selected-parent-chain mqtt topic is available. From it you get updates to the SPC and the DAG Selected Tip.
    • From here, confirmations can be calculated, as described above:
      block.confirmations = dag.selected_tip.blue_score - block.accepting_block.blue_score + 1
      Note: for the selected tip, you do not need the mqtt dag/selected-tip topic. You simply use the block with the largest blue score received from mqtt dag/selected-parent-chain topic.
    • Visualizing the Block Confirmations:
      • For now, let's just recalculate the confirmations correctly. We need to find a good way to visualize it without overburdening the UI too much, as there are already many visual elements.

@ey51 ey51 moved this from In progress to To do in BlockDAG Visualizer Mar 8, 2020
@ey51 ey51 mentioned this issue Mar 8, 2020
8 tasks
@ey51 ey51 moved this from To do to Done in BlockDAG Visualizer Mar 8, 2020
@ey51
Copy link
Author

ey51 commented Mar 8, 2020

Closing this. For block confirmations issue see #13

@ey51 ey51 closed this as completed Mar 8, 2020
@ey51 ey51 moved this from Done to Backlog in BlockDAG Visualizer Apr 27, 2020
@ey51 ey51 moved this from Backlog to Done in BlockDAG Visualizer Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant