Skip to content

feat: add top miners endpoint #2000

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

Merged
merged 5 commits into from
Feb 5, 2025
Merged

feat: add top miners endpoint #2000

merged 5 commits into from
Feb 5, 2025

Conversation

yaboiishere
Copy link
Contributor

@yaboiishere yaboiishere commented Oct 30, 2024

resolves: #1963

@yaboiishere yaboiishere self-assigned this Oct 30, 2024
@yaboiishere yaboiishere marked this pull request as ready for review November 26, 2024 10:58
@type top_miner_index() ::
{Stats.interval_by(), Stats.interval_start(), pubkey()}
@type top_miner() ::
record(:top_miner, index: top_miner_index, count: pos_integer())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have the Model.miner() record, why not use that to store the amount of times it has been a miner?


key_boundary =
{{interval_by, min_date, 0, Util.min_bin()},
{interval_by, max_date, Util.max_int(), Util.max_256bit_bin()}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I'm following the use of this implementation? what's the benefit of getting the top miners per month? wouldn't you want the global top miners?

@sborrazas sborrazas merged commit 03d3f80 into master Feb 5, 2025
7 checks passed
@sborrazas sborrazas deleted the top-miners branch February 5, 2025 12:40
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

Successfully merging this pull request may close these issues.

Create top miners endpoint
2 participants