Summary
Several auth components in miden-standards declare a NAME constant under miden::standards::components::auth::*, even though the storage slots they own live at miden::standards::auth::*. As Bobbin pointed out in PR #2817, the component name should be a prefix of the storage-slot names contained within it, so that off-chain tooling can match a slot to its owning component by string prefix.
PR #2817 already does this for AuthNetworkAccount (renaming miden::standards::components::auth::network_account to miden::standards::auth::network_account). Bobbin asked that the same change be made for the remaining auth components, but not in that PR, hence this follow-up.
Affected NAME constants
| Component |
File |
Current NAME |
NoAuth |
crates/miden-standards/src/account/auth/no_auth.rs |
miden::standards::components::auth::no_auth |
SingleSig |
crates/miden-standards/src/account/auth/singlesig.rs |
miden::standards::components::auth::singlesig |
SingleSigAcl |
crates/miden-standards/src/account/auth/singlesig_acl.rs |
miden::standards::components::auth::singlesig_acl |
Multisig |
crates/miden-standards/src/account/auth/multisig/mod.rs |
miden::standards::components::auth::multisig |
GuardedMultisig |
crates/miden-standards/src/account/auth/guarded_multisig.rs |
miden::standards::components::auth::guarded_multisig |
For each, drop the components:: segment so e.g. SingleSig::NAME becomes miden::standards::auth::singlesig.
Notes
- Pure string rename: storage layout is unchanged, the on-chain account representation is unchanged.
NAME is consumed via Self::NAME inside each component's component_metadata(). Search for any external consumer that compares the literal string before changing.
- Coordinate with downstream tooling (e.g. account inspectors / explorers) if any of them prefix-match the literal.
References
Summary
Several auth components in
miden-standardsdeclare aNAMEconstant undermiden::standards::components::auth::*, even though the storage slots they own live atmiden::standards::auth::*. As Bobbin pointed out in PR #2817, the component name should be a prefix of the storage-slot names contained within it, so that off-chain tooling can match a slot to its owning component by string prefix.PR #2817 already does this for
AuthNetworkAccount(renamingmiden::standards::components::auth::network_accounttomiden::standards::auth::network_account). Bobbin asked that the same change be made for the remaining auth components, but not in that PR, hence this follow-up.Affected
NAMEconstantsNAMENoAuthcrates/miden-standards/src/account/auth/no_auth.rsmiden::standards::components::auth::no_authSingleSigcrates/miden-standards/src/account/auth/singlesig.rsmiden::standards::components::auth::singlesigSingleSigAclcrates/miden-standards/src/account/auth/singlesig_acl.rsmiden::standards::components::auth::singlesig_aclMultisigcrates/miden-standards/src/account/auth/multisig/mod.rsmiden::standards::components::auth::multisigGuardedMultisigcrates/miden-standards/src/account/auth/guarded_multisig.rsmiden::standards::components::auth::guarded_multisigFor each, drop the
components::segment so e.g.SingleSig::NAMEbecomesmiden::standards::auth::singlesig.Notes
NAMEis consumed viaSelf::NAMEinside each component'scomponent_metadata(). Search for any external consumer that compares the literal string before changing.References
NetworkAccountauth component #2817 (AuthNetworkAccountis the first component migrated).NetworkAccountauth component #2817 (comment)