Skip to content

fix: Bound the number of storage slots in get_account requests#2284

Merged
sergerad merged 2 commits into
nextfrom
sergerad-bound-storage-map-request
Jun 29, 2026
Merged

fix: Bound the number of storage slots in get_account requests#2284
sergerad merged 2 commits into
nextfrom
sergerad-bound-storage-map-request

Conversation

@sergerad

@sergerad sergerad commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

As part of the get_account RPC endpoint, callers can supply a list of storage map slots to fetch, which was previously unbounded. This PR caps that list at AccountStorage::MAX_NUM_STORAGE_SLOTS (and rejects duplicate slots) to bound per-request work.

Changelog

[[entry]]
scope = "rpc"
impact = "fixed"
description = "GetAccount requests are now limited to 255 storage slots, matching the protocol limit."

@sergerad sergerad requested a review from kkovaacs June 25, 2026 01:13
@sergerad sergerad changed the title Add bound validation for storage map request fix: Bound the number of storage slots in get_account requests Jun 25, 2026

@kkovaacs kkovaacs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me % the param name comment I've added.

Comment thread crates/utils/src/limiter.rs Outdated
@sergerad sergerad merged commit 81cc17b into next Jun 29, 2026
23 checks passed
@sergerad sergerad deleted the sergerad-bound-storage-map-request branch June 29, 2026 06:53
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.

3 participants