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

feat: implement search_transactions_before and search_transactions_after #13621

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

caglaryucekaya
Copy link
Contributor

@caglaryucekaya caglaryucekaya commented Jan 2, 2025

Will close #13499 later.

For now, this PR has an implementation for search_transactions_after. I will add the implementation for search_transactions_before after getting feedback.

@caglaryucekaya
Copy link
Contributor Author

@mattsse I have some questions. In the issue you wrote that we should enforce a page size limit like 100 blocks. However, according to the documentation the page size argument is not blocks but the number of transactions, so we can put a limit to that.

One problem with my current implementation is that it processes blocks one by one until all the traces are fetched because we don't know in advance in which block we are going to reach the page_size number of transactions. The problem is that since the blocks are not processed in parallel, if the user e.g. request the search beginning from the genesis block and the searched addresses appear far later, the search can take hours.

I will also look into your suggestion to use AccountReader for optimization.

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.

Implement searchTransactionsBefore and searchTransactionsAfter
1 participant