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

Include minutes per block statistics #1942

Open
janmichek opened this issue Sep 12, 2024 · 10 comments
Open

Include minutes per block statistics #1942

janmichek opened this issue Sep 12, 2024 · 10 comments
Assignees

Comments

@janmichek
Copy link

please include value

blocks per minute to v3/stats
It should be around 3 minutes per block

The formula is fairly simple. This is how I count it on FE.

image

I believe you are already using this approximate value in your computations, so it should be easy to expose, right?

@yaboiishere yaboiishere self-assigned this Sep 13, 2024
@yaboiishere
Copy link
Contributor

Just to make sure firstKeyblockTime is the block at height 1, right?

@janmichek
Copy link
Author

Not super sure with it. Keyblock 0 does not have time set.

@yaboiishere
Copy link
Contributor

Right now I'm using the block at height 1, is something like this ok?

{
    "miners_count": 211,
    "fees_trend": 0,
    "max_transactions_per_second": 52.36,
    "max_transactions_per_second_block_hash": "kh_2ek9oteSQ6KTULak4RHiqSTLebuQjMNNEujmLRZsgirMginJgW",
    "last_24hs_transactions": 0,
    "transactions_trend": 0,
    "last_24hs_average_transaction_fees": 0,
    "minutes_per_block": "0h 2m 59s 656ms"
}

@janmichek
Copy link
Author

I will think about the output format and let you know next week

@janmichek
Copy link
Author

Right now I'm using the block at height 1, is something like this ok?

{
    "miners_count": 211,
    "fees_trend": 0,
    "max_transactions_per_second": 52.36,
    "max_transactions_per_second_block_hash": "kh_2ek9oteSQ6KTULak4RHiqSTLebuQjMNNEujmLRZsgirMginJgW",
    "last_24hs_transactions": 0,
    "transactions_trend": 0,
    "last_24hs_average_transaction_fees": 0,
    "minutes_per_block": "0h 2m 59s 656ms"
}

Please format the response in milliseconds.

I am not sure about it, why the block 0 does not have any time entry?

@yaboiishere
Copy link
Contributor

Forgot to give an update, I'm not sure why it's 0, but it's that way on the node aswell, so it should be ok to use height 1. The feature should be in the next release

@yaboiishere
Copy link
Contributor

This has been deployed -> https://mainnet.aeternity.io/mdw/v3/stats

@janmichek
Copy link
Author

janmichek commented Oct 8, 2024

Ok, cool! I would just expect the value to be named accordingly - milliseconds or mircro time to be consistent with mdw naming. Can you rename it, please? I haven't used it so far. What name do you suggest?

@yaboiishere
Copy link
Contributor

Yeah, I seem to have missed it. How does ms_per_block sound?

@janmichek
Copy link
Author

I dont't have specific preference. You might use your naming convention. Afaik you use 'micro' prefix. Up to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants