feat: filter excessive numbers of storage map key queries earlier#1530
Merged
feat: filter excessive numbers of storage map key queries earlier#1530
Conversation
Mirko-von-Leipzig
approved these changes
Jan 19, 2026
bobbinth
reviewed
Jan 20, 2026
| impl QueryParamLimiter for QueryParamStorageMapKeyLimit { | ||
| const PARAM_NAME: &str = "storage_map_key"; | ||
| const LIMIT: usize = 16; | ||
| } |
Contributor
There was a problem hiding this comment.
This is fine for now, but let's create an issue to impose a limit on the total number of storage keys in a request. The thinking is that if an account has 20 maps, we'd be allowing 20*16 keys in a single request. But for accounts with 1 map, we'd be allowing only 16 keys.
Doing this on per-map bases makes it so that we either have to have the number of keys too low for a single map, or it will be too high in the worst case.
Again, not a priority - but let's create an issue (may be a "good first issue").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to #1517 to filter the requests earlier.
Closes #1514