explorer
explorer copied to clipboard
Visualize block fullness
Now that we have this nice block visualization on several pages, I've been working on block fullness and was thinking it would be cool if we could show block fullness in there. For example:
@obycode is there an endpoint on the API tat we can use?
Not directly, but the endpoint to retrieve a block returns all the information you need:
"execution_cost_read_count": 2477,
"execution_cost_read_length": 1659409,
"execution_cost_runtime": 2520952000,
"execution_cost_write_count": 608,
"execution_cost_write_length": 80170,
The maximum values allowed for each cost are here. The fullness is then just the maximum cost/limit.
@obycode @andresgalante Could you please assist me in replicating this in the user interface (UI)?
@shamim-io This is an engagement, not a bug. You can see the block visualizer on any pending tx page.
I like @obycode suggestion. If you want to implement it, please go for it. It'd be great to have a better design for this feature overall and show it in a way that it relates better to the tx status.
For now, if you want to take a stab at implementing it, please 🚀
I would love to see this picked up, it could help analyze this phenomenon https://discord.com/channels/621759717756370964/625538774230892545/1152992611477504100.
I have an interest in seeing block fullness on the explorer too. Preferrably instead of a single bar we can even distinguish the fullness per dimension. So five bars from 0 to 100%?
[------- ] Read count [----------] Read length [------ ] Runtime [------- ] Write count [------ ] Write length
We had stxmempool.space / stxmempool.com for a while but it has been offline since the launch of Stacks 2.1 the repo may be helpful to anyone who wants to build block-fullness-visualization for the Hiro explorer though: https://github.com/stxmempool/stxmempool
Related to https://github.com/hirosystems/explorer/issues/554
@eugeniadigon maybe you can consider block fullness for the new design
Brice built this last year, which has been very helpful to analyze block fullness:
Perhaps some of the code and/or displayed metrics or visuals can inform on the design for the Hiro explorer. https://obycode.github.io/stacks-stats/block/ https://github.com/obycode/stacks-stats
Likewise I would love to see how heavy transactions. For example what percentage of the read count does a specific transaction require to include in a block.
By the way, dimensions for Stacks 3.0 blocks have not yet been determined. We do expect changes from the current max count per dimension.