Skip to content

Add limit to filter logs #1558

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 1 commit into from
Apr 17, 2024
Merged

Add limit to filter logs #1558

merged 1 commit into from
Apr 17, 2024

Conversation

codchen
Copy link
Collaborator

@codchen codchen commented Apr 17, 2024

Describe your changes and provide context

We want to apply a limit for log-related queries similar to how Alchemy does for its endpoints:
Screen Shot 2024-04-17 at 11 53 57 AM

Testing performed to validate your change

unit test

@@ -93,6 +99,8 @@ var DefaultConfig = Config{
MaxTxPoolTxs: 1000,
Slow: false,
DenyList: make([]string, 0),
MaxLogNoBlock: 10000,
MaxBlocksForLog: 2000,
Copy link
Contributor

Choose a reason for hiding this comment

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

do you think we should make this larger given we have such fast blocks? (is it disruptive to only be able to query ~11 minutes of logs?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i think the limit is applied "post-filter" so in most cases it would be able to cover much longer periods? For blanket filters that don't filter anything I think the recommendation from alchemy etc. is to use the subscribe endpoint instead which doesn't have such a limit

@codchen codchen merged commit 4025070 into seiv2 Apr 17, 2024
@codchen codchen deleted the get-log-limits branch April 17, 2024 14:43
udpatil pushed a commit that referenced this pull request Apr 18, 2024
udpatil pushed a commit that referenced this pull request Apr 19, 2024
udpatil pushed a commit that referenced this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants