-
Notifications
You must be signed in to change notification settings - Fork 60
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
Q: How to fetch generated blocks from a given provisioner? #3328
Comments
I currently ingest all data into a relational database and query it from there. I understand this doesn't directly answer your question, but could you share more about your use case? Depending on your needs, I might be able to work on providing trusted aggregation API endpoints or webhooks. -- Also can you specify what would be the required update frequency and how critical is API uptime for your case ? |
I am tracking my nodes rewards, so every hour or so I call a cronjob to fetch the number of generated blocks using the code shared in the description. The current code works and will work for quite some time, but it is very inefficient for both the node, the ingestion script, the bandwith, etc. |
I went the other way finally: listening to the blockchain for accepted blocks events (using RUES). |
Update: I implemented pagined fetches in order to be able to get data from the genesis, see BoboTiG/dusk-monitor@0ca521b. I am reopening the issue since having a way to filter blocks at the core level would be the best efficient. Team, is it something that is already in your backlog? Is it something wanted? |
Summary
I would like to use an efficient GraphQL query to fetch generated blocks from a given provisioner.
The current way I'm doing it is to fetch all blocks, and then filter on the
block.header.generatorBlsPubkey
value. It is almost OK today because there are not millions of created blocks; but it will become a problem soon enough.Detailed Description
Here is the current "broad" query:
Now, my question is: can this kind of modified query work? Maybe it's something that could be acheive already but I did not find the correct query:
This results in this error:
The text was updated successfully, but these errors were encountered: