explorer icon indicating copy to clipboard operation
explorer copied to clipboard

Visualize block fullness

Open obycode opened this issue 2 years ago • 9 comments

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:

blockfullness

obycode avatar Oct 20 '22 16:10 obycode

@obycode is there an endpoint on the API tat we can use?

andresgalante avatar Dec 13 '22 13:12 andresgalante

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 avatar Dec 16 '22 21:12 obycode

@obycode @andresgalante Could you please assist me in replicating this in the user interface (UI)?

shamim-io avatar May 24 '23 15:05 shamim-io

@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 🚀

andresgalante avatar Jun 20 '23 01:06 andresgalante

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

314159265359879 avatar Sep 18 '23 20:09 314159265359879

Related to https://github.com/hirosystems/explorer/issues/554

314159265359879 avatar Sep 25 '23 08:09 314159265359879

@eugeniadigon maybe you can consider block fullness for the new design

andresgalante avatar Jun 17 '24 18:06 andresgalante

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.

314159265359879 avatar Jun 18 '24 07:06 314159265359879