fix(protocol): validate storage slot type at account creation - #3608
Merged
Conversation
mmagician
force-pushed
the
mmagician-claude/fix-l11-slot-type-validation
branch
2 times, most recently
from
August 17, 2026 12:40
740e723 to
c68db27
Compare
…l11-slot-type-validation # Conflicts: # crates/miden-protocol/asm/kernels/transaction-core/src/account.masm # crates/miden-testing/src/kernel_tests/tx/test_account.rs
mmagician
marked this pull request as ready for review
August 19, 2026 11:42
zeapoz
approved these changes
Aug 19, 2026
….masm Co-authored-by: zeapoz <zeapo@pm.me>
bobbinth
reviewed
Aug 20, 2026
bobbinth
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Thank you! I left one comment inline.
… loop Merge the separate validate_storage_slot_types pass into the main validate_storage loop so storage is validated in a single pass over the slots, per review feedback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
validate_storage mixed the two accessor families: the slot count and the slot IDs resolved through the active account, while the slot type was read from the native account. Only the native account's storage is validated this way, so take every read from the native account. get_native_slot_id already existed and is identical to get_slot_id apart from the accessor, and validate_storage was get_slot_id's only caller, so drop the duplicate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mmagician
commented
Aug 21, 2026
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.
Summary
Validates every storage slot's type against the supported set (value or map) during new-account validation, and makes
commit_slot_patchreject an unrecognized slot type instead of silently defaulting it to map.Prevents an unrecognized slot type from being committed into the account patch.
Closes #3598