Gather stats on micro-fork rate
Query for micro-fork rates. This can be a one-time task using the db for the microblock mainnet deployment that has been running for a couple months now.
It would be a useful endpoint to have baked-in as well.
@blockstack/ux-team @jasperjansz The micro-orphan rate over the last 30 days appears to be ~25%. Using the query:
with mb as (
select * from microblocks
where canonical = true
and receive_timestamp > (now()::date - 30)
),
mb_total as (
select count(*)::numeric total from mb
),
mb_orphaned as (
select count(*)::numeric orphaned from mb
where microblock_canonical = false
)
select total, orphaned, round(orphaned / total * 100, 2) rate
from mb_total, mb_orphaned
yields:
| total | orphaned | rate |
|---|---|---|
| 3825 | 982 | 25.67 |
Thanks Matt. To start, we've decided to add an indicator when a transaction is in a microblock and we'll add some more guidance as to what exactly that means.
@zone117x would it be possible to see a distribution? as in, is it a solid 25% average, or is is oscillating between 5% and 40%?
remaining task: make this an endpoint anyone could consume