-
Notifications
You must be signed in to change notification settings - Fork 4
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
stats: Implement Daily active accounts statistics #329
Conversation
a9b4e89
to
0eaffa7
Compare
50a09b6
to
20c74f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
I much appreciate the comments sprinkled everywhere, and the clean refactoring of existing code where needed.
I have some comments/suggestions, but nothing major.
34d33d8
to
c3d0dec
Compare
Thanks for the thoughtful review, I think I addressed all the comments, please take another look @mitjat |
246866c
to
8523f75
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Only very minor comments left.
3b280ae
to
49e2065
Compare
49e2065
to
1fd3e6e
Compare
This PR adds
/{layer}/stats/active_accounts
endpoint, which returns a timeline with daily number of active accounts per layer.The API only supports daily buckets (the buckets in response are always 86400 seconds big), but it offers overlapping buckets (e.g. 5-minute bucket granularity as in the example below). The window size is fixed to 1 day, while the window step is configurable via config - 5 or 10 minute is likely ok to use in production deployment.
Example responses (on a minimally synced mainnet indexer):
TODO: