-
Notifications
You must be signed in to change notification settings - Fork 174
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
Dedup fork requests #1465
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
katana
This issue is related to Katana
Comments
kariy
added
enhancement
New feature or request
help wanted
Extra attention is needed
katana
This issue is related to Katana
good first issue
Good for newcomers
labels
Jan 20, 2024
can i take this? |
Assigned. Let me know if you have questions or need more context on this issue. |
Hey, sure you can pick up this issue 😄 |
Interested in taking this if it's not being worked on |
@btirth im gonna be assigning this to @cwkang1998 considering you already have an issue assigned to you. |
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
katana
This issue is related to Katana
When running katana in forking mode, there's a potential inefficiency that occurs when the forked backend processes identical requests simultaneously. This leads to unnecessary duplication in data fetching, as the same data is retrieved multiple times. To optimize this, we should implement a mechanism to deduplicate incoming requests, allowing the reuse of data from the first identical request.
Example scenario for context:
Consider a situation where a specific storage slot is not present in the local storage. katana then attempts to fetch it from the forked network. If, while this request is still processing, another request for the same storage slot is made, katana will again try to fetch from the forked provider. As a result, two identical requests are sent to the forked network, which is inefficient.
Proposed solution:
Implement a request deduplication process. When a request is made, katana should first check if an identical request is already in progress. If so, it should wait for the initial request to complete and then use that data, rather than initiating a new request to the forked network.
We can use the requests params (eg. contract address, storage key) as the request id, and perform the dedup process on an incoming request that has identical id.
The text was updated successfully, but these errors were encountered: