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

[Documentation]: Query event: how can I query events about all validator staking #21380

Closed
Dmdv opened this issue Aug 22, 2024 · 3 comments
Closed
Assignees

Comments

@Dmdv
Copy link

Dmdv commented Aug 22, 2024

Summary

I need to query all events about all stakings from the node.
Like in ethereum where we can get all events from smart contracts using events, the same way I want to get about all stakings to validators.

I couldn't find any relevant information in docs, everywhere, and discord channel in not working too.

@Dmdv Dmdv added the T:Docs Changes and features related to documentation. label Aug 22, 2024
@tac0turtle
Copy link
Member

We dont recommend querying all events in this fashion instead we would recommend putting the data into a database like postgres and then querying from there. If you have a node that has all the events then you will need to construct a query that loops through the tx_index.db from comet to get the data

@tac0turtle tac0turtle added T:question and removed T:Docs Changes and features related to documentation. labels Aug 22, 2024
@tac0turtle tac0turtle self-assigned this Aug 22, 2024
@Dmdv
Copy link
Author

Dmdv commented Aug 22, 2024

We dont recommend querying all events in this fashion instead we would recommend putting the data into a database like postgres and then querying from there. If you have a node that has all the events then you will need to construct a query that loops through the tx_index.db from comet to get the data

Would be scanning transactions in each block a good solution anyway, provided that it's possible?

@tac0turtle
Copy link
Member

tac0turtle commented Aug 29, 2024

scanning the txs will not get you the events. the best case is to send all the events to an external database or stream them directly to the integrated database

closing this as answered but happy to continue answering

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

No branches or pull requests

2 participants