aspectron / dagviz

0 stars 0 forks source link

Two different sets of blocks are drawn #4

Closed ey51 closed 4 years ago

ey51 commented 4 years ago

Current state

Two different sets of blocks are drawn (see example, one set with blue scores in the 4000's and one with blue scores in the 13,000's)

image

Proposed change

DAGviz gets its data from the following sources:

If the blocks gotten via the REST API are from one kaspa network and the blocks gotten from MQTT are from another different kaspa network (or a different simulation), they won't know about each other and won't connect. It could still be visualized as two separate blockDAGs overlayed one over the other, but it doesn't make sense to draw them together. All the blocks should come from the same kaspa network, be it the same devnet, testnet or mainnet network, otherwise it is going to wind up having two sets of unrelated blockDAGs.

ey51 commented 4 years ago

In my opinion, put off for now the blocks from MQTT until first finishing successfully drawing a given set of blocks. For that, just getting a set of blocks from kasparov REST should be enough. Let's finish drawing them to a satisfactory level before adding new blocks via MQTT stream.

aspect commented 4 years ago

There is no REST API in play at all. We are unable to use REST API due to it not really working in Kasparov (CORS incompatibility - https://github.com/kaspanet/kasparov/issues/41). Kasparov currently can only be used on the same computer. We just added our own CORS proxy implementation to have access to data while we wait for this to be addressed in Kasparov itself.

DAGViz has a SIMULATION mode where it generates its own blocks. This is what you are looking at. Turn off simulation by removing it from the URL and you will no longer get 4xxx blocks. Do not access http://xyz?simulate access with http://xyz

ey51 commented 4 years ago

Ok, so it works like a charm now that the parentBlockHashes are available.. I'm closing this issue.

ey51 commented 4 years ago

reopened by mistake