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

Gather stats on micro-fork rate #640

Open
zone117x opened this issue Jul 7, 2021 · 4 comments
Open

Gather stats on micro-fork rate #640

zone117x opened this issue Jul 7, 2021 · 4 comments
Assignees
Labels

Comments

@zone117x
Copy link
Member

zone117x commented Jul 7, 2021

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.

@zone117x zone117x self-assigned this Jul 7, 2021
@zone117x
Copy link
Member Author

zone117x commented Jul 14, 2021

@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

@jasperjansz
Copy link

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.

@lgalabru
Copy link

@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%?

@agraebe
Copy link
Contributor

agraebe commented Aug 3, 2021

remaining task: make this an endpoint anyone could consume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

5 participants