-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Labels
rustIssues that affect or pull requests that update Rust codeIssues that affect or pull requests that update Rust code
Description
Storage map keys are internally hashed (#1129) and so in storage map related APIs we sometimes deal with the unhashed key and sometimes with the hashed key.
Once we have 0xMiden/crypto#430 we should consider adding wrappers for StorageMapKey
and HashedStorageMapKey
so the APIs would more clearly communicate what kind of key they expect.
Additionally, some methods could be moved to the key, e.g.:
StorageMap::hash_key
could more naturally beStorageMapKey::hash(&self) -> HashedStorageMapKey
.StorageMap::hashed_map_key_to_leaf_index
(if we still have it) could be moved toHashedStorageMapKey
. The absence of that method onStorageMapKey
would prevent misusing that key as aLeafIndex
.
Metadata
Metadata
Assignees
Labels
rustIssues that affect or pull requests that update Rust codeIssues that affect or pull requests that update Rust code