-
Notifications
You must be signed in to change notification settings - Fork 208
Open
Labels
assemblyRelated to Miden assemblyRelated to Miden assembly
Description
We would like to be able to declare word-sized constants from strings, kind of how it already works for error messages. Writing:
const.METADATA_SLOT_NAME="miden::basic_fungible_faucet::metadata"
would declare a word-sized constant that is the hash of the given string. For error messages, I believe this is currently just one field element, but here we would like to get a hash that is a full word. Similar to error messages, this can be the BLAKE3 hash and doesn't have to be an RPO hash.
One thought is whether this should be explicit in which hash is used, in case we do want this mechanism to (at some later point) also be usable to create constants based on RPO hashes, in which case it would be possible to disambiguate right there. So something like the following is one idea:
const.METADATA_SLOT_NAME=hash.blake3("miden::basic_fungible_faucet::metadata")
Metadata
Metadata
Assignees
Labels
assemblyRelated to Miden assemblyRelated to Miden assembly